Home | History | Annotate | only in /src/sys/arch/pmax
History log of /src/sys/arch/pmax
RevisionDateAuthorComments
 1.12 25-Oct-2008  apb Use ${TOOL_SED} instead if plain sed in Makefiles.
 1.11 06-Jan-2003  lukem branches: 1.11.104; 1.11.108; 1.11.114;
Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

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

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

Per lengthy discussion with Andrew Brown.
 1.10 12-Jun-1998  cgd branches: 1.10.34;
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.9 11-Oct-1997  mycroft Minor rearrangement to match other files.
 1.8 11-Oct-1997  mycroft Nuke NOOBJ.
 1.7 11-Oct-1997  mycroft Update all the tags goo, and use bsd.subdir.mk.
 1.6 07-May-1997  mycroft branches: 1.6.4;
Don't use _SUBDIRUSE outside of bsd.subdir.mk.
 1.5 29-Sep-1996  jonathan Update arch/pmax/Makefile to build in NetBSD rather than 4.4-Lite:
* Create arch/mips/Makefile.inc with source list of generic MIPS-cpu
files for tags
* Use mips/Makefile.inc and updated tag list in pmax/Makefile
* Try building bootblocks in arch/pmax/stand.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.6.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.10.34.1 07-Jan-2003  thorpej Sync with HEAD.
 1.11.114.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.11.108.1 04-May-2009  yamt sync with head.
 1.11.104.1 17-Jan-2009  mjf Sync with HEAD.
 1.3 06-Jan-2003  lukem Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

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

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

Per lengthy discussion with Andrew Brown.
 1.2 26-Oct-1994  cgd branches: 1.2.52;
new RCS ID format.
 1.1 30-May-1994  glass forgot a compile directory
 1.2.52.1 07-Jan-2003  thorpej Sync with HEAD.
 1.1 06-Jan-2003  lukem branches: 1.1.2;
Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

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

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

Per lengthy discussion with Andrew Brown.
 1.1.2.2 07-Jan-2003  thorpej Sync with HEAD.
 1.1.2.1 06-Jan-2003  thorpej file Makefile was added on branch nathanw_sa on 2003-01-07 21:12:32 +0000
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 14-Jan-1994  deraadt netbsd-ify
 1.2 14-Jan-1994  deraadt s/vmunix/netbsd/
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.3 30-Jan-1996  jonathan Remove config.old files for pmax. They should have been removed before
the NetBSD-1.1 release, as they have not worked or been supported for
some time.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 24-Jul-1994  glass make diskless work
 1.13 15-Nov-1998  jonathan Remove old model-specific config files.
 1.12 26-Jun-1998  lukem branches: 1.12.4;
remove options FIFO; it's now the default
 1.11 19-Apr-1998  jonathan Garbage collect obsolete motherboard options from non-GENERIC kernels.
Add "ibus" to configs with 3100 support.
 1.10 19-Apr-1998  jonathan Rework pmax kernel config:
* ibus (virtual bus for baseboard direct-attach deviecs)
* 5100 support, using ibus
* rename "clock" to mcclock for future support of Qbus machiens
* use sys/dev/dec mcclock_pad32 machinery for pmax mcclock
* reworked TC config code.
 1.9 25-Mar-1998  jonathan Update config files after splitting model support.
 1.8 01-Dec-1997  kleink Add COMPAT_13.
 1.7 20-Aug-1997  jonathan consistent whitespace after "options".
 1.6 29-May-1997  mhitch branches: 1.6.4;
Use the generic root/swap in the model-specific configuration files.
 1.5 31-Jan-1997  thorpej Update for new file system and root spec grammar.
 1.4 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.3 16-Nov-1996  jonathan branches: 1.3.2;
Move non-optional "options" SWAPPAGER, VNODEPAGER, DEVPAGER to std.pmax
 1.2 16-Oct-1996  jonathan Update model-specific pmax kernel config files for post-12 config:
add arch/pmax/conf/ to includes, options MIPS1, etc.
 1.1 18-Sep-1996  jonathan Create broken-out config files for decstation baseboard devices.
Add sample config files that use them.
 1.3.2.2 18-Jan-1997  thorpej Update from trunk.
 1.3.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.6.4.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.12.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.3 06-Jun-2000  nisimura Withdraw this configuration. NetBSD/pmax GENERIC is now switched to
MI SCSI.
 1.2 28-May-2000  gmcgarry Substitute bba for isdn placeholder.
 1.1 19-Feb-2000  nisimura branches: 1.1.2;
Introduce MI SCSI codes; for DECstation 5000s only this moment.
Disabled by default and needs arrangements in conf file to use it.
See DS5000 as a sample.
 1.1.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.11 15-Nov-1998  jonathan Remove old model-specific config files.
 1.10 26-Jun-1998  lukem branches: 1.10.4;
remove options FIFO; it's now the default
 1.9 19-Apr-1998  jonathan Garbage collect obsolete motherboard options from non-GENERIC kernels.
Add "ibus" to configs with 3100 support.
 1.8 25-Mar-1998  jonathan Update config files after splitting model support.
 1.7 01-Dec-1997  kleink Add COMPAT_13.
 1.6 20-Aug-1997  jonathan consistent whitespace after "options".
 1.5 29-May-1997  mhitch branches: 1.5.4;
Use the generic root/swap in the model-specific configuration files.
 1.4 31-Jan-1997  thorpej Update for new file system and root spec grammar.
 1.3 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.2 16-Nov-1996  jonathan branches: 1.2.2;
Move non-optional "options" SWAPPAGER, VNODEPAGER, DEVPAGER to std.pmax
 1.1 16-Oct-1996  jonathan Clone a 5000/{120,125,133} config file from the 5000/240 config.
 1.2.2.2 18-Jan-1997  thorpej Update from trunk.
 1.2.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.5.4.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.10.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.12 15-Nov-1998  jonathan Remove old model-specific config files.
 1.11 26-Jun-1998  lukem branches: 1.11.4;
remove options FIFO; it's now the default
 1.10 19-Apr-1998  jonathan Garbage collect obsolete motherboard options from non-GENERIC kernels.
Add "ibus" to configs with 3100 support.
 1.9 25-Mar-1998  jonathan Update config files after splitting model support.
 1.8 01-Dec-1997  kleink Add COMPAT_13.
 1.7 20-Aug-1997  jonathan consistent whitespace after "options".
 1.6 29-May-1997  mhitch branches: 1.6.4;
Use the generic root/swap in the model-specific configuration files.
 1.5 31-Jan-1997  thorpej Update for new file system and root spec grammar.
 1.4 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.3 16-Nov-1996  jonathan branches: 1.3.2;
Move non-optional "options" SWAPPAGER, VNODEPAGER, DEVPAGER to std.pmax
 1.2 16-Oct-1996  jonathan Update model-specific pmax kernel config files for post-12 config:
add arch/pmax/conf/ to includes, options MIPS1, etc.
 1.1 18-Sep-1996  jonathan Create broken-out config files for decstation baseboard devices.
Add sample config files that use them.
 1.3.2.2 18-Jan-1997  thorpej Update from trunk.
 1.3.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.6.4.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.11.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.12 15-Nov-1998  jonathan Remove old model-specific config files.
 1.11 26-Jun-1998  lukem branches: 1.11.4;
remove options FIFO; it's now the default
 1.10 19-Apr-1998  jonathan Garbage collect obsolete motherboard options from non-GENERIC kernels.
Add "ibus" to configs with 3100 support.
 1.9 25-Mar-1998  jonathan Update config files after splitting model support.
 1.8 01-Dec-1997  kleink Add COMPAT_13.
 1.7 20-Aug-1997  jonathan consistent whitespace after "options".
 1.6 29-May-1997  mhitch branches: 1.6.4;
Use the generic root/swap in the model-specific configuration files.
 1.5 31-Jan-1997  thorpej Update for new file system and root spec grammar.
 1.4 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.3 16-Nov-1996  jonathan branches: 1.3.2;
Move non-optional "options" SWAPPAGER, VNODEPAGER, DEVPAGER to std.pmax
 1.2 16-Oct-1996  jonathan Update model-specific pmax kernel config files for post-12 config:
add arch/pmax/conf/ to includes, options MIPS1, etc.
 1.1 18-Sep-1996  jonathan Create broken-out config files for decstation baseboard devices.
Add sample config files that use them.
 1.3.2.2 18-Jan-1997  thorpej Update from trunk.
 1.3.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.6.4.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.11.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.12 15-Nov-1998  jonathan Remove old model-specific config files.
 1.11 26-Jun-1998  lukem branches: 1.11.4;
remove options FIFO; it's now the default
 1.10 19-Apr-1998  jonathan Garbage collect obsolete motherboard options from non-GENERIC kernels.
Add "ibus" to configs with 3100 support.
 1.9 25-Mar-1998  jonathan Update config files after splitting model support.
 1.8 01-Dec-1997  kleink Add COMPAT_13.
 1.7 20-Aug-1997  jonathan consistent whitespace after "options".
 1.6 29-May-1997  mhitch branches: 1.6.4;
Use the generic root/swap in the model-specific configuration files.
 1.5 31-Jan-1997  thorpej Update for new file system and root spec grammar.
 1.4 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.3 16-Nov-1996  jonathan branches: 1.3.2;
Move non-optional "options" SWAPPAGER, VNODEPAGER, DEVPAGER to std.pmax
 1.2 16-Oct-1996  jonathan Update model-specific pmax kernel config files for post-12 config:
add arch/pmax/conf/ to includes, options MIPS1, etc.
 1.1 18-Sep-1996  jonathan Create broken-out config files for decstation baseboard devices.
Add sample config files that use them.
 1.3.2.2 18-Jan-1997  thorpej Update from trunk.
 1.3.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.6.4.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.11.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.29 13-Mar-2002  ad Remove unmaintained / of limited use configs.
 1.28 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.27 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.26 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.25 08-Jul-2001  abs branches: 1.25.2; 1.25.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.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 13-Sep-2000  nisimura Have MI SCSI device descriptions in GENERIC, removing 'mi.scsi' file.
 1.22 12-Feb-2000  thorpej Nuke NKMEMCLUSTERS.
 1.21 09-Jan-2000  ad s/4(..)bsd/4$1BSD/
 1.20 25-Nov-1999  nisimura Reorder device descriptions to reflect what kernel shows on screen,
mostly in address ascending order.
 1.19 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.18 26-Apr-1999  ad branches: 1.18.2; 1.18.8;
Fixed to match rasops config glue.
 1.17 13-Apr-1999  ad Add configuration glue needed by rasops, wsfont, rcons and the px driver.
 1.16 07-Feb-1999  jonathan branches: 1.16.4;
garbage-collect `options MULTICAST'. IP multicast is no longer an option.
 1.15 27-Nov-1998  simonb White space and comment formatting police
 1.14 26-Jun-1998  lukem branches: 1.14.4;
remove options FIFO; it's now the default
 1.13 19-Apr-1998  jonathan Garbage collect obsolete motherboard options from non-GENERIC kernels.
Add "ibus" to configs with 3100 support.
 1.12 25-Mar-1998  jonathan Update config files after splitting model support.
 1.11 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.10 20-Aug-1997  jonathan Turn DDB on by default in GENERIC kernel; turn DDB_ONPANIC off.
Remove obsolete comments.
 1.9 20-Aug-1997  jonathan consistent whitespace after "options".
 1.8 12-Jun-1997  mrg branches: 1.8.4;
remove now obsolete "swap on..." lines.
 1.7 31-Jan-1997  thorpej Update for new file system and root spec grammar.
 1.6 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.5 16-Nov-1996  jonathan branches: 1.5.2;
Move non-optional "options" SWAPPAGER, VNODEPAGER, DEVPAGER to std.pmax
 1.4 13-Oct-1996  jonathan Update pmax config files ``GENERIC'' and ``DSG'' with post-1.2
NetBSD-current changes:
* change include paths to be relative to the kernel-source tree
(e.g., `/sys') instead of arch/pmax/conf.
* add explicit options for exec packages (EXEC_ELF32, EXEC_ECOFF
for COMPAT_ULTRIX)
* comment out references to still-unsuppoted MI scsi.
 1.3 02-Oct-1996  jonathan Add explicit options for elf and script exec packges to std.pmax.
Add ECOFF exec option to my own config file; untested.
 1.2 30-Sep-1996  jonathan Update all the include directives to use pathnames relative to the root
of the kernel source tree, not the port config directory.
 1.1 18-Sep-1996  jonathan Create broken-out config files for decstation baseboard devices.
Add sample config files that use them.
 1.5.2.2 18-Jan-1997  thorpej Update from trunk.
 1.5.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 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.16.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.18.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.18.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.25.8.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.25.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.25.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.25.8.1 08-Jul-2001  nathanw file DSG was added on branch nathanw_sa on 2002-01-08 00:27:03 +0000
 1.25.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.25.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.25.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2 15-Jun-1994  mycroft Clean up deleted files.
 1.1 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 14-Jan-1994  deraadt netbsd-ify
 1.2 14-Jan-1994  deraadt s/vmunix/netbsd/
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.207 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.206 29-Sep-2022  riastradh branches: 1.206.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.205 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.204 27-Sep-2020  roy vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.203 30-Aug-2020  skrll Add some debug options to help find why the automated tests are failing.

XXX turn off on release branch
 1.202 30-Aug-2020  skrll Trailing whitespace
 1.201 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.200 20-Jan-2020  thorpej Remove FDDI support.
 1.199 26-Apr-2019  sevan branches: 1.199.2; 1.199.4;
Enable BUFQ_PRIOCSCAN, CARP, Veriexec by default in GENERIC kernel configs.
On ports without a GENERIC kernel config enable in individul files, e.g evbmips.
Omit on:
atari, dreamcast, emips, epoc32, evbppc/VIRTEX*, ia64, luna68x, mvme68k,
mvmeppc, playstation2, riscv, sun2, sun3, x68k, zaurus due to resource
constraints or port infancy.
 1.198 13-Apr-2019  isaki Add drvctl to kernel which has audio device.
audiocfg(1) requires drvctl(4).
 1.197 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.196 23-Jan-2018  sevan branches: 1.196.2; 1.196.4;
Alternate buffer queue strategies no longer considered experimental, update
description.

Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.195 05-Jan-2018  flxd Comment out DIAGNOSTIC/DEBUG/LOCKDEBUG from r1.192 slowing down real machines.
OK christos@
 1.194 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.193 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.192 06-Aug-2017  christos Turn on DIAGNOSTIC and DEBUG.
 1.191 28-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.190 13-Dec-2016  christos branches: 1.190.8;
wildcard speaker attachments, now that we can handle many of them.
 1.189 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.188 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.187 26-Nov-2016  christos mention PAX_SEGVGUARD dependency on FILEASSOC
 1.186 03-Sep-2016  christos add aslr/mprotect et.al.
 1.185 16-Nov-2014  manu branches: 1.185.2; 1.185.4;
Remove unused extended attributes kernel options

As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
 1.184 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.183 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.182 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.181 20-Jul-2014  alnsn branches: 1.181.2;
Add commented out bpfjit options to mips kernels.
While here, add 2 missing RCS ids.
 1.180 30-Jun-2013  rmind branches: 1.180.4;
G/C PFIL_HOOKS from the kernel configs.
 1.179 05-Jun-2013  christos branches: 1.179.2;
remove obsolete networking options
 1.178 27-Apr-2013  christos the bogus number police
 1.177 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.176 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.175 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.174 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.173 17-Aug-2012  abs branches: 1.173.2;
Update all kernel configs mentioning WSEMUL_* but not already including
WSDISPLAY_COMPAT_USL using the following rules:
- If WSEMUL_ is commented out, add commented out out WSDISPLAY_COMPAT_USL
- If INSTALL or obviously memory constrained, add WSDISPLAY_DEFAULTSCREENS=1
and commented out WSDISPLAY_COMPAT_USL
- Otherwise add WSDISPLAY_COMPAT_USL

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

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

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

On 5 June 2012 09:47, David Brownlee <abs@absd.org> wrote:
> wsconscfg(8) requires WSDISPLAY_COMPAT_USL in order to switch virtual
> terminals.
>
> Except when in an exceptionally memory or space constrained
> environment (INSTALL being the obvious case), is there any reason why
> all GENERIC and GENERIC-like kernels which have wscons enabled
> shouldn't also have WSDISPLAY_COMPAT_USL?
 1.172 10-Mar-2012  joerg P1003_1B_SEMAPHORE is no longer optional.
 1.171 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.170 22-Nov-2011  tls branches: 1.170.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.169 30-Jun-2011  wiz branches: 1.169.2;
dependant -> dependent
 1.168 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.167 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.166 07-Jul-2010  chs branches: 1.166.2; 1.166.4;
enable DDB_HISTORY_SIZE in a few more configs where DDB is enabled.
 1.165 08-May-2010  mrg enable IPFILTER_COMPAT in all kernels that have ipfilter already.
canonicalise several of the ipf option segments in various files
(this mostly means adding commented out IPFILTER_DEFAULT_BLOCK,
or adding commented or uncommented IPFILTER_LOG or IPFILTER_LOOKUP
option statements.)

i built about 20 of these kernels to check, but not all of them.
 1.164 29-Apr-2010  chs enable TMPFS in all GENERICs that have MFS enabled.
 1.163 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.162 05-Dec-2009  pooka branches: 1.162.2; 1.162.4;
Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.161 24-Jan-2009  mrg add COMPAT_50 to all the configs with COMPAT_40.
 1.160 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

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

Proposed on tech-kern@.
 1.158 10-Aug-2008  tls branches: 1.158.2; 1.158.8;
Add accept filters to GENERIC kernels where they exist.
 1.157 31-Jul-2008  simonb Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.156 04-Apr-2008  tsutsui branches: 1.156.4; 1.156.6; 1.156.10;
Add options COMPAT_40.
 1.155 31-Dec-2007  ad branches: 1.155.6;
Remove systrace. Ok core@.
 1.154 04-Nov-2007  xtraeme branches: 1.154.2; 1.154.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.153 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.152 04-Jun-2007  martin branches: 1.152.8; 1.152.10; 1.152.14;
Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
 1.151 11-Nov-2006  jmmv branches: 1.151.2; 1.151.8; 1.151.10; 1.151.16; 1.151.18;
Remove tmpfs's experimental status. OK'ed by core@.
 1.150 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.149 26-Aug-2006  christos branches: 1.149.2; 1.149.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.148 26-Aug-2006  tsutsui Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.147 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.146 29-Jul-2006  ad branches: 1.146.2;
Remove RASTERCONSOLE support from the pmax port.
 1.145 28-Jun-2006  liamjfoy Add CARP to GENERIC kernel configs. CARP is not enabled by default.

ok: christos
 1.144 28-Mar-2006  pavel branches: 1.144.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.143 05-Feb-2006  cube branches: 1.143.2; 1.143.4; 1.143.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.142 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.141 02-Feb-2006  reinoud branches: 1.141.2;
Add commented out UDF file-system entry in all GENERIC configurations.
 1.140 09-Dec-2005  elad branches: 1.140.2; 1.140.4;
Add (commented out) Veriexec options and pseudo-device to GENERIC kernels,
and remove the i386 GENERIC_VERIEXEC config.
 1.139 07-Dec-2005  tsutsui Remove obsolete options VNODE_OP_NOINLINE.
 1.138 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.137 07-Oct-2005  tsutsui options<space><tab>
 1.136 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.135 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.134 19-Aug-2005  christos 64 bit inode changes.
 1.133 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.132 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.131 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.130 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.129 25-Jun-2005  rpaulo branches: 1.129.2;
Add file-system PTYFS (commented out) so that people know its existence.

Ok'ed by Christos Zoulas and Hubert Feyrer.
 1.128 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.127 25-Feb-2005  simonb branches: 1.127.2;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.126 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.125 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.124 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.123 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.122 10-Nov-2004  christos branches: 1.122.4; 1.122.6;
Add COMPAT_BSDPTY to the rest of the config files.
 1.121 04-Sep-2004  manu IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
 1.120 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.119 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.118 26-Jun-2004  abs Add (commented out) ALTQ options to all GENERIC-like files
 1.117 22-Jun-2004  itojun have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
 1.116 18-Jun-2004  christos ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM
 1.115 16-Jun-2004  christos Add pseudo-device ptm on all the generic flavored kernels.
 1.114 19-Dec-2003  tsutsui branches: 1.114.2;
- Netbsd -> NetBSD
- use options<space><tab>
 1.113 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.112 25-Oct-2003  simonb Add COMPAT_16 where missing.
Remove the unused COMPAT_15.
Comment out/remove COMPAT_* from INSTALL kernels.
 1.111 26-Apr-2003  ragge branches: 1.111.2;
Add pseudo-device ksyms.
 1.110 10-Apr-2003  christos Bye Bye UCONSOLE
 1.109 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.108 22-Nov-2002  wiz Fix typo (responsiness -> responsiveness).
 1.107 18-Oct-2002  junyoung Add NEW_BUFQ_STRATEGY (disabled by default).
 1.106 14-Oct-2002  elric Added commented out cgd(4)s to GENERIC configs.
 1.105 06-Oct-2002  provos add SYSTRACE; approved perry.
 1.104 25-Sep-2002  martti Add one space between "#option" and "<tab>IPFILTER_DEFAULT_BLOCK"
 1.103 20-Sep-2002  martti Added (commented out) IPFILTER_DEFAULT_BLOCK.
 1.102 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.101 08-Aug-2002  ad Replace FONT_LUCIDA with FONT_GALLANT.
 1.100 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.99 25-Apr-2002  atatat branches: 1.99.2; 1.99.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.98 13-Apr-2002  simonb Remove commented out "options EXEC_ELF_CATCHALL", and note that
COMPAT_1{1,2} provide this (renamed) functionality.
 1.97 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.96 27-Jan-2002  jdolecek branches: 1.96.6;
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.95 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.94 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.93 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.92 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.91 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.90 01-Sep-2001  atatat branches: 1.90.6;
Add bridge pseudo devices to GENERIC configs
 1.89 26-Aug-2001  simonb Switch to MI SCSI and drop old pmax MD SCSI support completely.
 1.88 08-Jul-2001  abs branches: 1.88.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.87 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.86 19-Dec-2000  bouyer Add pseudo-device vlan
 1.85 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.84 16-Sep-2000  simonb Add a (commented out for now) VNODE_OP_NOINLINE options line, and mention
that it makes smaller and possibly slightly faster kernels.
 1.83 13-Sep-2000  nisimura Have MI SCSI device descriptions in GENERIC, removing 'mi.scsi' file.
 1.82 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.81 27-Jul-2000  mason Moving to a default of 64 PTYs.
 1.80 19-Jul-2000  tsutsui Add (commented out) "options TCVERBOSE".
 1.79 30-Jun-2000  itojun add PULLDOWN_TEST for all the platforms.
XXX should be moved to somewhere else when stabilized
 1.78 22-Jun-2000  fvdl Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC.
 1.77 14-Jun-2000  veego branches: 1.77.2;
Remove the obsolete config fragments for kernel crypto, because the IPsec
crypto code is now in the kernel source tree.
 1.76 02-Jun-2000  mhitch Add commented out entry for SII driver using MI SCSI.
Remove DS500-only comment for MI SCSI configuration include.
 1.75 28-May-2000  gmcgarry Substitute bba for isdn placeholder.
 1.74 02-May-2000  augustss branches: 1.74.2;
Fix typo.
 1.73 02-May-2000  augustss Add proper bba attachment. From Gregory McGarry <g.mcgarry@ieee.org>
 1.72 02-May-2000  augustss Comment out bba since I don't really know if it's right.
 1.71 02-May-2000  augustss Add bba(4) attachment at tc.
 1.70 19-Apr-2000  itojun add stf pseudo interface (commented out due to possible security risks)
 1.69 29-Feb-2000  simonb Do the "<space><tab>" thing with the RAID_AUTOCONFIG option.
 1.68 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.67 21-Feb-2000  nisimura Fix scsi.pmax inclusion mistakenly commented out.
 1.66 19-Feb-2000  nisimura Introduce MI SCSI codes; for DECstation 5000s only this moment.
Disabled by default and needs arrangements in conf file to use it.
See DS5000 as a sample.
 1.65 12-Feb-2000  thorpej Nuke NKMEMCLUSTERS.
 1.64 23-Jan-2000  hubertf Add commented out "ident"-command
 1.63 20-Jan-2000  wrstuden Add overlay to kernel configs.
 1.62 09-Jan-2000  ad s/4(..)bsd/4$1BSD/
 1.61 31-Dec-1999  ad Comment px0 entry a little more accurately.
 1.60 09-Dec-1999  simonb Add a few comments for unsupported systems.
 1.59 08-Dec-1999  simonb Oops, back out some test 5500 stuff from previous commit - only RAMDISK
was meant to be changed.
 1.58 08-Dec-1999  simonb We now need a 3MB miniroot.
 1.57 02-Dec-1999  simonb Do the "options<SPACE><TAB>" thing for some recent options.
 1.56 27-Nov-1999  simonb Oops, px* won't work right now - go back to px0.
 1.55 27-Nov-1999  simonb * all device attachments, after discussion with Jason Thorpe and Toru
Nishimura.
 1.54 25-Nov-1999  nisimura Reorder device descriptions to reflect what kernel shows on screen,
mostly in address ascending order.
 1.53 24-Nov-1999  simonb Wildcard 3max {asc,le}0 at tc attachment.
 1.52 24-Nov-1999  thorpej Specify all the locators for the various devices.
 1.51 24-Nov-1999  simonb Attach asc0 and le0 at tc 5 and 6 respectively - 5000/200 now works again.
XXX: Should the turbochannel slot numbers be wildcarded or hardcoded?
It's not as if they can appear anywhere else...
 1.50 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.49 15-Nov-1999  fvdl Add commented out option SOFTDEP to all GENERIC kernels.
 1.48 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.47 29-Jul-1999  augustss branches: 1.47.2; 1.47.8;
It's time to be COMPAT_14.
 1.46 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.45 10-May-1999  simonb The comment says we support up to 3 framebuffers, make it so...
 1.44 26-Apr-1999  ad Fixed to match rasops config glue.
 1.43 26-Apr-1999  jonathan Add common SYSV* options (from i386).
Add "options LKM", since with ELF/ECOFF format kernels it should now work.
 1.42 21-Apr-1999  simonb Comment out 'config nfsnetbsd'.
 1.41 20-Apr-1999  simonb s/NFS_BOOT_BOOTP/NFS_BOOT_DHCP/
DHCP is a superset of BOOTP, and still works with BOOTP servers.
 1.40 13-Apr-1999  ad Add configuration glue needed by rasops, wsfont, rcons and the px driver.
 1.39 29-Mar-1999  nisimura branches: 1.39.2;
- Minor formating knots. No functional change.
 1.38 28-Mar-1999  simonb Add enabled options NETATALK and IPFILTER_LOG, and disabled PPP_BSDCOMP,
PPP_DEFLATE, PPP_FILTER and PFIL_HOOKS

Partial fix for kern/7264 from Greg Woods. Too much variance in all
ports GENERIC config files to do across the board right now.
 1.37 27-Mar-1999  simonb Remove "md" - we have a specific INSTALL kernel, so we don't need "md"
on the GENERIC kernel. Pointed out by Erik Fair.
 1.36 27-Mar-1999  simonb Uncomment ipfilter and rnd, add md.
 1.35 07-Feb-1999  jonathan garbage-collect `options MULTICAST'. IP multicast is no longer an option.
 1.34 27-Nov-1998  simonb White space and comment formatting police
 1.33 25-Nov-1998  hwr Add (commented out) 'gre' pseudo device line. Feedback is welcome.
Inspired by Klaus Klein.
 1.32 16-Nov-1998  oster Added a (commented out) configuration line for the RAIDframe device driver.
 1.31 20-Oct-1998  simonb Remove commented out OPTIONS DEC_5100 line - there was already an
uncommented line above for the 5100.
Mention "kn04" (the 5000/150) on the DEC_3MIN options line.
 1.30 03-Jul-1998  mhitch branches: 1.30.4;
Add "mainbus0" and "cpu*" entries that used to be in std.pmax. GENERIC
should now 'config' without errors.
 1.29 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.28 08-May-1998  simonb - Allow all valid SCSI id's to work on the SII and first two ASC
controllers (including SCSI id 7 on the 2100/3100).
- On the pmax (2100,3100) set the host SCSI id to 6.
- Move disk and tape config for the second ASC controller from the GENERIC
config file to scsi.pmax so all configurations can use the second
controller.
 1.27 19-Apr-1998  jonathan Garbage collect obsolete motherboard options from non-GENERIC kernels.
Add "ibus" to configs with 3100 support.
 1.26 19-Apr-1998  jonathan Rework pmax kernel config:
* ibus (virtual bus for baseboard direct-attach deviecs)
* 5100 support, using ibus
* rename "clock" to mcclock for future support of Qbus machiens
* use sys/dev/dec mcclock_pad32 machinery for pmax mcclock
* reworked TC config code.
 1.25 26-Mar-1998  jonathan Garbage-collect oldstyle model-select options from GENERIC.
 1.24 25-Mar-1998  jonathan Update config files after splitting model support.
 1.23 18-Mar-1998  bouyer Add commented out "options FFS_EI"
 1.22 09-Jan-1998  drochner Compile in BOOTP support for diskless boot.
 1.21 01-Dec-1997  kleink Add COMPAT_13.
 1.20 20-Nov-1997  fair add pseudo-device rnd, commented out
 1.19 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.18 23-Aug-1997  mjacob branches: 1.18.4;
add a before tab to SCSIVERBOSE
 1.17 20-Aug-1997  mjacob add commented out reference SCSIVERBOSE option
 1.16 20-Aug-1997  jonathan Turn DDB on by default in GENERIC kernel; turn DDB_ONPANIC off.
Remove obsolete comments.
 1.15 20-Aug-1997  jonathan consistent whitespace after "options".
 1.14 29-Jul-1997  mhitch branches: 1.14.2;
Add disk and tape devices for a second ASC SCSI option card.
 1.13 22-Jun-1997  jonathan Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.
 1.12 01-Jun-1997  jonathan Add CD9660 and PROCFS filesystems. Sort filesystem options.
Add tun, and reorder pseudo-devices to match other systems' GENERIC config.
 1.11 28-Feb-1997  jonathan Remove obsolete comment. (This config *does* work).
 1.10 31-Jan-1997  thorpej branches: 1.10.4;
Update for new file system and root spec grammar.
 1.9 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.8 16-Nov-1996  jonathan branches: 1.8.2;
Move non-optional "options" SWAPPAGER, VNODEPAGER, DEVPAGER to std.pmax
 1.7 16-Oct-1996  jonathan Update model-specific pmax kernel config files for post-12 config:
add arch/pmax/conf/ to includes, options MIPS1, etc.
 1.6 13-Oct-1996  jonathan Update pmax config files ``GENERIC'' and ``DSG'' with post-1.2
NetBSD-current changes:
* change include paths to be relative to the kernel-source tree
(e.g., `/sys') instead of arch/pmax/conf.
* add explicit options for exec packages (EXEC_ELF32, EXEC_ECOFF
for COMPAT_ULTRIX)
* comment out references to still-unsuppoted MI scsi.
 1.5 02-Oct-1996  jonathan Update pmax GENERIC config to use revamped config files with per-model
include files containing model-specific I/O device configuration.

Add more options and devices (ccd, LKM, etc), as appropriate for
documentation and as examples in a "template" GENERIC config file,
even though not all of these work completely yet.
 1.4 28-Aug-1996  jonathan Add mrg's "options COMPAT_12" back into the trunk.
 1.3 28-Aug-1996  jonathan * Rename miniroot GENERIC kernel to GENERIC
* Add changes needed/used to build 1.2 GENERIC kernel:
* Delete obsolete and ambiguous DS5000 option.
* Add CPU_R3000 which is now required to compile in mips1 locore support.
* Add an explicit declaration of HZ.
* back out COMPAT_12 for this revision.
 1.2 26-Aug-1996  mrg add COMPAT_12.
 1.1 28-Dec-1995  jonathan branches: 1.1.4;
Config file used to build pmax kernels in NetBSD/1.1
miniroots, from Arne Juul (arnej@pvv.unit.no).
(like NEWCONF, except with options GENERIC)
 1.1.4.1 09-Sep-1996  thorpej Pull up diffs between revs 1.2 and 1.3 by request from Jonathan Stone.
Log message:

revision 1.3
date: 1996/08/28 05:49:35; author: jonathan; state: Exp; lines: +4 -5
* Rename miniroot GENERIC kernel to GENERIC
* Add changes needed/used to build 1.2 GENERIC kernel:
* Delete obsolete and ambiguous DS5000 option.
* Add CPU_R3000 which is now required to compile in mips1 locore support.
* Add an explicit declaration of HZ.
* back out COMPAT_12 for this revision.

Note that the COMPAT_12 change was not relevant in this pullup.
 1.8.2.2 18-Jan-1997  thorpej Update from trunk.
 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.10.4.1 12-Mar-1997  is Merge in changes from Trunk
 1.14.2.2 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.4.2 08-May-1998  mycroft Pull up 1.28, per request of simonb.
 1.18.4.1 20-Nov-1997  mellon Pull rev 1.20 up from trunk (fair)
 1.30.4.5 04-Aug-1999  nisimura - Catch up to recent introduction of wsmux psuedo-device.
- Make sure to assign BRG value early in boot.
- Make ZELMWU comfortable to build.
 1.30.4.4 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.30.4.3 17-Apr-1999  nisimura - Introduce 'dctty' as a child node of 'dc'. It's a sibling of 'dckbd'
and 'dcms'.
- Needs rework of how to send any data to keyboard and mouse.
attmt.sendchar is evil. It'd be nice to have flexible framework of
two way communication channels between wskbd/wsmouse and lower device
layer.
 1.30.4.2 29-Mar-1999  nisimura - Catch up to recent changes in main trunk.
- Reorganize various #include's.
- Yield memcpy to Mach derivated one.
- pm_cnattach() now checks the existense of framebuffer card.
 1.30.4.1 15-Oct-1998  nisimura - Reflect all changes of this branch; NWSCONS, MI SCSI, new spl(9) and others.
 1.39.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.39.2.2 26-Apr-1999  perry branches: 1.39.2.2.2;
pullup 1.42->1.43 (Jonathan Stone)
 1.39.2.1 20-Apr-1999  cjs Pull up HEAD 1.40-1.41 diff (leaving out some earlier ones) per
Simon Burge <simonb@netbsd.org>
 1.39.2.2.2.2 02-Aug-1999  thorpej Update from trunk.
 1.39.2.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.47.8.2 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.47.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.47.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.47.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.74.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.77.2.3 01-May-2001  he Pull up revision 1.86 (requested by he):
Add pseudo-device vlan.
Make sure "rnd is EXPERIMENTAL" comment is removed.
 1.77.2.2 11-Aug-2000  mason Move to default of 64 PTYs in GENERIC kernel config.
Requested by mason, approved by jhawk.
 1.77.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.88.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.88.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.88.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.88.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.88.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.88.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.90.6.9 11-Dec-2002  thorpej Sync with HEAD.
 1.90.6.8 11-Nov-2002  nathanw Catch up to -current
 1.90.6.7 18-Oct-2002  nathanw Catch up to -current.
 1.90.6.6 13-Aug-2002  nathanw Catch up to -current.
 1.90.6.5 20-Jun-2002  nathanw Catch up to -current.
 1.90.6.4 17-Apr-2002  nathanw Catch up to -current.
 1.90.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.90.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.90.6.1 01-Sep-2001  nathanw file GENERIC was added on branch nathanw_sa on 2002-01-08 00:27:03 +0000
 1.96.6.2 16-Mar-2002  ad Sanitize.
 1.96.6.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.99.4.3 24-Oct-2002  lukem Pull up upgrade to IPfilter 3.4.29 (requested by martti in ticket #905).
Affected files & revisions:

dist/ipf/HISTORY 1.14
dist/ipf/fils.c 1.17-1.21
dist/ipf/ipf.c 1.11-1.13
dist/ipf/ipfs.c 1.8-1.10
dist/ipf/ipft_ef.c 1.6-1.7
dist/ipf/ipft_td.c 1.6-1.7
dist/ipf/ipft_tx.c 1.7-1.8
dist/ipf/ipmon.c 1.12-1.17
dist/ipf/ipnat.c 1.11-1.12
dist/ipf/ipsend/ip_var.h 1.2
dist/ipf/ipsend/ipsend.c 1.8
dist/ipf/ipsend/iptests.c 1.5
dist/ipf/ipt.c 1.8-1.10
dist/ipf/kmem.c 1.8-1.10
dist/ipf/man/ipf.4 1.10
dist/ipf/man/ipf.5 1.8
dist/ipf/man/ipftest.1 1.3
dist/ipf/man/ipmon.8 1.10
dist/ipf/man/ipnat.5 1.9-1.10
dist/ipf/man/ipnat.8 1.4
dist/ipf/misc.c 1.7
dist/ipf/natparse.c 1.10
dist/ipf/parse.c 1.13
dist/ipf/printnat.c 1.8-1.10
dist/ipf/relay.c 1.5-1.6
dist/ipf/rules/example.9 1.2
etc/rc.d/ipnat 1.8
regress/sys/kern/ipf/Makefile 1.3-1.4
regress/sys/kern/ipf/dotest6 1.2
regress/sys/kern/ipf/expected/f13 1.1.1.2
regress/sys/kern/ipf/expected/i12 1.1.1.1
regress/sys/kern/ipf/expected/ni3 1.1.1.1
regress/sys/kern/ipf/expected/ni5 1.2
regress/sys/kern/ipf/input/f13 1.1.1.2
regress/sys/kern/ipf/input/ipv6.1 1.1.1.1
regress/sys/kern/ipf/input/ni3 1.1.1.1
regress/sys/kern/ipf/regress/i12 1.1.1.1
regress/sys/kern/ipf/regress/ipv6.1 1.1.1.1
regress/sys/kern/ipf/regress/ni3.ipf 1.1.1.1
regress/sys/kern/ipf/regress/ni3.nat 1.1.1.1
sys/arch/alpha/conf/ALPHA 1.169,1.171
sys/arch/amiga/conf/GENERIC 1.185-1.186
sys/arch/arc/conf/GENERIC 1.71-1.72
sys/arch/atari/conf/GENERIC.in 1.24-1.25
sys/arch/cats/conf/GENERIC 1.31-1.32
sys/arch/cobalt/conf/GENERIC 1.34-1.35
sys/arch/hp300/conf/GENERIC 1.83-1.84
sys/arch/i386/conf/CARDBUS 1.66-1.67
sys/arch/i386/conf/GENERIC 1.510,1.512
sys/arch/i386/conf/GENERIC_LAPTOP 1.58-1.59
sys/arch/i386/conf/GENERIC_PS2TINY 1.19-1.20
sys/arch/i386/conf/GENERIC_TINY 1.47-1.48
sys/arch/luna68k/conf/GENERIC 1.33-1.33
sys/arch/mac68k/conf/GENERIC 1.130-1.131
sys/arch/mac68k/conf/GENERICSBC 1.21-1.22
sys/arch/mac68k/conf/SMALLRAM 1.4-1.5
sys/arch/macppc/conf/GENERIC 1.142-1.143
sys/arch/mipsco/conf/GENERIC 1.21-1.22
sys/arch/mmeye/conf/GENERIC 1.44-1.45
sys/arch/news68k/conf/GENERIC 1.36-1.37
sys/arch/news68k/conf/GENERIC_TINY 1.18-1.19
sys/arch/newsmips/conf/GENERIC 1.50-1.51
sys/arch/ofppc/conf/GENERIC 1.56-1.57
sys/arch/pmax/conf/GENERIC 1.103-1.104
sys/arch/prep/conf/GENERIC 1.55-1.56
sys/arch/sbmips/conf/GENERIC 1.11-1.12
sys/arch/sgimips/conf/GENERIC 1.7-1.8
sys/arch/sparc/conf/GENERIC 1.138-1.139
sys/arch/sparc64/conf/GENERIC32 1.46-1.47
sys/arch/vax/conf/GENERIC 1.102-1.103
sys/arch/x68k/conf/ALL 1.55-1.56
sys/arch/x68k/conf/GENERIC 1.80-1.81
sys/lkm/netinet/if_ipl/mln_ipl.c 1.29
sys/netinet/fil.c 1.57-1.58
sys/netinet/ip_auth.c 1.29-1.30
sys/netinet/ip_compat.h 1.30-1.31
sys/netinet/ip_fil.c 1.81-1.86
sys/netinet/ip_fil.h 1.46-1.49
sys/netinet/ip_frag.c 1.33-1.34
sys/netinet/ip_frag.h 1.18
sys/netinet/ip_ftp_pxy.c 1.25-1.26
sys/netinet/ip_h323_pxy.c 1.5-1.6
sys/netinet/ip_log.c 1.22-1.23
sys/netinet/ip_nat.c 1.51-1.53
sys/netinet/ip_nat.h 1.27
sys/netinet/ip_netbios_pxy.c 1.4
sys/netinet/ip_proxy.c 1.35-1.36
sys/netinet/ip_proxy.h 1.18
sys/netinet/ip_state.c 1.41-1.42
sys/netinet/ip_state.h 1.23
sys/netinet/ipl.h 1.14
 1.99.4.2 09-Aug-2002  lukem Pull up revision 1.101 (requested by ad in ticket #644):
Replace FONT_LUCIDA with FONT_GALLANT.
 1.99.4.1 01-Aug-2002  lukem Pull up revision 1.100 (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.99.2.2 31-Aug-2002  gehenna catch up with -current.
 1.99.2.1 15-Jul-2002  gehenna catch up with -current.
 1.111.2.9 11-Dec-2005  christos Sync with head.
 1.111.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.111.2.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.111.2.6 15-Feb-2005  skrll Sync with HEAD.
 1.111.2.5 04-Feb-2005  skrll Sync with HEAD.
 1.111.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.111.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.111.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.111.2.1 03-Aug-2004  skrll Sync with HEAD
 1.114.2.3 15-Jul-2004  he Pull up revision 1.120 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.114.2.2 02-Jul-2004  he Pull up revision 1.119 (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.114.2.1 30-Jun-2004  jdc Pull up revision 1.118 (requested by abs in ticket #567).

Add (commented out) ALTQ options to all GENERIC-like files
 1.122.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.122.6.1 12-Feb-2005  yamt sync with head.
 1.122.4.1 29-Apr-2005  kent sync with -current
 1.127.2.2 14-Aug-2005  riz Pull up revision 1.131 (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.127.2.1 18-Jul-2005  riz Pull up revision 1.130 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.129.2.5 21-Jan-2008  yamt sync with head
 1.129.2.4 15-Nov-2007  yamt sync with head.
 1.129.2.3 03-Sep-2007  yamt sync with head.
 1.129.2.2 30-Dec-2006  yamt sync with head.
 1.129.2.1 21-Jun-2006  yamt sync with head.
 1.140.4.1 09-Sep-2006  rpaulo sync with head
 1.140.2.1 18-Feb-2006  yamt sync with head.
 1.141.2.1 22-Apr-2006  simonb Sync with head.
 1.143.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.143.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.143.2.3 03-Sep-2006  yamt sync with head.
 1.143.2.2 11-Aug-2006  yamt sync with head
 1.143.2.1 01-Apr-2006  yamt sync with head.
 1.144.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.146.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.146.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.149.4.2 10-Dec-2006  yamt sync with head.
 1.149.4.1 22-Oct-2006  yamt sync with head
 1.149.2.1 18-Nov-2006  ad Sync with head.
 1.151.18.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.151.16.1 26-Jun-2007  garbled Sync with HEAD.
 1.151.10.1 11-Jul-2007  mjf Sync with head.
 1.151.8.2 03-Dec-2007  ad Sync with HEAD.
 1.151.8.1 09-Jun-2007  ad Sync with head.
 1.151.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.152.14.1 13-Nov-2007  bouyer Sync with HEAD
 1.152.10.2 09-Jan-2008  matt sync with HEAD
 1.152.10.1 06-Nov-2007  matt sync with HEAD
 1.152.8.1 04-Nov-2007  jmcneill Sync with HEAD.
 1.154.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.154.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.155.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.155.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.155.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.156.10.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.156.10.1 19-Oct-2008  haad Sync with HEAD.
 1.156.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.156.4.3 11-Aug-2010  yamt sync with head.
 1.156.4.2 11-Mar-2010  yamt sync with head
 1.156.4.1 04-May-2009  yamt sync with head.
 1.158.8.1 05-Feb-2010  matt Change to deal with new method of invoking softints. Remove mips/softintr.c
from config files. Fix SYMTAB_SPACE for WGT62V43
 1.158.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.158.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.162.4.3 21-Apr-2011  rmind sync with head
 1.162.4.2 05-Mar-2011  rmind sync with head
 1.162.4.1 30-May-2010  rmind sync with head
 1.162.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.162.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.166.4.2 05-Mar-2011  bouyer Sync with HEAD
 1.166.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.166.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.169.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.169.2.2 30-Oct-2012  yamt sync with head
 1.169.2.1 17-Apr-2012  yamt sync with head
 1.170.2.2 11-Mar-2012  mrg sync to latest -current
 1.170.2.1 18-Feb-2012  mrg merge to -current.
 1.173.2.4 03-Dec-2017  jdolecek update from HEAD
 1.173.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.173.2.2 23-Jun-2013  tls resync from head
 1.173.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.179.2.1 28-Aug-2013  rmind sync with head
 1.180.4.1 10-Aug-2014  tls Rebase.
 1.181.2.2 18-Nov-2014  snj Pull up following revision(s) (requested by manu in ticket #251):
sys/arch/acorn26/conf/GENERIC: revision 1.81
sys/arch/acorn32/conf/GENERIC: revision 1.116
sys/arch/alpha/conf/GENERIC: revision 1.362
sys/arch/amd64/conf/ALL: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.404
sys/arch/amd64/conf/XEN3_DOM0: revision 1.112
sys/arch/amd64/conf/XEN3_DOMU: revision 1.60
sys/arch/amiga/conf/GENERIC.in: revision 1.129
sys/arch/amiga/conf/GENERIC: revision 1.311
sys/arch/amigappc/conf/GENERIC: revision 1.24
sys/arch/arc/conf/GENERIC: revision 1.184
sys/arch/bebox/conf/GENERIC: revision 1.145
sys/arch/cats/conf/GENERIC: revision 1.155
sys/arch/cesfic/conf/GENERIC: revision 1.65
sys/arch/cobalt/conf/GENERIC: revision 1.147
sys/arch/dreamcast/conf/GENERIC: revision 1.121
sys/arch/emips/conf/GENERIC: revision 1.15
sys/arch/epoc32/conf/GENERIC: revision 1.8
sys/arch/ews4800mips/conf/GENERIC: revision 1.51
sys/arch/hp300/conf/GENERIC: revision 1.190
sys/arch/hpcmips/conf/GENERIC: revision 1.229
sys/arch/hpcsh/conf/GENERIC: revision 1.106
sys/arch/hppa/conf/GENERIC: revision 1.6
sys/arch/i386/conf/ALL: revision 1.389
sys/arch/i386/conf/GENERIC: revision 1.1118
sys/arch/i386/conf/XEN3_DOM0: revision 1.93
sys/arch/i386/conf/XEN3_DOMU: revision 1.65
sys/arch/ibmnws/conf/GENERIC: revision 1.46
sys/arch/iyonix/conf/GENERIC: revision 1.88
sys/arch/landisk/conf/GENERIC: revision 1.45
sys/arch/luna68k/conf/GENERIC: revision 1.119
sys/arch/mac68k/conf/GENERIC: revision 1.220
sys/arch/macppc/conf/GENERIC: revision 1.320
sys/arch/macppc/conf/MAMBO: revision 1.24
sys/arch/macppc/conf/POWERMAC_G5: revision 1.25
sys/arch/mipsco/conf/GENERIC: revision 1.88
sys/arch/mmeye/conf/GENERIC: revision 1.120
sys/arch/mvme68k/conf/GENERIC: revision 1.94
sys/arch/mvmeppc/conf/GENERIC: revision 1.24
sys/arch/netwinder/conf/GENERIC: revision 1.126
sys/arch/news68k/conf/GENERIC: revision 1.125
sys/arch/newsmips/conf/GENERIC: revision 1.129
sys/arch/next68k/conf/GENERIC: revision 1.139
sys/arch/ofppc/conf/GENERIC: revision 1.157
sys/arch/pmax/conf/GENERIC64: revision 1.21
sys/arch/pmax/conf/GENERIC: revision 1.185
sys/arch/prep/conf/GENERIC: revision 1.174
sys/arch/rs6000/conf/GENERIC: revision 1.33
sys/arch/sandpoint/conf/GENERIC: revision 1.88
sys/arch/sbmips/conf/GENERIC: revision 1.101
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.28
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.104
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.106
sys/arch/shark/conf/GENERIC: revision 1.121
sys/arch/sparc/conf/GENERIC: revision 1.248
sys/arch/sparc/conf/TADPOLE3GX: revision 1.65
sys/arch/sparc64/conf/GENERIC: revision 1.177
sys/arch/sparc64/conf/NONPLUS64: revision 1.44
sys/arch/sun2/conf/GENERIC: revision 1.94
sys/arch/sun3/conf/GENERIC: revision 1.171
sys/arch/vax/conf/GENERIC: revision 1.193
sys/arch/vax/conf/VAX780: revision 1.19
sys/arch/x68k/conf/GENERIC: revision 1.179
sys/arch/zaurus/conf/GENERIC: revision 1.65
sys/ufs/files.ufs: revision 1.38
Remove unused extended attributes kernel options

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

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.199.4.1 25-Jan-2020  ad Sync with head.
 1.199.2.1 21-Nov-2019  martin In preparation for the upcoming release, turn off DIAGNOSTIC in most
kernel configs, modules and libc.
 1.206.4.1 09-Oct-2023  snj Apply patch (requested by martin in ticket #401):
Disable DIAGNOSTIC/DEBUG.
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 14-Jan-1994  deraadt netbsd-ify
 1.2 14-Jan-1994  deraadt s/vmunix/netbsd/
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 14-Jan-1994  deraadt s/vmunix/netbsd/
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.7 30-Jan-1996  jonathan Remove config.old files for pmax. They should have been removed before
the NetBSD-1.1 release, as they have not worked or been supported for
some time.
 1.6 18-Jul-1995  jonathan Add "cpu DS5000_240" to generic config, to support 3max+.
3max+ interrupt handler and IOASIC clock code depend on it.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 22-Jun-1994  glass ultrix compat by default
 1.3 21-Jun-1994  glass oops
 1.2 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.1 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 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:20:15 +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.38 19-Mar-2025  jakllsch Remove last traces of 'options LKM' from kernel config files.
 1.37 21-Sep-2024  andvar enable DIAGNOSTIC by default for pmax GENERIC64 kernel config.
remvoe extra ` symbol in comment.
 1.36 07-Aug-2022  simonb branches: 1.36.10;
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.35 27-Sep-2020  roy vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.34 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.33 20-Jan-2020  thorpej Remove FDDI support.
 1.32 26-Apr-2019  sevan branches: 1.32.4;
typo
 1.31 26-Apr-2019  sevan Enable BUFQ_PRIOCSCAN, CARP, Veriexec
 1.30 13-Apr-2019  isaki Add drvctl to kernel which has audio device.
audiocfg(1) requires drvctl(4).
 1.29 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.28 23-Jan-2018  sevan branches: 1.28.2; 1.28.4;
Alternate buffer queue strategies no longer considered experimental, update
description.

Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.27 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.26 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.25 28-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.24 13-Dec-2016  christos branches: 1.24.8;
wildcard speaker attachments, now that we can handle many of them.
 1.23 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.22 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.21 16-Nov-2014  manu branches: 1.21.2; 1.21.4;
Remove unused extended attributes kernel options

As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
 1.20 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.19 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.18 20-Jul-2014  alnsn branches: 1.18.2;
Add commented out bpfjit options to mips kernels.
While here, add 2 missing RCS ids.
 1.17 30-Jun-2013  rmind branches: 1.17.4;
G/C PFIL_HOOKS from the kernel configs.
 1.16 05-Jun-2013  christos branches: 1.16.2;
remove obsolete networking options
 1.15 27-Apr-2013  christos the bogus number police
 1.14 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.13 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.12 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.11 17-Aug-2012  abs branches: 1.11.2;
Update all kernel configs mentioning WSEMUL_* but not already including
WSDISPLAY_COMPAT_USL using the following rules:
- If WSEMUL_ is commented out, add commented out out WSDISPLAY_COMPAT_USL
- If INSTALL or obviously memory constrained, add WSDISPLAY_DEFAULTSCREENS=1
and commented out WSDISPLAY_COMPAT_USL
- Otherwise add WSDISPLAY_COMPAT_USL

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

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

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

On 5 June 2012 09:47, David Brownlee <abs@absd.org> wrote:
> wsconscfg(8) requires WSDISPLAY_COMPAT_USL in order to switch virtual
> terminals.
>
> Except when in an exceptionally memory or space constrained
> environment (INSTALL being the obvious case), is there any reason why
> all GENERIC and GENERIC-like kernels which have wscons enabled
> shouldn't also have WSDISPLAY_COMPAT_USL?
 1.10 10-Mar-2012  joerg P1003_1B_SEMAPHORE is no longer optional.
 1.9 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.8 22-Nov-2011  tls branches: 1.8.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.7 30-Jun-2011  wiz branches: 1.7.2;
dependant -> dependent
 1.6 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.5 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.4 29-Apr-2010  chs branches: 1.4.2; 1.4.4;
enable TMPFS in all GENERICs that have MFS enabled.
 1.3 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.2 14-Dec-2009  matt branches: 1.2.2; 1.2.4; 1.2.6;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.1 08-Sep-2009  matt branches: 1.1.2;
file GENERIC64 was initially added on branch matt-nb5-mips64.
 1.1.2.2 29-Dec-2010  matt Add 3max (since you can use 3am + R4400 to test LP64 kernels in gxemul)
 1.1.2.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.2.6.3 21-Apr-2011  rmind sync with head
 1.2.6.2 05-Mar-2011  rmind sync with head
 1.2.6.1 30-May-2010  rmind sync with head
 1.2.4.3 11-Aug-2010  yamt sync with head.
 1.2.4.2 11-Mar-2010  yamt sync with head
 1.2.4.1 14-Dec-2009  yamt file GENERIC64 was added on branch yamt-nfs-mp on 2010-03-11 15:02:48 +0000
 1.2.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.2.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.4.4.2 05-Mar-2011  bouyer Sync with HEAD
 1.4.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.4.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.7.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.7.2.2 30-Oct-2012  yamt sync with head
 1.7.2.1 17-Apr-2012  yamt sync with head
 1.8.2.2 11-Mar-2012  mrg sync to latest -current
 1.8.2.1 18-Feb-2012  mrg merge to -current.
 1.11.2.3 03-Dec-2017  jdolecek update from HEAD
 1.11.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.2.1 23-Jun-2013  tls resync from head
 1.16.2.1 28-Aug-2013  rmind sync with head
 1.17.4.1 10-Aug-2014  tls Rebase.
 1.18.2.2 18-Nov-2014  snj Pull up following revision(s) (requested by manu in ticket #251):
sys/arch/acorn26/conf/GENERIC: revision 1.81
sys/arch/acorn32/conf/GENERIC: revision 1.116
sys/arch/alpha/conf/GENERIC: revision 1.362
sys/arch/amd64/conf/ALL: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.404
sys/arch/amd64/conf/XEN3_DOM0: revision 1.112
sys/arch/amd64/conf/XEN3_DOMU: revision 1.60
sys/arch/amiga/conf/GENERIC.in: revision 1.129
sys/arch/amiga/conf/GENERIC: revision 1.311
sys/arch/amigappc/conf/GENERIC: revision 1.24
sys/arch/arc/conf/GENERIC: revision 1.184
sys/arch/bebox/conf/GENERIC: revision 1.145
sys/arch/cats/conf/GENERIC: revision 1.155
sys/arch/cesfic/conf/GENERIC: revision 1.65
sys/arch/cobalt/conf/GENERIC: revision 1.147
sys/arch/dreamcast/conf/GENERIC: revision 1.121
sys/arch/emips/conf/GENERIC: revision 1.15
sys/arch/epoc32/conf/GENERIC: revision 1.8
sys/arch/ews4800mips/conf/GENERIC: revision 1.51
sys/arch/hp300/conf/GENERIC: revision 1.190
sys/arch/hpcmips/conf/GENERIC: revision 1.229
sys/arch/hpcsh/conf/GENERIC: revision 1.106
sys/arch/hppa/conf/GENERIC: revision 1.6
sys/arch/i386/conf/ALL: revision 1.389
sys/arch/i386/conf/GENERIC: revision 1.1118
sys/arch/i386/conf/XEN3_DOM0: revision 1.93
sys/arch/i386/conf/XEN3_DOMU: revision 1.65
sys/arch/ibmnws/conf/GENERIC: revision 1.46
sys/arch/iyonix/conf/GENERIC: revision 1.88
sys/arch/landisk/conf/GENERIC: revision 1.45
sys/arch/luna68k/conf/GENERIC: revision 1.119
sys/arch/mac68k/conf/GENERIC: revision 1.220
sys/arch/macppc/conf/GENERIC: revision 1.320
sys/arch/macppc/conf/MAMBO: revision 1.24
sys/arch/macppc/conf/POWERMAC_G5: revision 1.25
sys/arch/mipsco/conf/GENERIC: revision 1.88
sys/arch/mmeye/conf/GENERIC: revision 1.120
sys/arch/mvme68k/conf/GENERIC: revision 1.94
sys/arch/mvmeppc/conf/GENERIC: revision 1.24
sys/arch/netwinder/conf/GENERIC: revision 1.126
sys/arch/news68k/conf/GENERIC: revision 1.125
sys/arch/newsmips/conf/GENERIC: revision 1.129
sys/arch/next68k/conf/GENERIC: revision 1.139
sys/arch/ofppc/conf/GENERIC: revision 1.157
sys/arch/pmax/conf/GENERIC64: revision 1.21
sys/arch/pmax/conf/GENERIC: revision 1.185
sys/arch/prep/conf/GENERIC: revision 1.174
sys/arch/rs6000/conf/GENERIC: revision 1.33
sys/arch/sandpoint/conf/GENERIC: revision 1.88
sys/arch/sbmips/conf/GENERIC: revision 1.101
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.28
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.104
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.106
sys/arch/shark/conf/GENERIC: revision 1.121
sys/arch/sparc/conf/GENERIC: revision 1.248
sys/arch/sparc/conf/TADPOLE3GX: revision 1.65
sys/arch/sparc64/conf/GENERIC: revision 1.177
sys/arch/sparc64/conf/NONPLUS64: revision 1.44
sys/arch/sun2/conf/GENERIC: revision 1.94
sys/arch/sun3/conf/GENERIC: revision 1.171
sys/arch/vax/conf/GENERIC: revision 1.193
sys/arch/vax/conf/VAX780: revision 1.19
sys/arch/x68k/conf/GENERIC: revision 1.179
sys/arch/zaurus/conf/GENERIC: revision 1.65
sys/ufs/files.ufs: revision 1.38
Remove unused extended attributes kernel options

As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
 1.18.2.1 14-Nov-2014  martin Pull up following revision(s) (requested by manu in ticket #232):
sys/arch/next68k/conf/GENERIC: revision 1.138
sys/arch/cobalt/conf/GENERIC: revision 1.146
sys/arch/mvme68k/conf/GENERIC: revision 1.93
sys/arch/vax/conf/VAX780: revision 1.18
sys/arch/newsmips/conf/GENERIC: revision 1.128
sys/arch/luna68k/conf/GENERIC: revision 1.118
sys/arch/sbmips/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.184
sys/arch/alpha/conf/GENERIC: revision 1.361
sys/arch/sparc64/conf/GENERIC: revision 1.176
sys/arch/sun3/conf/GENERIC: revision 1.170
sys/arch/shark/conf/GENERIC: revision 1.120
sys/arch/landisk/conf/GENERIC: revision 1.44
sys/arch/bebox/conf/GENERIC: revision 1.144
sys/arch/sparc64/conf/NONPLUS64: revision 1.43
sys/arch/sandpoint/conf/GENERIC: revision 1.87
sys/arch/emips/conf/GENERIC: revision 1.14
sys/arch/amd64/conf/XEN3_DOM0: revision 1.111
sys/arch/dreamcast/conf/GENERIC: revision 1.120
sys/arch/cesfic/conf/GENERIC: revision 1.64
sys/arch/mmeye/conf/GENERIC: revision 1.119
sys/arch/epoc32/conf/GENERIC: revision 1.7
sys/arch/x68k/conf/GENERIC: revision 1.178
sys/arch/iyonix/conf/GENERIC: revision 1.87
sys/arch/sun2/conf/GENERIC: revision 1.93
sys/arch/ews4800mips/conf/GENERIC: revision 1.50
sys/arch/amd64/conf/XEN3_DOMU: revision 1.59
sys/arch/acorn26/conf/GENERIC: revision 1.80
sys/arch/acorn32/conf/GENERIC: revision 1.115
sys/arch/macppc/conf/POWERMAC_G5: revision 1.24
sys/arch/i386/conf/GENERIC: revision 1.1117
sys/arch/arc/conf/GENERIC: revision 1.183
sys/arch/cats/conf/GENERIC: revision 1.154
sys/arch/amiga/conf/GENERIC.in: revision 1.128
sys/arch/zaurus/conf/GENERIC: revision 1.64
sys/arch/netwinder/conf/GENERIC: revision 1.125
sys/arch/hppa/conf/GENERIC: revision 1.5
sys/arch/mvmeppc/conf/GENERIC: revision 1.23
sys/arch/macppc/conf/GENERIC: revision 1.319
sys/arch/amiga/conf/GENERIC: revision 1.310
sys/arch/pmax/conf/GENERIC64: revision 1.20
sys/arch/macppc/conf/MAMBO: revision 1.23
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.27
sys/arch/amigappc/conf/GENERIC: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.403
sys/arch/ofppc/conf/GENERIC: revision 1.156
sys/arch/mac68k/conf/GENERIC: revision 1.219
sys/arch/i386/conf/XEN3_DOMU: revision 1.64
sys/arch/mipsco/conf/GENERIC: revision 1.87
sys/arch/hp300/conf/GENERIC: revision 1.189
sys/arch/vax/conf/GENERIC: revision 1.192
sys/arch/news68k/conf/GENERIC: revision 1.124
sys/arch/ibmnws/conf/GENERIC: revision 1.45
sys/arch/hpcsh/conf/GENERIC: revision 1.105
sys/arch/sparc/conf/TADPOLE3GX: revision 1.64
sys/arch/i386/conf/XEN3_DOM0: revision 1.92
sys/arch/sparc/conf/GENERIC: revision 1.247
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.105
sys/arch/prep/conf/GENERIC: revision 1.173
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.103
sys/arch/rs6000/conf/GENERIC: revision 1.32
sys/arch/hpcmips/conf/GENERIC: revision 1.228
Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels
This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr
Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
 1.21.4.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.21.2.2 28-Aug-2017  skrll Sync with HEAD
 1.21.2.1 05-Feb-2017  skrll Sync with HEAD
 1.24.8.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.28.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.28.4.1 10-Jun-2019  christos Sync with HEAD
 1.28.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.32.4.1 25-Jan-2020  ad Sync with head.
 1.36.10.1 02-Aug-2025  perseant Sync with HEAD
 1.2 06-Feb-2019  rin Add ure(4) to kernel config files. Also add PHY drivers where necessary.
 1.1 04-Nov-2016  flxd branches: 1.1.2; 1.1.4; 1.1.18; 1.1.22;
Add new USB-enabled kernel config(s) based upon GENERIC for pmax, include it as kernel set in the build and make it a choice in sysinst.
OK simonb@
 1.1.22.1 10-Jun-2019  christos Sync with HEAD
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 04-Nov-2016  jdolecek file GENERIC64_USB was added on branch tls-maxphys on 2017-12-03 11:36:35 +0000
 1.1.4.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.4.1 04-Nov-2016  pgoyette file GENERIC64_USB was added on branch pgoyette-localcount on 2017-01-07 08:56:23 +0000
 1.1.2.2 05-Dec-2016  skrll Sync with HEAD
 1.1.2.1 04-Nov-2016  skrll file GENERIC64_USB was added on branch nick-nhusb on 2016-12-05 10:54:56 +0000
 1.2 06-Feb-2019  rin Add ure(4) to kernel config files. Also add PHY drivers where necessary.
 1.1 04-Nov-2016  flxd branches: 1.1.2; 1.1.4; 1.1.18; 1.1.22;
Add new USB-enabled kernel config(s) based upon GENERIC for pmax, include it as kernel set in the build and make it a choice in sysinst.
OK simonb@
 1.1.22.1 10-Jun-2019  christos Sync with HEAD
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 04-Nov-2016  jdolecek file GENERIC_USB was added on branch tls-maxphys on 2017-12-03 11:36:35 +0000
 1.1.4.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.4.1 04-Nov-2016  pgoyette file GENERIC_USB was added on branch pgoyette-localcount on 2017-01-07 08:56:23 +0000
 1.1.2.2 05-Dec-2016  skrll Sync with HEAD
 1.1.2.1 04-Nov-2016  skrll file GENERIC_USB was added on branch nick-nhusb on 2016-12-05 10:54:56 +0000
 1.4 30-Jan-1996  jonathan Remove config.old files for pmax. They should have been removed before
the NetBSD-1.1 release, as they have not worked or been supported for
some time.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 15-Jun-1994  glass much works but untested w/new fs. expect more tomorrow
 1.1 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.75 20-Jan-2020  thorpej Remove FDDI support.
 1.74 13-Dec-2016  christos branches: 1.74.16; 1.74.22;
wildcard speaker attachments, now that we can handle many of them.
 1.73 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.72 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.71 20-Jul-2014  alnsn branches: 1.71.4; 1.71.8;
Add commented out bpfjit options to mips kernels.
While here, add 2 missing RCS ids.
 1.70 27-Apr-2013  christos branches: 1.70.8;
remove confusing numeric locators where they are unused.
 1.69 17-Aug-2012  abs branches: 1.69.2;
Update all kernel configs mentioning WSEMUL_* but not already including
WSDISPLAY_COMPAT_USL using the following rules:
- If WSEMUL_ is commented out, add commented out out WSDISPLAY_COMPAT_USL
- If INSTALL or obviously memory constrained, add WSDISPLAY_DEFAULTSCREENS=1
and commented out WSDISPLAY_COMPAT_USL
- Otherwise add WSDISPLAY_COMPAT_USL

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

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

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

On 5 June 2012 09:47, David Brownlee <abs@absd.org> wrote:
> wsconscfg(8) requires WSDISPLAY_COMPAT_USL in order to switch virtual
> terminals.
>
> Except when in an exceptionally memory or space constrained
> environment (INSTALL being the obvious case), is there any reason why
> all GENERIC and GENERIC-like kernels which have wscons enabled
> shouldn't also have WSDISPLAY_COMPAT_USL?
 1.68 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.67 22-Nov-2011  tls branches: 1.67.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.66 16-Apr-2010  pooka branches: 1.66.8;
Remove unused count (invariably "4") from pseudo-device fss.
 1.65 12-Nov-2008  ad branches: 1.65.6; 1.65.8;
Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.64 31-Jul-2008  simonb branches: 1.64.2;
Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.63 29-Dec-2006  yamt branches: 1.63.44; 1.63.48; 1.63.50; 1.63.54;
update comments on NFS_V2_ONLY after nqnfs removal. no functional changes.
from Arnaud Lacombe.
 1.62 02-Oct-2006  chs remove MALLOC_NOINLINE, it doesn't do anything anymore.
 1.61 29-Jul-2006  ad branches: 1.61.4; 1.61.6;
Remove RASTERCONSOLE support from the pmax port.
 1.60 04-Feb-2006  rpaulo branches: 1.60.2;
bpfilter doesn't accept count anymore.
 1.59 07-Dec-2005  tsutsui branches: 1.59.2; 1.59.4; 1.59.6;
Remove obsolete options VNODE_OP_NOINLINE.
 1.58 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.57 07-Oct-2005  tsutsui options<space><tab>
 1.56 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.55 18-Feb-2005  dsl branches: 1.55.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.54 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.53 15-Jul-2004  atatat branches: 1.53.4; 1.53.6;
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.52 13-Dec-2003  ad branches: 1.52.2;
Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.51 25-Oct-2003  simonb Add COMPAT_16 where missing.
Remove the unused COMPAT_15.
Comment out/remove COMPAT_* from INSTALL kernels.
 1.50 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.49 10-Apr-2003  christos branches: 1.49.2;
Bye Bye UCONSOLE
 1.48 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.47 08-Aug-2002  ad Replace FONT_LUCIDA with FONT_GALLANT.
 1.46 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.45 25-Apr-2002  atatat branches: 1.45.2; 1.45.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.44 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.43 27-Jan-2002  jdolecek branches: 1.43.6;
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.42 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.41 26-Aug-2001  simonb branches: 1.41.6;
Switch to MI SCSI and drop old pmax MD SCSI support completely.
 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 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.38 25-Sep-2000  simonb Reenable VNODE_OP_NOINLINE, and some white space nits.
 1.37 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.36 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.35 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.34 16-Sep-2000  simonb Use VNODE_OP_NOINLINE - saves about 17k off the INSTALL kernel size.
 1.33 13-Sep-2000  nisimura Have MI SCSI device descriptions in GENERIC, removing 'mi.scsi' file.
 1.32 28-May-2000  gmcgarry Substitute bba for isdn placeholder.
 1.31 19-Feb-2000  nisimura branches: 1.31.2;
Introduce MI SCSI codes; for DECstation 5000s only this moment.
Disabled by default and needs arrangements in conf file to use it.
See DS5000 as a sample.
 1.30 12-Feb-2000  thorpej Nuke NKMEMCLUSTERS.
 1.29 09-Jan-2000  ad s/4(..)bsd/4$1BSD/
 1.28 31-Dec-1999  ad Comment px0 entry a little more accurately.
 1.27 09-Dec-1999  simonb Enable DECsystem 5100 support.
 1.26 25-Nov-1999  nisimura Reorder device descriptions to reflect what kernel shows on screen,
mostly in address ascending order.
 1.25 24-Nov-1999  thorpej Specify the locators for everything.
 1.24 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.23 29-Jul-1999  augustss branches: 1.23.2; 1.23.8;
It's time to be COMPAT_14.
 1.22 28-May-1999  simonb Add CD9660 filesystem - useful for installing from CD-ROMs :-)
 1.21 26-Apr-1999  ad Fixed to match rasops config glue.
 1.20 20-Apr-1999  simonb Add NFS_BOOT_DHCP so that netboot kernels can find the root filesystem.
 1.19 13-Apr-1999  ad Add configuration glue needed by rasops, wsfont, rcons and the px driver.
 1.18 28-Mar-1999  simonb branches: 1.18.2;
Use COPTS="-Os -mmemcpy" for INSTALL kernels - saves ~15kB in text.
 1.17 28-Mar-1999  simonb Also comment out inclusion of "builtin.5100" to stop pulling in 5100
devices.
 1.16 27-Mar-1999  simonb Disable 5100's for now - it doesn't work yet, so we may as save a little
bit of space...
 1.15 27-Nov-1998  simonb fix another white space botch
 1.14 27-Nov-1998  simonb White space and comment formatting police
 1.13 26-Jul-1998  simonb branches: 1.13.4;
Add mainbus0 and cpu definitions, remove extra DS_5100 option.
 1.12 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.11 19-Apr-1998  jonathan Garbage collect obsolete motherboard options from non-GENERIC kernels.
Add "ibus" to configs with 3100 support.
 1.10 01-Dec-1997  kleink Add COMPAT_13.
 1.9 20-Oct-1997  jonathan Merge MINIROOT and NFSINSTALL into a single INSTALL config file,
with config lines for both root-on-disk and root-on-NFS.
 1.8 20-Oct-1997  jonathan Add "options COMPAT_12".
 1.7 20-Aug-1997  jonathan consistent whitespace after "options".
 1.6 22-Jul-1997  jonathan branches: 1.6.2;
Merge NFSROOT and NFSINSTALL.
 1.5 26-Apr-1997  jonathan Add "options MIPS1" and delete commented-out lines inherited from GENERIC.
 1.4 31-Jan-1997  thorpej Update for new file system and root spec grammar.
 1.3 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.2 16-Nov-1996  jonathan branches: 1.2.2;
Move non-optional "options" SWAPPAGER, VNODEPAGER, DEVPAGER to std.pmax
 1.1 13-Oct-1996  jonathan Kernel configuration file to build kernels for installing on diskful
machines, using diskless-boot (NFS root) as the installation method.

Many options turned off to keep kernel small and avoid boot-PROM errors.
 1.2.2.2 18-Jan-1997  thorpej Update from trunk.
 1.2.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.6.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.13.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.18.2.3 21-Jun-1999  perry pullup 1.21->1.22 (simonb): Add ISO 9660 fs -- needed for CD-ROM installs
 1.18.2.2 21-Apr-1999  cjs branches: 1.18.2.2.2; 1.18.2.2.4;
Tweak to fix previous pullup, which I mucked up.
 1.18.2.1 20-Apr-1999  cjs Pull up HEAD diffs between 1.19 and 1.20 (others left behind), per
Simon Burge <simonb@netbsd.org>
 1.18.2.2.4.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

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

synchronization to latest KAME will take place on HEAD branch soon.
 1.18.2.2.2.2 02-Aug-1999  thorpej Update from trunk.
 1.18.2.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.23.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.31.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 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.41.6.8 18-Oct-2002  nathanw Catch up to -current.
 1.41.6.7 13-Aug-2002  nathanw Catch up to -current.
 1.41.6.6 01-Aug-2002  nathanw Catch up to -current.
 1.41.6.5 20-Jun-2002  nathanw Catch up to -current.
 1.41.6.4 17-Apr-2002  nathanw Catch up to -current.
 1.41.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.41.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.41.6.1 26-Aug-2001  nathanw file INSTALL was added on branch nathanw_sa on 2002-01-08 00:27:04 +0000
 1.43.6.2 16-Mar-2002  ad Sanitize.
 1.43.6.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.45.4.1 09-Aug-2002  lukem Pull up revision 1.47 (requested by ad in ticket #644):
Replace FONT_LUCIDA with FONT_GALLANT.
 1.45.2.2 31-Aug-2002  gehenna catch up with -current.
 1.45.2.1 16-Jul-2002  gehenna catch up with -current.
 1.49.2.7 11-Dec-2005  christos Sync with head.
 1.49.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.49.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.49.2.4 04-Feb-2005  skrll Sync with HEAD.
 1.49.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.49.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.49.2.1 03-Aug-2004  skrll Sync with HEAD
 1.52.2.1 15-Jul-2004  he Pull up revision 1.53 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.53.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.53.6.1 12-Feb-2005  yamt sync with head.
 1.53.4.1 29-Apr-2005  kent sync with -current
 1.55.6.2 30-Dec-2006  yamt sync with head.
 1.55.6.1 21-Jun-2006  yamt sync with head.
 1.59.6.1 22-Apr-2006  simonb Sync with head.
 1.59.4.1 09-Sep-2006  rpaulo sync with head
 1.59.2.1 18-Feb-2006  yamt sync with head.
 1.60.2.1 11-Aug-2006  yamt sync with head
 1.61.6.1 22-Oct-2006  yamt sync with head
 1.61.4.2 12-Jan-2007  ad Sync with head.
 1.61.4.1 18-Nov-2006  ad Sync with head.
 1.63.54.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.63.54.1 19-Oct-2008  haad Sync with HEAD.
 1.63.50.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.63.48.2 11-Aug-2010  yamt sync with head.
 1.63.48.1 04-May-2009  yamt sync with head.
 1.63.44.2 17-Jan-2009  mjf Sync with HEAD.
 1.63.44.1 28-Sep-2008  mjf Sync with HEAD.
 1.64.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.65.8.1 30-May-2010  rmind sync with head
 1.65.6.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.66.8.3 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.66.8.2 30-Oct-2012  yamt sync with head
 1.66.8.1 17-Apr-2012  yamt sync with head
 1.67.2.1 18-Feb-2012  mrg merge to -current.
 1.69.2.3 03-Dec-2017  jdolecek update from HEAD
 1.69.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.69.2.1 23-Jun-2013  tls resync from head
 1.70.8.1 10-Aug-2014  tls Rebase.
 1.71.8.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.71.4.1 05-Feb-2017  skrll Sync with HEAD
 1.74.22.1 25-Jan-2020  ad Sync with head.
 1.74.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.13 19-Mar-2025  jakllsch Remove last traces of 'options LKM' from kernel config files.
 1.12 20-Jan-2020  thorpej branches: 1.12.30;
Remove FDDI support.
 1.11 13-Dec-2016  christos branches: 1.11.16; 1.11.22;
wildcard speaker attachments, now that we can handle many of them.
 1.10 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.9 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.8 20-Jul-2014  alnsn branches: 1.8.4; 1.8.8;
Add commented out bpfjit options to mips kernels.
While here, add 2 missing RCS ids.
 1.7 27-Apr-2013  christos branches: 1.7.8;
remove confusing numeric locators where they are unused.
 1.6 17-Aug-2012  abs branches: 1.6.2;
Update all kernel configs mentioning WSEMUL_* but not already including
WSDISPLAY_COMPAT_USL using the following rules:
- If WSEMUL_ is commented out, add commented out out WSDISPLAY_COMPAT_USL
- If INSTALL or obviously memory constrained, add WSDISPLAY_DEFAULTSCREENS=1
and commented out WSDISPLAY_COMPAT_USL
- Otherwise add WSDISPLAY_COMPAT_USL

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

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

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

On 5 June 2012 09:47, David Brownlee <abs@absd.org> wrote:
> wsconscfg(8) requires WSDISPLAY_COMPAT_USL in order to switch virtual
> terminals.
>
> Except when in an exceptionally memory or space constrained
> environment (INSTALL being the obvious case), is there any reason why
> all GENERIC and GENERIC-like kernels which have wscons enabled
> shouldn't also have WSDISPLAY_COMPAT_USL?
 1.5 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.4 22-Nov-2011  tls branches: 1.4.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.3 16-Apr-2010  pooka branches: 1.3.8;
Remove unused count (invariably "4") from pseudo-device fss.
 1.2 14-Dec-2009  matt branches: 1.2.2; 1.2.4; 1.2.6;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.1 08-Sep-2009  matt branches: 1.1.2;
file INSTALL64 was initially added on branch matt-nb5-mips64.
 1.1.2.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.2.6.1 30-May-2010  rmind sync with head
 1.2.4.3 11-Aug-2010  yamt sync with head.
 1.2.4.2 11-Mar-2010  yamt sync with head
 1.2.4.1 14-Dec-2009  yamt file INSTALL64 was added on branch yamt-nfs-mp on 2010-03-11 15:02:48 +0000
 1.2.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.3.8.3 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.8.2 30-Oct-2012  yamt sync with head
 1.3.8.1 17-Apr-2012  yamt sync with head
 1.4.2.1 18-Feb-2012  mrg merge to -current.
 1.6.2.3 03-Dec-2017  jdolecek update from HEAD
 1.6.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.2.1 23-Jun-2013  tls resync from head
 1.7.8.1 10-Aug-2014  tls Rebase.
 1.8.8.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.8.4.1 05-Feb-2017  skrll Sync with HEAD
 1.11.22.1 25-Jan-2020  ad Sync with head.
 1.11.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.12.30.1 02-Aug-2025  perseant Sync with HEAD
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 14-Jan-1994  deraadt netbsd-ify
 1.2 14-Jan-1994  deraadt s/vmunix/netbsd/
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 14-Jan-1994  deraadt netbsd-ify
 1.2 14-Jan-1994  deraadt s/vmunix/netbsd/
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.8 20-Oct-1997  jonathan Merge MINIROOT and NFSINSTALL into a single INSTALL config file,
with config lines for both root-on-disk and root-on-NFS.
 1.7 20-Aug-1997  jonathan update based on NFSINSTALL.
 1.6 31-Jan-1997  thorpej branches: 1.6.8;
Update for new file system and root spec grammar.
 1.5 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.4 03-Dec-1996  cgd branches: 1.4.2;
Fix up includes so that up-to-date versions of 'config' can be used
to config pmax kernels. Not all kernels can actually be config'd because
of device declaration problems, but i don't know how to fix those.
 1.3 16-Nov-1996  jonathan Move non-optional "options" SWAPPAGER, VNODEPAGER, DEVPAGER to std.pmax
 1.2 26-Aug-1996  mrg add COMPAT_12.
 1.1 28-Dec-1995  jonathan Config file used to build pmax kernels in NetBSD/1.1
miniroots, from Arne Juul (arnej@pvv.unit.no).
(like NEWCONF, except with options GENERIC)
 1.4.2.2 18-Jan-1997  thorpej Update from trunk.
 1.4.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.6.8.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.82 03-Dec-2000  simonb Use shared Makefile.mips
 1.81 21-May-2000  soren Also share BE ldscripts.
 1.80 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.79 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.78 01-Feb-2000  tsutsui Revert STRIPPROG -> STRIP
 1.77 24-Jan-2000  tron Add "dependall" target for comfort.
 1.76 19-Jan-2000  tsutsui STRIP -> STRIPPROG
 1.75 26-Jul-1999  cgd branches: 1.75.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.74 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.73 02-Jul-1999  tv -Wuninitialized is not used in the NetBSD tree, explicitly.
 1.72 25-Apr-1999  simonb pmax kernels now compile with -Wuninitialized.
 1.71 06-Apr-1999  simonb Don't build a.out kernels anymore.
 1.70 27-Mar-1999  simonb branches: 1.70.2;
Remove trailing white-space.
 1.69 25-Mar-1999  simonb Change multiple spaces to tabs.
 1.68 15-Mar-1999  mrg delete netbsd.aout and netbsd.ecoff in "make clean"
 1.67 15-Jan-1999  thorpej Some minor, mostly costmetic, changes to CPPFLAGS/CFLAGS.
 1.66 15-Jan-1999  castor add support for locore_mips[13].S
 1.65 08-Jan-1999  augustss Add -Wpointer-arith warning since `void *' arithmetic is not ANSI C.
 1.64 27-Nov-1998  simonb Don't do a mkdep on SFILES if it is empty. Stops an annoying:
cc: Warning: `-x assembler-with-cpp' after last input file has no effect
cc: No input files
message.
 1.63 27-Nov-1998  simonb White space and comment formatting police
 1.62 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.61 05-Sep-1998  lukem branches: 1.61.2;
distclean is a synonym for cleandir
 1.60 04-Aug-1998  jonathan Add missing "-a" to mkdep line for pmax locore_machdep.S.
From Noriyuki Soda.
 1.59 31-May-1998  thorpej Specify a non-profiling C rule.
 1.58 19-Apr-1998  jonathan Add -D__pmax__. Leave -Dpmax until all uses changed to __pmax__.
 1.57 19-Apr-1998  jonathan Add dependencies on Makefile for SYSVSHM, SYSVIPC options.
 1.56 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.55 03-Mar-1998  thorpej Make this work with DEBUG="-g"
 1.54 12-Nov-1997  thorpej Make sure CPP, AR, AS, and RANLIB are defined.
 1.53 12-Nov-1997  thorpej Define LORDER, NM, and TSORT here, like we do the rest of the tools.
 1.52 08-Oct-1997  thorpej branches: 1.52.2;
The MIPS toolchain generates ELF. Don't pretend like it generates a.out
by renaming "netbsd" to "netbsd.elf", and then creating an a.out image
called "netbsd".

Instead, create _both_ ECOFF and a.out versions of the kernels, named
"netbsd.ecoff" and "netbsd.aout" respectively, and drop the ".elf"
from the ELF kernel.

(And, with any luck, the a.out hack will go away completely Very Soon.)
 1.51 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.50 12-Jul-1997  leo branches: 1.50.2;
Generate assym.h dependencies when making 'depend'.
 1.49 23-Jun-1997  jonathan Set kernel text start address in port-specific Makefile, not ldscript.
 1.48 15-Jun-1997  mhitch Since locore_r2000.S and locore_r4000.S are included by locore.S, they need
to be included in the dependency list for locore.o.
 1.47 15-Jun-1997  jonathan Turn on -Wall -Weror and -Wstrict-prototypes -Wmissing-prototypes.

Turn off warnings for uninitialized variables to avoid spurious warnings.
 1.46 24-May-1997  jonathan Use a ldscript to work around `features' (not enough section headers)
when linking kernels with GNU binutils-2.7 or newer ld.
 1.45 26-Apr-1997  jonathan Ted Lemon's (RR 3540) cross-compilation patch: use ${SIZE} instead of size,
Also add "SIZE=? size", so that native kernel compiles work, too.
 1.44 16-Mar-1997  jonathan Use genassym.sh script to make assym.h, for cross-compiling.
Remove dependencies on genassym.
 1.43 05-Mar-1997  jonathan Build kernel object files with -mno-abicalls and -mno-half-pic. (The
kernel doesn't support GP-relative addressing, and is statically linked).

Compile genassym without those flags: -mno-abicalls will make it coredump.
 1.42 04-Feb-1997  perry branches: 1.42.4;
Nuke some options GENERIC residue.
 1.41 04-Feb-1997  perry Nuke some GENERIC residue.
 1.40 03-Feb-1997  thorpej Update clean and depend rule for kernel make changes.
 1.39 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.
 1.38 22-Nov-1996  jonathan Add KERNLD hook to allow overriding the LD used to link kernels.
Set KERNLD to ld.old. gcc binutils 2.7 gets an assert error linking kernels.
 1.37 30-Sep-1996  jonathan Build and link in locore_machdep.S.
 1.36 25-Sep-1996  jonathan Build locore using merged mips (mips1, mips3) locore source:
* Add MIPS make variable pointing at $S/arch/mips
* Build locore from $MIPS/mips locore source
* Build locore.o and fp.o (fp emulation) from arch/mips locore source
* Add target and rules to build pmax-specific locore code locore_machdep.o
from $PMAX/pmax/lcore_machdep.S
 1.35 25-Sep-1996  jonathan Back out part of revision 1.30:

>* Use `-S' rather than `-x' to remove debugging symbols.

because the pmax toolchain and gcc disagree about what is a "local"
symbol, and ld requires a "-x" to let elf2aout build bootable a.out kernels.
 1.34 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.33 31-Aug-1996  mycroft Wrap the default definition of `S' in `.ifndef'.
 1.32 12-Aug-1996  mycroft Put into . Remove hooks for `config-dependent' and
`device-driver' flags.
 1.31 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.30 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.29 19-May-1996  mhitch Also use genassym.c from sys/arch/mips/mips for make depend.
 1.28 19-May-1996  jonathan Use genassym.c from sys/arch/mips/mips.
 1.27 11-May-1996  mycroft Make `make depend' work for libraries.
 1.26 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.25 26-Feb-1996  mycroft Define build programs with `?=', so they can be overridden with `makeoptions'.
 1.24 09-Feb-1996  mycroft Fix mkdep problems due to missing flags.
 1.23 04-Feb-1996  jonathan A semicolon was missing from the SYSTEM_LD_TAIL stanza that converts
from elf to netbsd a.out, causing the mv to fail; add one.
 1.22 03-Feb-1996  mycroft Use `-traditional-cpp' when building .s and .S files.
 1.21 02-Feb-1996  mycroft Clone these, and fix many bugs.
 1.20 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.19 14-Jan-1996  thorpej Remove vnode_if.[ch] during a "make clean", per PR#536 from
Dan Carosone <danielce@ee.mu.oz.au>.
 1.18 17-Dec-1995  jonathan Fix cross-compilation bug: native architecture is "pmax", not "mips".
 1.17 25-Nov-1995  mellon Provide compiler tool definitions for cross compilation.
 1.16 19-Sep-1995  thorpej branches: 1.16.2;
Compile the kernel with -Werror and -fno-builtin.
 1.15 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.14 09-Jun-1995  jonathan Change default optimization level from -O to -O2.
 1.13 16-May-1995  jtc Removing -DKERNEL, transition to _KERNEL has been completed
 1.12 23-Mar-1995  jtc Added -D_KERNEL to CFLAGS alongside each -DKERNEL.
 1.11 18-Jan-1995  mellon Make it easier to use different compilers (we hope)
 1.10 12-Dec-1994  dean removed ifdef XXX
 1.9 22-Nov-1994  dean run locore.S and fp.S through cpp
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 15-Jun-1994  glass much works but untested w/new fs. expect more tomorrow
 1.6 01-Jun-1994  glass the evil -G 0 must be used on locore too
 1.5 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.4 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.3 16-Apr-1994  cgd kill symbols.{raw,sort}; no longer necessary, with kvm dbs.
 1.2 16-Jan-1994  deraadt cleanup
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.16.2.2 13-Oct-1995  jonathan (really fix $(LIBKERN))
 1.16.2.1 13-Oct-1995  jonathan Fix bug introduced arount revision 1.14, which caused $(LIBKERN) to be
linked into the kernel twice.
 1.42.4.1 12-Mar-1997  is Merge in changes from Trunk
 1.50.2.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.52.2.1 12-Nov-1997  thorpej Pull up "make sure tools are defined" changes from trunk.
 1.61.2.5 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.61.2.4 18-Jan-1999  drochner pull in trunc rev 1.65: -Wpointer-arith
 1.61.2.3 06-Dec-1998  drochner pull up 1.64 - No input files warning
 1.61.2.2 19-Oct-1998  drochner sync to trunk rev. 1.62
 1.61.2.1 15-Oct-1998  nisimura - Reflect all changes of this branch; NWSCONS, MI SCSI, new spl(9) and others.
 1.70.2.1 16-Apr-1999  simonb branches: 1.70.2.1.2;
Pull up rev 1.71 from the trunk:
Don't build a.out kernels anymore.
 1.70.2.1.2.2 02-Aug-1999  thorpej Update from trunk.
 1.70.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.75.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.75.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7 01-Jan-2019  christos ELF2ECOFF -> MIPS_ELF2ECOFF
 1.6 14-Dec-2009  matt branches: 1.6.62; 1.6.64;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.5 12-Apr-2002  lukem branches: 1.5.16; 1.5.114; 1.5.132;
use ${ELF2ECOFF} from <bsd.{own,sys}.mk>
 1.4 20-Mar-2002  gmcgarry Use host tool elf2ecoff if available.
 1.3 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.2 21-Apr-2001  tsutsui branches: 1.2.2; 1.2.8;
Define ${ELF2ECOFF} and use it so that we can specify objcopy
for it on cross environment.
 1.1 03-Dec-2000  simonb branches: 1.1.2; 1.1.4;
Use shared Makefile.mips
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.3 23-Apr-2001  bouyer Sync with HEAD.
 1.1.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.1.2.1 03-Dec-2000  bouyer file Makefile.pmax.inc was added on branch thorpej_scsipi on 2000-12-08 09:30:14 +0000
 1.2.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.2.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.8.1 21-Apr-2001  nathanw file Makefile.pmax.inc was added on branch nathanw_sa on 2002-01-08 00:27:04 +0000
 1.2.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.132.1 09-Sep-2009  matt Don't convert to ECOFF if LP64
 1.5.114.1 11-Mar-2010  yamt sync with head
 1.5.16.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.6.64.1 10-Jun-2019  christos Sync with HEAD
 1.6.62.1 18-Jan-2019  pgoyette Synch with HEAD
 1.14 22-Jul-1997  jonathan NEWCONF was prototype ``new config'' pmax kernel config file. Now obsolete.
 1.13 12-Jun-1997  mrg remove now obsolete "swap on..." lines.
 1.12 31-Jan-1997  thorpej Update for new file system and root spec grammar.
 1.11 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.10 03-Dec-1996  cgd branches: 1.10.2;
Fix up includes so that up-to-date versions of 'config' can be used
to config pmax kernels. Not all kernels can actually be config'd because
of device declaration problems, but i don't know how to fix those.
 1.9 16-Nov-1996  jonathan Move non-optional "options" SWAPPAGER, VNODEPAGER, DEVPAGER to std.pmax
 1.8 26-Aug-1996  mrg add COMPAT_12.
 1.7 29-May-1996  mhitch Fixes to make kernel compile: HZ is required to be defined and CPU_R3000
is needed to include R3000 support. Also change the le0 to le* for the
3100 LANCE so it configures properly.
 1.6 28-Dec-1995  jonathan branches: 1.6.4;
Fix typo (two rz4s, no rz5) and add options KTRACE.
 1.5 05-Oct-1995  jonathan Change the pmax framebuffer driver to reflect the rcons changes as negotiated
with pk:
Use dev/rcons/files.rcons in the pmax config file.
Use "rasterconsole" as the tag in pmax/conf, and modify the pmax
framebuffer pseudo-device drivers (fb and rcons) to us rasterconsole.h and
RASTERCONSOLE for compile-time configuration of the rcons pseudo-device.
Modify the pmax rcons pseudo-device driver to initialize a little-endian,
QVSS-compatible font (set its ascent, and set the rconsole structure to
point to that font) before calling rcons_connect().

Tested on a cfb. The ascent may be wrong (or at least, not be aligned with
the hw cursor sprite) on a 3100.
 1.4 18-Sep-1995  jonathan Update files.pmax to use Ted Lemon's port of the sparc rcons glass-tty fb
driver, the "generic" fb pseudo-device driver, and dev/cons.c.
Update an example new-config file (NEWCONF) to use them.
 1.3 18-Aug-1995  jonathan Rename "asic" to "ioasic", to be compatible with "machine-independent"
turbochannel/asic device drivers. (also comment out tt.c.)
 1.2 04-Aug-1995  jonathan Snapshot of a prototuype for a new-config GENERIC configuration.
This relies on an ugly mixture of new-style config and old-style config.
 1.1 28-Apr-1995  jonathan Add prototype (new-style) config for pmax. This doesn't yet work;
auto-configuration initialization code is missing. It uses "needs-count"
flags to come slightly close to what the old-style pmax source expects.
Perhaps autoconfig code can be lifted from the alpha port or volunteers
found to write some.
 1.6.4.2 17-Jun-1996  jonathan Change 3100 baseboard lance to "le0" in anticipation of config being fixed.
Remove "options DS5000", as it no longer appears in the pmax source.
 1.6.4.1 30-May-1996  mhitch pulled up config file fixes from the trunk
 1.10.2.2 18-Jan-1997  thorpej Update from trunk.
 1.10.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 20-Oct-1997  jonathan Merge MINIROOT and NFSINSTALL into a single INSTALL config file,
with config lines for both root-on-disk and root-on-NFS.
 1.8 20-Oct-1997  jonathan Add "options COMPAT_12".
 1.7 20-Aug-1997  jonathan consistent whitespace after "options".
 1.6 22-Jul-1997  jonathan branches: 1.6.2;
Merge NFSROOT and NFSINSTALL.
 1.5 26-Apr-1997  jonathan Add "options MIPS1" and delete commented-out lines inherited from GENERIC.
 1.4 31-Jan-1997  thorpej Update for new file system and root spec grammar.
 1.3 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.2 16-Nov-1996  jonathan branches: 1.2.2;
Move non-optional "options" SWAPPAGER, VNODEPAGER, DEVPAGER to std.pmax
 1.1 13-Oct-1996  jonathan Kernel configuration file to build kernels for installing on diskful
machines, using diskless-boot (NFS root) as the installation method.

Many options turned off to keep kernel small and avoid boot-PROM errors.
 1.2.2.2 18-Jan-1997  thorpej Update from trunk.
 1.2.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.6.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.8 22-Jul-1997  jonathan Identical to NFSINSTALL, bar comments.
 1.7 22-Jul-1997  jonathan Merge NFSROOT and NFSINSTALL.
 1.6 26-Apr-1997  jonathan Add "options MIPS1" and delete commented-out lines inherited from GENERIC.
 1.5 31-Jan-1997  thorpej Update for new file system and root spec grammar.
 1.4 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.3 03-Dec-1996  cgd branches: 1.3.2;
Fix up includes so that up-to-date versions of 'config' can be used
to config pmax kernels. Not all kernels can actually be config'd because
of device declaration problems, but i don't know how to fix those.
 1.2 16-Nov-1996  jonathan Move non-optional "options" SWAPPAGER, VNODEPAGER, DEVPAGER to std.pmax
 1.1 18-Sep-1996  jonathan Decstation kernel config file for diskless installation:
root and swap on NFS, but includes disk and tape drivers.

Prune out most `optional' options to stay small in the hope of avoiding
PROM tftp bugs.
 1.3.2.2 18-Jan-1997  thorpej Update from trunk.
 1.3.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.27 13-Mar-2002  ad Remove unmaintained / of limited use configs.
 1.26 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.25 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.24 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.23 08-Jul-2001  abs branches: 1.23.2; 1.23.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.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 13-Sep-2000  nisimura Have MI SCSI device descriptions in GENERIC, removing 'mi.scsi' file.
 1.20 28-May-2000  gmcgarry Substitute bba for isdn placeholder.
 1.19 12-Feb-2000  thorpej branches: 1.19.2;
Nuke NKMEMCLUSTERS.
 1.18 09-Jan-2000  ad s/4(..)bsd/4$1BSD/
 1.17 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.16 29-Jul-1999  augustss branches: 1.16.2; 1.16.8;
It's time to be COMPAT_14.
 1.15 26-Apr-1999  ad Fixed to match rasops config glue.
 1.14 13-Apr-1999  ad Add configuration glue needed by rasops, wsfont, rcons and the px driver.
 1.13 27-Mar-1999  simonb branches: 1.13.4;
Remove trailing white-space.
 1.12 07-Feb-1999  jonathan garbage-collect `options MULTICAST'. IP multicast is no longer an option.
 1.11 07-Feb-1999  jonathan Add `strip' line for testing Ricochet modems at 115200 bps.
 1.10 27-Nov-1998  simonb White space and comment formatting police
 1.9 15-Nov-1998  jonathan Add mainbus0 and cpu* lines to R4000 config.
 1.8 26-Jun-1998  lukem branches: 1.8.4;
remove options FIFO; it's now the default
 1.7 19-Apr-1998  jonathan Garbage collect obsolete motherboard options from non-GENERIC kernels.
Add "ibus" to configs with 3100 support.
 1.6 25-Mar-1998  jonathan Update config files after splitting model support.
 1.5 01-Dec-1997  kleink Add COMPAT_13.
 1.4 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.3 20-Aug-1997  jonathan Turn DDB on by default in GENERIC kernel; turn DDB_ONPANIC off.
Remove obsolete comments.
 1.2 20-Aug-1997  jonathan consistent whitespace after "options".
 1.1 15-Jun-1997  mhitch branches: 1.1.4;
DECstation MIPS3 support: a GENERIC config file for the R4000/R4400-based
DECstations.
 1.1.4.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.8.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.13.4.2 02-Aug-1999  thorpej Update from trunk.
 1.13.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.16.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.19.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.23.8.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.23.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.23.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.23.8.1 08-Jul-2001  nathanw file R4000 was added on branch nathanw_sa on 2002-01-08 00:27:04 +0000
 1.23.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.23.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.23.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.20 27-Nov-2024  christos bump for ssp build
 1.19 01-Aug-2021  andvar branches: 1.19.16;
fix typos in word "otherwise".
 1.18 26-Jun-2019  martin branches: 1.18.14;
Bump ramdisk slightly (non MKREPRO builds with long paths fail otherwise)
 1.17 03-Apr-2019  christos Adjust for bigger ramdisk
 1.16 31-Mar-2019  christos bump
 1.15 13-Feb-2019  gson Bump pmax install ramdisk size by another 100k, as 3500k is no longer
enough with GCC 7.
 1.14 14-Jul-2017  christos branches: 1.14.6;
make the comment match
 1.13 13-Jul-2017  christos ramdisk ate too much ice cream, compensate.
 1.12 23-Nov-2010  hannken branches: 1.12.18; 1.12.36;
Remove unused count from pseudo-device md.
 1.11 06-Feb-2009  jym branches: 1.11.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.10 18-Jan-2009  he Bump the size of ramdisk and diskimages, so that what needs to
be put there still fits.
 1.9 11-Dec-2005  christos branches: 1.9.78; 1.9.86;
merge ktrace-lwp.
 1.8 15-Oct-2004  he Increase the pmax ramdisk size with 100KB, so that the contents
fits again.
 1.7 09-Jun-2004  he Bump size of ramdisk image from 3148KB to 3200KB so that the contents
fits again.
 1.6 14-May-2004  he Expand the ramdisk image size from 3m to 3148k so that the contents
fits again.
 1.5 02-Apr-2002  lukem branches: 1.5.10; 1.5.12;
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.4 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.3 08-Dec-1999  simonb branches: 1.3.8; 1.3.12;
We now need a 3MB miniroot.
 1.2 27-Nov-1998  simonb branches: 1.2.10; 1.2.16;
White space and comment formatting police
 1.1 19-Nov-1998  jonathan kernel config file for pmax install via ramdisk.
 1.2.16.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.12.2 17-Apr-2002  nathanw Catch up to -current.
 1.3.12.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.8.1 16-Mar-2002  jdolecek Catch up with -current.
 1.5.12.1 20-May-2004  tron Pull up revision 1.6 (requested by he in ticket #353):
Expand the ramdisk image size from 3m to 3148k so that the contents
fits again.
 1.5.10.4 19-Oct-2004  skrll Sync with HEAD
 1.5.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.10.1 03-Aug-2004  skrll Sync with HEAD
 1.9.86.2 03-Mar-2009  skrll Sync with HEAD.
 1.9.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.9.78.1 04-May-2009  yamt sync with head.
 1.11.6.1 05-Mar-2011  rmind sync with head
 1.12.36.1 28-Aug-2017  skrll Sync with HEAD
 1.12.18.1 03-Dec-2017  jdolecek update from HEAD
 1.14.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.14.6.1 10-Jun-2019  christos Sync with HEAD
 1.18.14.1 01-Aug-2021  thorpej Sync with HEAD.
 1.19.16.1 02-Aug-2025  perseant Sync with HEAD
 1.8 01-Aug-2021  andvar fix typos in word "otherwise".
 1.7 07-Sep-2020  mrg branches: 1.7.6;
bump ramdisk image size to match build size.
 1.6 03-Apr-2019  christos Adjust for bigger ramdisk
 1.5 31-Mar-2019  christos bump
 1.4 20-Feb-2011  matt branches: 1.4.56;
Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.3 23-Nov-2010  hannken branches: 1.3.2; 1.3.4;
Remove unused count from pseudo-device md.
 1.2 14-Dec-2009  matt branches: 1.2.4; 1.2.6;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.1 08-Sep-2009  matt branches: 1.1.2;
file RAMDISK64 was initially added on branch matt-nb5-mips64.
 1.1.2.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.2.6.1 05-Mar-2011  rmind sync with head
 1.2.4.2 11-Mar-2010  yamt sync with head
 1.2.4.1 14-Dec-2009  yamt file RAMDISK64 was added on branch yamt-nfs-mp on 2010-03-11 15:02:48 +0000
 1.3.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.3.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.4.56.1 10-Jun-2019  christos Sync with HEAD
 1.7.6.1 01-Aug-2021  thorpej Sync with HEAD.
 1.12 13-Mar-2002  ad Remove unmaintained / of limited use configs.
 1.11 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.10 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.9 26-Aug-2001  simonb branches: 1.9.6;
Switch to MI SCSI and drop old pmax MD SCSI support completely.
 1.8 08-Jul-2001  abs branches: 1.8.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.7 24-Sep-2000  jdolecek branches: 1.7.2;
don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.6 14-Jun-2000  veego Remove the obsolete config fragments for kernel crypto, because the IPsec
crypto code is now in the kernel source tree.
 1.5 28-May-2000  gmcgarry Substitute bba for isdn placeholder.
 1.4 19-Feb-2000  nisimura branches: 1.4.2;
Introduce MI SCSI codes; for DECstation 5000s only this moment.
Disabled by default and needs arrangements in conf file to use it.
See DS5000 as a sample.
 1.3 31-Dec-1999  ad Comment px0 entry a little more accurately.
 1.2 25-Nov-1999  nisimura branches: 1.2.2;
Reorder device descriptions to reflect what kernel shows on screen,
mostly in address ascending order.
 1.1 24-Nov-1999  thorpej My 3MAX's config file.
 1.2.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.4.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.7.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.2.1 24-Sep-2000  bouyer file SULACO was added on branch thorpej_scsipi on 2000-11-20 20:20:14 +0000
 1.8.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.8.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.8.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.9.6.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.9.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.9.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.9.6.1 26-Aug-2001  nathanw file SULACO was added on branch nathanw_sa on 2002-01-08 00:27:04 +0000
 1.3 30-Jan-1996  jonathan Remove config.old files for pmax. They should have been removed before
the NetBSD-1.1 release, as they have not worked or been supported for
some time.
 1.2 11-Apr-1995  mellon Make TOCCATA support the new console regime
 1.1 18-Jan-1995  mellon Configuration for a MAXine
 1.25 29-Jul-2006  ad Remove RASTERCONSOLE support from the pmax port.
 1.24 30-Jun-2006  tsutsui Sync with GENERIC (commented out UDF, carp, VND_COMPRESSION, and veriexec)
 1.23 28-Mar-2006  pavel branches: 1.23.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.22 05-Feb-2006  cube branches: 1.22.2; 1.22.4; 1.22.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.21 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.20 07-Dec-2005  tsutsui branches: 1.20.2; 1.20.4; 1.20.6;
Remove obsolete options VNODE_OP_NOINLINE.
 1.19 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.18 07-Oct-2005  tsutsui Sync with GENERIC:
- add options P1003_1B_SEMAPHORE
- add #file-system TMPFS
- add #options UFS_DIRHASH
- add #options ALTQ*
- enable pseudo-device fss
- add #pseudo-device pf*
- options<space><tab>
 1.17 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.16 19-Aug-2005  christos 64 bit inode changes.
 1.15 31-Jul-2005  yamt revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
 1.14 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.13 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.12 09-Jun-2005  tsutsui branches: 1.12.2;
- 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.11 25-Feb-2005  simonb branches: 1.11.2;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.10 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.9 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.8 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.7 10-Nov-2004  christos branches: 1.7.4; 1.7.6;
Add COMPAT_BSDPTY to the rest of the config files.
 1.6 04-Sep-2004  manu IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
 1.5 15-Jul-2004  atatat branches: 1.5.2;
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.4 23-Dec-2003  ad branches: 1.4.2;
MAXINE keyboard and mouse now works, albeit with some minor issues.
 1.3 19-Dec-2003  tsutsui - add options COMPAT_16
- Netbsd -> NetBSD
- use options<space><tab>
 1.2 16-Dec-2003  keihan netbsd.org -> NetBSD.org
 1.1 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.4.2.1 15-Jul-2004  he Pull up revision 1.5 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.5.2.10 11-Dec-2005  christos Sync with head.
 1.5.2.9 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.8 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.5.2.7 15-Feb-2005  skrll Sync with HEAD.
 1.5.2.6 04-Feb-2005  skrll Sync with HEAD.
 1.5.2.5 14-Nov-2004  skrll Sync with HEAD.
 1.5.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.2 03-Aug-2004  skrll Sync with HEAD
 1.5.2.1 15-Jul-2004  skrll file WSCONS was added on branch ktrace-lwp on 2004-08-03 10:39:10 +0000
 1.7.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.7.6.1 12-Feb-2005  yamt sync with head.
 1.7.4.1 29-Apr-2005  kent sync with -current
 1.11.2.1 18-Jul-2005  riz Pull up revision 1.13 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.12.2.2 30-Dec-2006  yamt sync with head.
 1.12.2.1 21-Jun-2006  yamt sync with head.
 1.20.6.1 22-Apr-2006  simonb Sync with head.
 1.20.4.1 09-Sep-2006  rpaulo sync with head
 1.20.2.1 18-Feb-2006  yamt sync with head.
 1.22.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.22.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.22.2.2 11-Aug-2006  yamt sync with head
 1.22.2.1 01-Apr-2006  yamt sync with head.
 1.23.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.1 19-Oct-1998  drochner branches: 1.1.2;
file ZELMWU was initially added on branch nisimura-pmax-wscons.
 1.1.2.4 04-Aug-1999  nisimura - Catch up to recent introduction of wsmux psuedo-device.
- Make sure to assign BRG value early in boot.
- Make ZELMWU comfortable to build.
 1.1.2.3 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.1.2.2 29-Mar-1999  drochner catch up with zskbd->lkkbd change, add vt100 emulation
 1.1.2.1 19-Oct-1998  drochner DS '240 with full wscons console support
 1.6 24-Nov-1999  thorpej Delete now-unreferenced files.
 1.5 27-Nov-1998  simonb branches: 1.5.10; 1.5.16;
White space and comment formatting police
 1.4 19-Apr-1998  jonathan branches: 1.4.4;
Rework pmax kernel config:
* ibus (virtual bus for baseboard direct-attach deviecs)
* 5100 support, using ibus
* rename "clock" to mcclock for future support of Qbus machiens
* use sys/dev/dec mcclock_pad32 machinery for pmax mcclock
* reworked TC config code.
 1.3 05-Jan-1998  perry RCSID Police.
 1.2 20-May-1997  jonathan Change default le entry from "le*" to "le0" so GENERIC kernels
configure the pmin/pmax (2100/3100) baseboard ethernet as le0, not le1.
 1.1 18-Sep-1996  jonathan Create broken-out config files for decstation baseboard devices.
Add sample config files that use them.
 1.4.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.5.16.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.10.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.9 24-Nov-1999  thorpej Delete now-unreferenced files.
 1.8 27-Nov-1998  simonb branches: 1.8.10; 1.8.16;
White space and comment formatting police
 1.7 19-Apr-1998  jonathan branches: 1.7.4;
Rework pmax kernel config:
* ibus (virtual bus for baseboard direct-attach deviecs)
* 5100 support, using ibus
* rename "clock" to mcclock for future support of Qbus machiens
* use sys/dev/dec mcclock_pad32 machinery for pmax mcclock
* reworked TC config code.
 1.6 27-Jan-1998  cgd fix change made in rev 1.5: clock was moved to ioasic, but ioasic
_requires_ offset locator (which may be wildcarded). No offset locator
was supplied, so kernel configs using this file would fail.
 1.5 21-Jan-1998  jonathan Fix clock attachment to match (pseudo) ioasic attachment in 5000/200 kernel.
 1.4 05-Jan-1998  perry RCSID Police.
 1.3 31-May-1997  mhitch branches: 1.3.8;
Comment out the dc0 at mainbus0: that attempts to include the DS3100 dc
device attachment. The 3max dc0 device attaches to the pretended IOASIC.
 1.2 15-May-1997  jonathan Add `offset' locator to ioasic-attached devices, for compatibility with
the ioasic_submatch() used in drivers shared by pmax and alpha ports.
 1.1 18-Sep-1996  jonathan Create broken-out config files for decstation baseboard devices.
Add sample config files that use them.
 1.3.8.1 29-Jan-1998  mellon Pull up 1.4 (perry) and 1.5-1.6 (jonathan)
 1.7.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.8.16.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.10.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.2 24-Nov-1999  thorpej Delete now-unreferenced files.
 1.1 19-Apr-1998  jonathan branches: 1.1.4; 1.1.16; 1.1.22;
ibus devices and 5100 attachment.
 1.1.22.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.16.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.1.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.6 24-Nov-1999  thorpej Delete now-unreferenced files.
 1.5 27-Nov-1998  simonb branches: 1.5.10; 1.5.16;
White space and comment formatting police
 1.4 19-Apr-1998  jonathan branches: 1.4.4;
Rework pmax kernel config:
* ibus (virtual bus for baseboard direct-attach deviecs)
* 5100 support, using ibus
* rename "clock" to mcclock for future support of Qbus machiens
* use sys/dev/dec mcclock_pad32 machinery for pmax mcclock
* reworked TC config code.
 1.3 05-Jan-1998  perry RCSID Police.
 1.2 15-May-1997  jonathan Add `offset' locator to ioasic-attached devices, for compatibility with
the ioasic_submatch() used in drivers shared by pmax and alpha ports.
 1.1 18-Sep-1996  jonathan Create broken-out config files for decstation baseboard devices.
Add sample config files that use them.
 1.4.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.5.16.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.10.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.5 24-Nov-1999  thorpej Delete now-unreferenced files.
 1.4 27-Nov-1998  simonb branches: 1.4.10; 1.4.16;
White space and comment formatting police
 1.3 05-Jan-1998  perry branches: 1.3.4;
RCSID Police.
 1.2 15-May-1997  jonathan Add `offset' locator to ioasic-attached devices, for compatibility with
the ioasic_submatch() used in drivers shared by pmax and alpha ports.
 1.1 18-Sep-1996  jonathan Create broken-out config files for decstation baseboard devices.
Add sample config files that use them.
 1.3.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.4.16.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.4.10.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.6 28-Apr-1995  cgd rename files files for new config/config.old naming
 1.5 03-Jan-1995  hpeyerl Change majour for rz to 21. (From Jonathan Stone)
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.6 30-Jan-1996  jonathan Remove config.old files for pmax. They should have been removed before
the NetBSD-1.1 release, as they have not worked or been supported for
some time.
 1.5 03-Jan-1995  hpeyerl Change majour for rz to 21. (From Jonathan Stone)
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.118 16-Nov-2016  macallan branches: 1.118.8;
switch to common MIPS bus_space and bus_dma
tested by flxd@
 1.117 04-Nov-2016  flxd Add new USB-enabled kernel config(s) based upon GENERIC for pmax, include it as kernel set in the build and make it a choice in sysinst.
OK simonb@
 1.116 21-Oct-2016  flxd Bless pmax with USB device files/majors and make kernel configs with USB and typical drivers work.
OK christos@ simonb@
 1.115 20-Jul-2014  alnsn branches: 1.115.4; 1.115.8;
Include sljit files.
 1.114 02-Oct-2012  christos branches: 1.114.10;
move common/bus_dma/ -> dev/bus_dma/
 1.113 20-Feb-2011  matt branches: 1.113.4; 1.113.14;
Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.112 21-Aug-2009  thorpej branches: 1.112.4; 1.112.6; 1.112.8;
Use bus_dmamem_common.
 1.111 20-Feb-2008  drochner branches: 1.111.10; 1.111.28;
Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
 1.110 29-Jul-2006  ad branches: 1.110.34;
Remove RASTERCONSOLE support from the pmax port.
 1.109 11-Dec-2005  christos branches: 1.109.4; 1.109.8;
merge ktrace-lwp.
 1.108 01-Jan-2005  simonb branches: 1.108.10;
Provide assembly versions of the clock timing calculation loops that
aren't effected by changes in compiler optimisation.

Fixes PR port-mips/26959 from Izumi Tsutsui
 1.107 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.106 01-Nov-2003  tsutsui Remove nonexistent arch/pmax/pmax/mcclock.c. (pmax uses dev/dec/mcclock.c)
 1.105 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.104 25-May-2003  tsutsui branches: 1.104.2;
Switch to use mips/softintr.c for softintr(9).
 1.103 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.102 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.101 03-Apr-2002  simonb branches: 1.101.2;
Don't make arch/mips/mips/mips_mcclock.c mandatory for all mips ports
with an mcclock - pmax is the only one currently using this.
 1.100 13-Mar-2002  simonb branches: 1.100.2;
All the mips ports had an identical procfs_machdep.c, so use a common
file under arch/mips/mips.
 1.99 28-Nov-2001  lukem - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
"options FOO=xxx"). options that take a value were converted to
defparam recently.
- minor whitespace & formatting cleanups
 1.98 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.97 01-Oct-2001  simonb branches: 1.97.4;
Move pmax-only if_le_ibus.c from dev/tc to arch/pmax/ibus.
 1.96 01-Oct-2001  simonb Move asc_tc and asc_tcds config info to dev/tc/files.tc now that pmax
uses MI SCSI.
 1.95 18-Sep-2001  tsutsui sii does not require ncr53c9x.
 1.94 26-Aug-2001  simonb branches: 1.94.2;
Switch to MI SCSI and drop old pmax MD SCSI support completely.
 1.93 22-Aug-2001  nisimura NetBSD/pmax now has GENERIC_SOFT_INTERRUPTS.
 1.92 17-Jan-2001  fvdl branches: 1.92.4;
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.91 16-Jan-2001  thorpej We haven't used the 4.4BSD kadb stuff for a long time; garbage
collect it.
 1.90 01-Jan-2001  mrg the tcds cards work in pmaxen. move tcds attachment to files.tc. leave asc
at tcds in files.alpha for now, and add a new `xasc at tcds' to files.pmax.
after pmax has moved fully to MI scsi (and `asc' is MI scsi), we should move
the device asc, etc., lines to files.tc.
 1.89 23-Nov-2000  nisimura - Nuke xasc_ioasic.h and xasc_pmaz.h as no code uses the symbols they define.
- Hide #include <pmax/dev/device.h> for "pmax oldscsi" inside
#if NRZ > 0 || NTZ > 0.
 1.88 10-Oct-2000  ad Switch to sys/dev/md_root.c.
 1.87 07-Jun-2000  perseant px requires rasops8 to compile
 1.86 02-Jun-2000  mhitch Allow sii driver to be compiled with MI SCSI support. Now DS3100 users
can use MI SCSI!
 1.85 29-Apr-2000  soren branches: 1.85.2;
Allow non-pmax to use COMPAT_ULTRIX.
 1.84 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.83 29-Feb-2000  nisimura NLE_PMAX symbol in le_pmax.h has gone.
 1.82 19-Feb-2000  nisimura Introduce MI SCSI codes; for DECstation 5000s only this moment.
Disabled by default and needs arrangements in conf file to use it.
See DS5000 as a sample.
 1.81 18-Feb-2000  nisimura Revert the removal 'include "dev/scsipi/files.scsipi"' directive; it's
neccessary to make pmax/conf.c compiled correctly.
 1.80 18-Feb-2000  nisimura Group and reorder old SCSI driver descriptions into a single
location. Nuke files.scsipi inclusion which has never been useful.
 1.79 03-Feb-2000  nisimura Massive change of console initialization to make WSCONS transition easier.
 1.78 09-Jan-2000  ad s/4(..)bsd/4$1BSD/
 1.77 08-Dec-1999  simonb Oops, back out some test 5500 stuff from previous commit - only RAMDISK
was meant to be changed.
 1.76 08-Dec-1999  simonb We now need a 3MB miniroot.
 1.75 01-Dec-1999  nisimura Replace old asic.c with one imported from a development branch.
 1.74 27-Nov-1999  simonb callvec.c has moved from stand/lib to stand/common.

XXX: The kernel proper shouldn't rely on files in stand! Will fix soon.
 1.73 25-Nov-1999  nisimura Some fix on comment descriptions.
 1.72 23-Nov-1999  thorpej Add an `addr' locator to the `ibus' bus. This allows you to wire down
unti numbers on systems which have e.g. multiple `dc' devices on the
internal bus (like the 5100).
 1.71 16-Nov-1999  nisimura Resolve 3max IOASIC disguise; round #2.
 1.70 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.69 07-Jul-1999  thorpej branches: 1.69.2; 1.69.8;
pseudo-device -> defpseudo, per grammar change in config(8).
 1.68 21-Jun-1999  ad px.c requires that qvss_compat.c be compiled in.
 1.67 07-Jun-1999  thorpej Only declare block major numbers for devices which can be the root device.
 1.66 21-May-1999  nisimura - Track filename changes.
 1.65 11-May-1999  nisimura - Have 'promcall.c' for various utilities by PROM calls.
- Adjust files.pmax.
 1.64 26-Apr-1999  ad `pm' device can also be 8bpp - fix dependancy line.
 1.63 26-Apr-1999  ad Fixed to match rasops config glue.
 1.62 13-Apr-1999  ad Add configuration glue needed by rasops, wsfont, rcons and the px driver.
 1.61 27-Mar-1999  simonb branches: 1.61.4;
Remove trailing white-space.
 1.60 25-Mar-1999  simonb callvec.c moved in stand again...
 1.59 01-Mar-1999  simonb A 5800 is a kn5800.
 1.58 27-Nov-1998  simonb White space and comment formatting police
 1.57 17-Nov-1998  jonathan Add md (memory disk) hooks for pmax. ecoff kernel with 2MB ramdisk
tftp-boots on new PROMs. (3MB is too large).
 1.56 26-Sep-1998  drochner branches: 1.56.2;
Use common date conversion functions - not runtime efficient, but
brain-efficient...
 1.55 21-Jul-1998  drochner adapt to LANCE driver split
 1.54 22-May-1998  thorpej Complete from-scratch rewrite of the DECstation bus.h, brining it
up-to-date with the current API, and implementing preliminary
support for bus_dma.
 1.53 19-Apr-1998  jonathan Rework pmax kernel config:
* ibus (virtual bus for baseboard direct-attach deviecs)
* 5100 support, using ibus
* rename "clock" to mcclock for future support of Qbus machiens
* use sys/dev/dec mcclock_pad32 machinery for pmax mcclock
* reworked TC config code.
 1.52 29-Mar-1998  jonathan Split 3max (kn02) and 3maxplus (kn03, kn05) memory-error handling out
dec_3max.c into a shared file. These models have compatible memory
subsystems, the same memory slots, and (apparently) the same error reporting.

Add markers for where MNN probes for configurations with a mixture of
RAM sizes and for Prestoserve NVRAM (in normal RAM slots) should go.
 1.51 25-Mar-1998  jonathan Update config files after splitting model support.
 1.50 25-Mar-1998  jonathan Update GENERIC and R4000 configs after splitting model-speciifc support.
 1.49 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.48 12-Jan-1998  thorpej Update for changes to config.
 1.47 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.46 22-Jul-1997  jonathan branches: 1.46.2;
Create sys/dev/dec and cleanup sys/dev/tc:

* Move clockvar.h (header file for generic clock code) to sys/dev/dec.
* Move if_le_dec.c with DEC padded LANCE-dma (pmax/pmax, ioasic, vax 3400)
to sys/dev/dec. Remove from sys/dev/tc.
* Declare attribute le_dec_subr in /sys/dev/dec/files.dec,
use if_le_dec.c when it's defined.
* Move IOCTL asic declaration from pmax and Alpha MD machine
files to sys/dev/tc/files.tc.
* move TurboChannel and ioasic if_le attachments from pmax and Alpha machine
config files to /sys/dev/tc/files.tc. Add le_dec_subr attribute.
* Add if_le_dec attribute to if_le_ibus (pmax ds3100 pmax) LANCE attachment.
 1.45 20-Jul-1997  jonathan mips-tuned bcopy from Jon Kay (UCSD) released under BSD copyright,
with standard BSD in_cksum() interface by Jonathan Stone.
 1.44 22-Jun-1997  jonathan branches: 1.44.2;
Import mcclock from NetBSD/Alpha, mostly replacing the Sprite clock code.
interface. From Toru Nishimura <nisimura@itc.aist-nara.ac.jp>.

Partly merged back with Alpha code by Jonathan Stone. Needs more merging.
 1.43 16-Jun-1997  jonathan Use generic MIPS pmap vm_machdep.c
 1.42 09-Jun-1997  jonathan Move the mips sys_machdep.c from pmax/pmax to mips/mips, to enforce a
common sysarch on all mips ports.
 1.41 29-May-1997  mhitch Include pm_ds.c if pm_ds, not dc_ds - dc_ds gets set for the 5000/200 as
well as the 3100, but trying to include pm_ds.c for a 5000/200-only
configuration fails.
 1.40 24-May-1997  jonathan Add 'needs-flag' to pmax, 3max dc (DZ-11 clone) front-ends (dc_ds, dc_ioasic
respectively), so console setup code can test forconfiguration of the
correct front-end (via NDC_DC and NDC_IOASIC, respectively).

Delete 'needs-flags' from dc.c. GC obsolete uses of NDC, "dc.h".
 1.39 15-May-1997  jonathan Change `needs-count' on scc to `needs-flag': should have been `needs-flag'
since rev 1.18 of pmax/tc/scc.c.
 1.38 15-May-1997  jonathan Add `offset' locator to ioasic-attached devices, for compatibility with
the ioasic_submatch() used in drivers shared by pmax and alpha ports.
 1.37 03-Dec-1996  cgd Fix up includes so that up-to-date versions of 'config' can be used
to config pmax kernels. Not all kernels can actually be config'd because
of device declaration problems, but i don't know how to fix those.
 1.36 13-Oct-1996  jonathan Change pmax port over to using ``mips MI'' trap handler.
 1.35 13-Oct-1996  jonathan Comment out config lines for MI scsi drivers, to make it absolutely clear
we don't yet support them.
 1.34 11-Oct-1996  mhitch The dc has to have needs-flag so dc.h gets generated.
 1.33 30-Sep-1996  jonathan Add files.pmax entries for separate cfattach front-end and ``MI'' backend
drivers:
pm - pmin/pmax d503 PCC + BrookTree 478 framebuffer
dc - dc7085 DZ-11 clone
asc - ioasic and TurboChannel SCSI option card 53c94 SCSI-2
sii - DEC scsi ASIC used in pmin/pmax, 5100, and Firefox vaxes
 1.32 29-May-1996  mhitch Use the MI LANCE drivers - the pmax-specific one no longer compiles.
 1.31 07-May-1996  thorpej branches: 1.31.4;
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.30 26-Mar-1996  jonathan Remove files moved to mips/mips; they are included in mips/conf/files.mips.
Add the pmax-specific portion of trap handler, pmax/pmax_trap.c, which
was split off from pmax/trap.c.
 1.29 17-Mar-1996  cgd adjust to deal with expression support for optional file specs
 1.28 17-Mar-1996  cgd fix typo in recent attachment changes: (interface) attributes for asc
specified twice.
 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 15-Feb-1996  jonathan Propagate changes from cfb driver to not require "needs-count" to other
pmax framebuffer drivers.
 1.25 03-Jan-1996  jonathan Add dev/tc/asc.c to files.pmax, until the merger of Alpha and pmax TC drivers
s completed.
 1.24 05-Oct-1995  jonathan Change the pmax framebuffer driver to reflect the rcons changes as negotiated
with pk:
Use dev/rcons/files.rcons in the pmax config file.
Use "rasterconsole" as the tag in pmax/conf, and modify the pmax
framebuffer pseudo-device drivers (fb and rcons) to us rasterconsole.h and
RASTERCONSOLE for compile-time configuration of the rcons pseudo-device.
Modify the pmax rcons pseudo-device driver to initialize a little-endian,
QVSS-compatible font (set its ascent, and set the rconsole structure to
point to that font) before calling rcons_connect().

Tested on a cfb. The ascent may be wrong (or at least, not be aligned with
the hw cursor sprite) on a 3100.
 1.23 20-Sep-1995  thorpej Use `files.ultrix'
 1.22 18-Sep-1995  jonathan Update files.pmax to use Ted Lemon's port of the sparc rcons glass-tty fb
driver, the "generic" fb pseudo-device driver, and dev/cons.c.
Update an example new-config file (NEWCONF) to use them.
 1.21 29-Aug-1995  jonathan Change pmax (asc and sii) SCSI drivers to use "needs-flag", as the
drivers have been fixed to not require "needs-count".

Add back the lines for the "rcons" console driver, even though it's
not merged into the pmax port yet, as conf.h was patched to include
"rcons.h". Adding the device here, but not configuring it (e.g., in
GENERIC) keeps conf.c happy until rcons code is merged.
 1.20 18-Aug-1995  jonathan Rename "asic" to "ioasic", to be compatible with "machine-independent"
turbochannel/asic device drivers. (also comment out tt.c.)
 1.19 10-Aug-1995  jonathan Un-comment dependency on file cpu.c, since cpu.c has been commited to CVS.
 1.18 04-Aug-1995  jonathan Fix cut-and-paste error in device order (clock).
 1.17 04-Aug-1995  jonathan Snapshot of a prototuype for a new-config GENERIC configuration.
This relies on an ugly mixture of new-style config and old-style config.
 1.16 30-Apr-1995  cgd resurrect, and move files.pmax.newconf to new location.
 1.15 28-Apr-1995  cgd rename files files for new config/config.old naming
 1.14 27-Apr-1995  mellon Add sfb device driver
 1.13 21-Apr-1995  mellon Add dummy fb device driver reference for compatibility with conf.c changes
 1.12 12-Apr-1995  mellon Add cpu_exec.c, rcons.c
 1.11 01-Feb-1995  mellon Add Jonathan's T3 device driver...
 1.10 18-Jan-1995  mellon Add arch/pmax/pmax/elf.c as a standard file
 1.9 28-Nov-1994  dean Removed fp.S
 1.8 23-Nov-1994  dean changed fp.s to fp.S
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 02-Jun-1994  glass fix a few integration bugs, add vmfault debugging, more ultrix stuff
 1.5 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.4 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.3 14-Jan-1994  deraadt don't pull in arch/pmax/stand/libsa/callvec.c -- it's a silly idea.
 1.2 14-Jan-1994  deraadt everything is now in sys/arch/pmax; and delete 4.4isms we don't do
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.31.4.1 30-May-1996  mhitch pulled up LANCE driver fixes from the trunk
 1.44.2.3 30-Jul-1997  bouyer Sync with trunk.
 1.44.2.2 22-Jul-1997  bouyer Sync with trunk.
 1.44.2.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.46.2.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.56.2.18 14-Mar-2000  nisimura Switch to improved flexible video console text rasterizer provided by
rasops and wsfont.
 1.56.2.17 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.56.2.16 29-Oct-1999  drochner create dckbd.h
 1.56.2.15 09-Aug-1999  drochner -make channel locator at zsc optional - the driver is clever enough
-callvec.c changed location
 1.56.2.14 04-Aug-1999  nisimura - Catch up to recent introduction of wsmux psuedo-device.
- Make sure to assign BRG value early in boot.
- Make ZELMWU comfortable to build.
 1.56.2.13 21-May-1999  nisimura - Sync w/ main trunk change.
 1.56.2.12 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.56.2.11 17-Apr-1999  nisimura - Introduce 'dctty' as a child node of 'dc'. It's a sibling of 'dckbd'
and 'dcms'.
- Needs rework of how to send any data to keyboard and mouse.
attmt.sendchar is evil. It'd be nice to have flexible framework of
two way communication channels between wskbd/wsmouse and lower device
layer.
 1.56.2.10 29-Mar-1999  nisimura - Catch up to recent changes in main trunk.
- Reorganize various #include's.
- Yield memcpy to Mach derivated one.
- pm_cnattach() now checks the existense of framebuffer card.
 1.56.2.9 15-Mar-1999  nisimura - Add TCDS driver temporalily borrowed from arch/alpha/tc/ directory.
 1.56.2.8 06-Mar-1999  drochner -sync with trunk rev. 1.57: add md
-drop private "asc" driver
 1.56.2.7 30-Oct-1998  nisimura - Migrate to MI TURBOchannel codes.
 1.56.2.6 26-Oct-1998  nisimura - Have dc_ibus.c to split DC7085 driver body and MD match/attach routines
as Matt Thomas suggested. Needs more work to move dc.c at dev/dec/.
- Abandon TIOC{MSET,MBIS,MBIC} ioctls.
- Fix typos in dc7085var.h
 1.56.2.5 22-Oct-1998  drochner use common zskbd code in dev/dec
 1.56.2.4 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.56.2.3 19-Oct-1998  drochner -allow zsc channels to be wildcarded
-add zskbd driver
 1.56.2.2 19-Oct-1998  nisimura - Synchronize clock.c change in main tree with dev/clock_subr.c.
- Remove broken memset.c locally defined.
 1.56.2.1 15-Oct-1998  nisimura - Reflect all changes of this branch; NWSCONS, MI SCSI, new spl(9) and others.
 1.61.4.3 02-Aug-1999  thorpej Update from trunk.
 1.61.4.2 01-Jul-1999  thorpej Sync w/ -current.
 1.61.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.69.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.69.2.4 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.69.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.69.2.2 08-Dec-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.85.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.92.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.92.4.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.92.4.4 16-Mar-2002  jdolecek Catch up with -current.
 1.92.4.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.92.4.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.92.4.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.94.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.94.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.97.4.6 11-Nov-2002  nathanw Catch up to -current
 1.97.4.5 17-Sep-2002  nathanw Catch up to -current.
 1.97.4.4 17-Apr-2002  nathanw Catch up to -current.
 1.97.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.97.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.97.4.1 01-Oct-2001  nathanw file files.pmax was added on branch nathanw_sa on 2002-01-08 00:27:05 +0000
 1.100.2.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.101.2.2 17-May-2002  gehenna Remove old block majors list.
 1.101.2.1 16-May-2002  gehenna Include the list of block/character major numbers.
 1.104.2.4 17-Jan-2005  skrll Sync with HEAD.
 1.104.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.104.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.104.2.1 03-Aug-2004  skrll Sync with HEAD
 1.108.10.2 27-Feb-2008  yamt sync with head.
 1.108.10.1 30-Dec-2006  yamt sync with head.
 1.109.8.1 11-Aug-2006  yamt sync with head
 1.109.4.1 09-Sep-2006  rpaulo sync with head
 1.110.34.1 23-Mar-2008  matt sync with HEAD
 1.111.28.1 05-Feb-2010  matt Change to deal with new method of invoking softints. Remove mips/softintr.c
from config files. Fix SYMTAB_SPACE for WGT62V43
 1.111.10.1 16-Sep-2009  yamt sync with head
 1.112.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.112.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.112.4.1 05-Mar-2011  rmind sync with head
 1.113.14.3 03-Dec-2017  jdolecek update from HEAD
 1.113.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.113.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.113.4.1 30-Oct-2012  yamt sync with head
 1.114.10.1 10-Aug-2014  tls Rebase.
 1.115.8.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.115.8.1 04-Nov-2016  pgoyette Sync with HEAD
 1.115.4.1 05-Dec-2016  skrll Sync with HEAD
 1.118.8.1 25-Jul-2017  snj Apply patch (requested by flxd in ticket #154):
Revert pmax switch to common MIPS bus_space and bus_dma.
 1.2 30-Apr-1995  cgd resurrect, and move files.pmax.newconf to new location.
 1.1 28-Apr-1995  jonathan Add prototype (new-style) config for pmax. This doesn't yet work;
auto-configuration initialization code is missing. It uses "needs-count"
flags to come slightly close to what the old-style pmax source expects.
Perhaps autoconfig code can be lifted from the alpha port or volunteers
found to write some.
 1.15 30-Jan-1996  jonathan Remove config.old files for pmax. They should have been removed before
the NetBSD-1.1 release, as they have not worked or been supported for
some time.
 1.14 27-Apr-1995  mellon Add sfb device driver
 1.13 21-Apr-1995  mellon Add dummy fb device driver reference for compatibility with conf.c changes
 1.12 12-Apr-1995  mellon Add cpu_exec.c, rcons.c
 1.11 01-Feb-1995  mellon Add Jonathan's T3 device driver...
 1.10 18-Jan-1995  mellon Add arch/pmax/pmax/elf.c as a standard file
 1.9 28-Nov-1994  dean Removed fp.S
 1.8 23-Nov-1994  dean changed fp.s to fp.S
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 02-Jun-1994  glass fix a few integration bugs, add vmfault debugging, more ultrix stuff
 1.5 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.4 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.3 14-Jan-1994  deraadt don't pull in arch/pmax/stand/libsa/callvec.c -- it's a silly idea.
 1.2 14-Jan-1994  deraadt everything is now in sys/arch/pmax; and delete 4.4isms we don't do
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.4 29-Jul-2006  ad Remove RASTERCONSOLE support from the pmax port.
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.8;
merge ktrace-lwp.
 1.2 28-Nov-2004  jmc branches: 1.2.12;
Just include files.wscons since it has some defparams needed by includes
that get picked up from rcons files. Note the fact we're assuming files.wscons
will include files.rcons. Fixes builds on pmax.
 1.1 13-Dec-2003  ad branches: 1.1.4;
Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.1.4.5 29-Nov-2004  skrll Sync with HEAD.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 13-Dec-2003  skrll file files.pmax_rcons was added on branch ktrace-lwp on 2004-08-03 10:39:10 +0000
 1.2.12.1 30-Dec-2006  yamt sync with head.
 1.3.8.1 11-Aug-2006  yamt sync with head
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.4 29-Jul-2006  ad Remove RASTERCONSOLE support from the pmax port.
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.8;
merge ktrace-lwp.
 1.2 25-Feb-2005  tsutsui branches: 1.2.4;
lkkbd requires lkkbdmap.
Fix kernel link problem reported by Georg Schwarz on port-pmax.
 1.1 13-Dec-2003  ad branches: 1.1.4; 1.1.10; 1.1.12;
Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.1.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.10.1 29-Apr-2005  kent sync with -current
 1.1.4.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 13-Dec-2003  skrll file files.pmax_wscons was added on branch ktrace-lwp on 2004-08-03 10:39:10 +0000
 1.2.4.1 30-Dec-2006  yamt sync with head.
 1.3.8.1 11-Aug-2006  yamt sync with head
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.3 24-Nov-1999  thorpej Delete now-unreferenced files.
 1.2 27-Nov-1998  simonb branches: 1.2.10; 1.2.16;
White space and comment formatting police
 1.1 19-Apr-1998  jonathan branches: 1.1.4;
ibus devices and 5100 attachment.
 1.1.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.2.16.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.10.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.24 04-Apr-2020  jdolecek mark nsmb major obsolete
 1.23 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.22 21-Oct-2016  flxd branches: 1.22.16;
Bless pmax with USB device files/majors and make kernel configs with USB and typical drivers work.
OK christos@ simonb@
 1.21 30-Jun-2011  wiz branches: 1.21.12; 1.21.30; 1.21.34;
dependant -> dependent
 1.20 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.19 31-Dec-2007  ad branches: 1.19.6; 1.19.10; 1.19.16; 1.19.18;
Remove systrace. Ok core@.
 1.18 24-Nov-2006  wiz branches: 1.18.28; 1.18.34; 1.18.42;
s/independant/independent/, from Zafer.
 1.17 29-Jul-2006  ad branches: 1.17.4; 1.17.6;
Remove RASTERCONSOLE support from the pmax port.
 1.16 11-Dec-2005  christos branches: 1.16.4; 1.16.8;
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 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.10 10-Dec-2003  jmc Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
 1.9 10-Oct-2003  jdolecek reassing majors for crypto and pf to use the newly defined MI major
range
 1.8 10-Oct-2003  jdolecek update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
 1.7 05-Oct-2003  jdolecek Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

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

Follows recent discussion on tech-kern@
 1.6 22-Aug-2003  itojun create /dev/crypto
 1.5 27-Jul-2003  itojun reserve cdev major # for PF. ok'ed by technical-exec
 1.4 25-Apr-2003  ragge branches: 1.4.2;
Add ksyms device major.
 1.3 04-Oct-2002  elric branches: 1.3.2;
assign majors for raw and cooked cgd's.
 1.2 06-Sep-2002  gehenna branches: 1.2.2;
Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 16-May-2002  gehenna branches: 1.1.2;
file majors.pmax was initially added on branch gehenna-devsw.
 1.1.2.4 15-Jul-2002  gehenna catch up with -current.
 1.1.2.3 08-Jun-2002  gehenna fix typo
 1.1.2.2 30-May-2002  gehenna Add $NetBSD$
 1.1.2.1 16-May-2002  gehenna Add the list of block/character majors.
 1.2.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.2.2.1 06-Sep-2002  nathanw file majors.pmax was added on branch nathanw_sa on 2002-09-17 21:16:56 +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.pmax was added on branch kqueue on 2002-10-10 18:35:02 +0000
 1.4.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.2.3 21-Jan-2008  yamt sync with head
 1.12.2.2 30-Dec-2006  yamt sync with head.
 1.12.2.1 21-Jun-2006  yamt sync with head.
 1.16.8.1 11-Aug-2006  yamt sync with head
 1.16.4.1 09-Sep-2006  rpaulo sync with head
 1.17.6.1 10-Dec-2006  yamt sync with head.
 1.17.4.1 12-Jan-2007  ad Sync with head.
 1.18.42.1 02-Jan-2008  bouyer Sync with HEAD
 1.18.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.18.28.1 09-Jan-2008  matt sync with HEAD
 1.19.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.19.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.19.10.1 04-May-2009  yamt sync with head.
 1.19.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.21.34.1 04-Nov-2016  pgoyette Sync with HEAD
 1.21.30.1 05-Dec-2016  skrll Sync with HEAD
 1.21.12.1 03-Dec-2017  jdolecek update from HEAD
 1.22.16.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.22.16.1 10-Jun-2019  christos Sync with HEAD
 1.7 13-Sep-2000  nisimura Have MI SCSI device descriptions in GENERIC, removing 'mi.scsi' file.
 1.6 02-Jun-2000  mhitch SII driver goes MI SCSI: add a scsibus at xsii.
 1.5 19-Feb-2000  nisimura branches: 1.5.2;
Introduce MI SCSI codes; for DECstation 5000s only this moment.
Disabled by default and needs arrangements in conf file to use it.
See DS5000 as a sample.
 1.4 19-Feb-2000  nisimura List all 6 different types of MI SCSI device.
 1.3 27-Nov-1998  simonb branches: 1.3.10;
White space and comment formatting police
 1.2 05-Jan-1998  perry branches: 1.2.4;
RCSID Police.
 1.1 18-Sep-1996  jonathan Create broken-out config files for decstation baseboard devices.
Add sample config files that use them.
 1.2.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.3.10.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.5.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.4 26-Aug-2001  simonb Switch to MI SCSI and drop old pmax MD SCSI support completely.
 1.3 08-May-1998  simonb branches: 1.3.4; 1.3.30;
- Allow all valid SCSI id's to work on the SII and first two ASC
controllers (including SCSI id 7 on the 2100/3100).
- On the pmax (2100,3100) set the host SCSI id to 6.
- Move disk and tape config for the second ASC controller from the GENERIC
config file to scsi.pmax so all configurations can use the second
controller.
 1.2 05-Jan-1998  perry RCSID Police.
 1.1 18-Sep-1996  jonathan branches: 1.1.14;
Create broken-out config files for decstation baseboard devices.
Add sample config files that use them.
 1.1.14.1 08-May-1998  mycroft Pull up 1.3, per request of simonb.
 1.3.30.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.19 14-Jul-2021  thorpej Enable VMSWAP_DEFAULT_PLAINTEXT as default.
 1.18 11-Dec-2005  christos branches: 1.18.182;
merge ktrace-lwp.
 1.17 17-Sep-2005  yamt include "conf/std".
 1.16 30-Aug-2003  chs branches: 1.16.16;
add "makeoptions MACHINE_ARCH=..." in std.* for mips ports
where it is constant (to ease cross-building).
 1.15 09-Dec-2002  simonb branches: 1.15.6;
Remove the explicit `makeoptions MACHINE_ARCH="mipse{b,l}"' for kernel
builds and use the endianness of the toolchain being used to determine
the endianness of the kernel.
 1.14 23-Oct-2001  thorpej branches: 1.14.4;
For MIPS kernel Makefiles, don't set ENDIAN in std.${MACHINE}. Instead,
explicitly set MACHINE_ARCH to the appropriate thing. Makefile.mips will
then set all of the internal variables it needs to accordingly.
 1.13 03-Dec-2000  simonb branches: 1.13.4;
Use shared Makefile.mips
 1.12 22-Jun-2000  fvdl Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC.
 1.11 15-Nov-1999  fvdl branches: 1.11.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.10 24-Mar-1999  mrg branches: 1.10.8; 1.10.14;
clean up kernel/config files files for machVM lossage.
 1.9 15-Nov-1998  mhitch UVM is now the standard VM system on NetBSD/pmax.
 1.8 26-Jul-1998  simonb branches: 1.8.4;
Add missing trailing $ to $NetBSD$ line (PR #5530).
 1.7 01-Jun-1998  thorpej Correct some comments.
 1.6 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.5 16-Nov-1996  jonathan Move non-optional "options" SWAPPAGER, VNODEPAGER, DEVPAGER to std.pmax
 1.4 11-Oct-1996  mhitch Fixed typo on EXEC_ELF32.
Newline at end of file was missing.
 1.3 02-Oct-1996  jonathan Add explicit options for elf and script exec packges to std.pmax.
Add ECOFF exec option to my own config file; untested.
 1.2 20-Mar-1996  jonathan Add "mips" to the machine line, to make config create a link
compile/XXXX/mips -> mips/include, and to use mips/conf/files.mips.
 1.1 28-Apr-1995  jonathan Add prototype (new-style) config for pmax. This doesn't yet work;
auto-configuration initialization code is missing. It uses "needs-count"
flags to come slightly close to what the old-style pmax source expects.
Perhaps autoconfig code can be lifted from the alpha port or volunteers
found to write some.
 1.8.4.4 29-Mar-1999  drochner sync with trunk rev. 1.10 9mach vm removal)
 1.8.4.3 15-Nov-1998  drochner use UVM too
 1.8.4.2 15-Oct-1998  nisimura - Mistakenly removed from repository. No difference from CVS main tree.
 1.8.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.10.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.8.2 08-Dec-2000  bouyer Sync with HEAD.
 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.11.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.13.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.4.2 11-Dec-2002  thorpej Sync with HEAD.
 1.14.4.1 23-Oct-2001  thorpej file std.pmax was added on branch nathanw_sa on 2002-12-11 06:11:34 +0000
 1.15.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.15.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.6.1 03-Aug-2004  skrll Sync with HEAD
 1.16.16.1 21-Jun-2006  yamt sync with head.
 1.18.182.1 01-Aug-2021  thorpej Sync with HEAD.
 1.3 14-Jul-2021  thorpej Enable VMSWAP_DEFAULT_PLAINTEXT as default.
 1.2 14-Dec-2009  matt branches: 1.2.4; 1.2.82;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.1 08-Sep-2009  matt branches: 1.1.2;
file std.pmax64 was initially added on branch matt-nb5-mips64.
 1.1.2.2 12-Sep-2009  matt Add COMPAT_NETBSD32 support.
 1.1.2.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.2.82.1 01-Aug-2021  thorpej Sync with HEAD.
 1.2.4.2 11-Mar-2010  yamt sync with head
 1.2.4.1 14-Dec-2009  yamt file std.pmax64 was added on branch yamt-nfs-mp on 2010-03-11 15:02:48 +0000
 1.10 24-Nov-1999  thorpej Delete now-unreferenced files.
 1.9 10-May-1999  simonb branches: 1.9.2; 1.9.8;
Back out part of previous commit - we really only support one px at
the moment. From Andy Doran.
 1.8 10-May-1999  simonb Change {cfb,mfb,sfb,px}0 to {cfb,mfb,sfb,px}*.
 1.7 27-Mar-1999  simonb branches: 1.7.4;
Remove trailing white-space.
 1.6 27-Nov-1998  simonb White space and comment formatting police
 1.5 28-May-1998  matt branches: 1.5.4;
Add fat since it now works.
 1.4 05-Jan-1998  perry RCSID Police.
 1.3 10-Nov-1997  jonathan Add px placebo driver to standard pmax options.
 1.2 28-Jul-1997  mhitch branches: 1.2.6;
Add the PMAZ SCSI option.
 1.1 18-Sep-1996  jonathan Create broken-out config files for decstation baseboard devices.
Add sample config files that use them.
 1.2.6.1 12-Nov-1997  mellon Pull rev 1.3 up from trunk (jonathan)
 1.5.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.7.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.9.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.2.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.6 24-Nov-1999  thorpej Delete now-unreferenced files.
 1.5 27-Nov-1998  simonb branches: 1.5.10; 1.5.16;
White space and comment formatting police
 1.4 19-Apr-1998  jonathan branches: 1.4.4;
Rework pmax kernel config:
* ibus (virtual bus for baseboard direct-attach deviecs)
* 5100 support, using ibus
* rename "clock" to mcclock for future support of Qbus machiens
* use sys/dev/dec mcclock_pad32 machinery for pmax mcclock
* reworked TC config code.
 1.3 05-Jan-1998  perry RCSID Police.
 1.2 03-Dec-1996  cgd Fix up includes so that up-to-date versions of 'config' can be used
to config pmax kernels. Not all kernels can actually be config'd because
of device declaration problems, but i don't know how to fix those.
 1.1 18-Sep-1996  jonathan Create broken-out config files for decstation baseboard devices.
Add sample config files that use them.
 1.4.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.5.16.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.10.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file dc.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.10 20-Nov-1999  nisimura Make these more realistic codes and fix many errors I made, getting
closer to dev/qbus/dz.c. No control lead status change scanner, yet.
 1.1.2.9 19-Nov-1999  nisimura Make these more realistic mockup codes; dckbd.c and dcms.c are not useful
before I commit changes in dev/dec/ directory.
 1.1.2.8 17-Apr-1999  nisimura - Introduce 'dctty' as a child node of 'dc'. It's a sibling of 'dckbd'
and 'dcms'.
- Needs rework of how to send any data to keyboard and mouse.
attmt.sendchar is evil. It'd be nice to have flexible framework of
two way communication channels between wskbd/wsmouse and lower device
layer.
 1.1.2.7 17-Apr-1999  nisimura - Add a sketch work of 'dctty' device node.
 1.1.2.6 15-Mar-1999  nisimura - Decouple "ibus" from TC device implementation.
- Move IOASIC initialization to platform.os_init().
 1.1.2.5 07-Jan-1999  nisimura - Fix an error in uninitialized pointer use. (needs to have tty subdevices
similiar to zstty).
 1.1.2.4 26-Oct-1998  nisimura - Have dc_ibus.c to split DC7085 driver body and MD match/attach routines
as Matt Thomas suggested. Needs more work to move dc.c at dev/dec/.
- Abandon TIOC{MSET,MBIS,MBIC} ioctls.
- Fix typos in dc7085var.h
 1.1.2.3 23-Oct-1998  nisimura - Some modifications for NWSCONS integrity. dc driver will take LK201 and
VSXXX as child devices.
 1.1.2.2 21-Oct-1998  nisimura - Add symbolic definitions for DC7085 quad line UART hardware registers.
- Pay more attention to provide "No framebuffer device configured" message
in the case of kernel with either no NWSCONS or unsupported TC option is
booted from bitmap console.
- A little progress in dc.c preparing for dckbd.c.
 1.1.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.1 21-Oct-1998  nisimura branches: 1.1.2;
file dc7085reg.h was initially added on branch nisimura-pmax-wscons.
 1.1.2.2 17-Apr-1999  nisimura - Introduce 'dctty' as a child node of 'dc'. It's a sibling of 'dckbd'
and 'dcms'.
- Needs rework of how to send any data to keyboard and mouse.
attmt.sendchar is evil. It'd be nice to have flexible framework of
two way communication channels between wskbd/wsmouse and lower device
layer.
 1.1.2.1 21-Oct-1998  nisimura - Add symbolic definitions for DC7085 quad line UART hardware registers.
- Pay more attention to provide "No framebuffer device configured" message
in the case of kernel with either no NWSCONS or unsupported TC option is
booted from bitmap console.
- A little progress in dc.c preparing for dckbd.c.
 1.1 23-Oct-1998  nisimura branches: 1.1.2;
file dc7085var.h was initially added on branch nisimura-pmax-wscons.
 1.1.2.6 26-Nov-1999  nisimura Fix errors I made; make compilable and use unit number in 'struct device'.
 1.1.2.5 20-Nov-1999  nisimura Make these more realistic codes and fix many errors I made, getting
closer to dev/qbus/dz.c. No control lead status change scanner, yet.
 1.1.2.4 19-Nov-1999  nisimura Make these more realistic mockup codes; dckbd.c and dcms.c are not useful
before I commit changes in dev/dec/ directory.
 1.1.2.3 17-Apr-1999  nisimura - Introduce 'dctty' as a child node of 'dc'. It's a sibling of 'dckbd'
and 'dcms'.
- Needs rework of how to send any data to keyboard and mouse.
attmt.sendchar is evil. It'd be nice to have flexible framework of
two way communication channels between wskbd/wsmouse and lower device
layer.
 1.1.2.2 26-Oct-1998  nisimura - Have dc_ibus.c to split DC7085 driver body and MD match/attach routines
as Matt Thomas suggested. Needs more work to move dc.c at dev/dec/.
- Abandon TIOC{MSET,MBIS,MBIC} ioctls.
- Fix typos in dc7085var.h
 1.1.2.1 23-Oct-1998  nisimura - Some modifications for NWSCONS integrity. dc driver will take LK201 and
VSXXX as child devices.
 1.1 26-Oct-1998  nisimura branches: 1.1.2;
file dc_ibus.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.5 26-Nov-1999  nisimura Fix errors I made; make compilable and use unit number in 'struct device'.
 1.1.2.4 25-Nov-1999  nisimura Use submatch() technique for matche sequence for implicit default case.
 1.1.2.3 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.1.2.2 17-Apr-1999  nisimura - Introduce 'dctty' as a child node of 'dc'. It's a sibling of 'dckbd'
and 'dcms'.
- Needs rework of how to send any data to keyboard and mouse.
attmt.sendchar is evil. It'd be nice to have flexible framework of
two way communication channels between wskbd/wsmouse and lower device
layer.
 1.1.2.1 26-Oct-1998  nisimura - Have dc_ibus.c to split DC7085 driver body and MD match/attach routines
as Matt Thomas suggested. Needs more work to move dc.c at dev/dec/.
- Abandon TIOC{MSET,MBIS,MBIC} ioctls.
- Fix typos in dc7085var.h
 1.1 31-Mar-1999  nisimura branches: 1.1.2;
file dckbd.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.4 25-Nov-1999  nisimura Make these mockups more realistic to fit WSCONS.
 1.1.2.3 19-Nov-1999  nisimura Make these more realistic mockup codes; dckbd.c and dcms.c are not useful
before I commit changes in dev/dec/ directory.
 1.1.2.2 17-Apr-1999  nisimura - Introduce 'dctty' as a child node of 'dc'. It's a sibling of 'dckbd'
and 'dcms'.
- Needs rework of how to send any data to keyboard and mouse.
attmt.sendchar is evil. It'd be nice to have flexible framework of
two way communication channels between wskbd/wsmouse and lower device
layer.
 1.1.2.1 31-Mar-1999  nisimura - Add LK201/VSXXX mouse codes for PMAX and 3MAX for reference. These
codes need reworks. 'dc' device should be like as 'zsc' having sub nodes
for 'dctty', 'lkkbd' and 'vsms.' The structure would be also good for
2nd and 3rd 4-channel serials of 5100.
 1.1 31-Mar-1999  nisimura branches: 1.1.2;
file dcms.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.5 25-Nov-1999  nisimura Use submatch() technique for matche sequence for implicit default case.
 1.1.2.4 25-Nov-1999  nisimura Make these mockups more realistic to fit WSCONS.
 1.1.2.3 19-Nov-1999  nisimura Make these more realistic mockup codes; dckbd.c and dcms.c are not useful
before I commit changes in dev/dec/ directory.
 1.1.2.2 17-Apr-1999  nisimura - Introduce 'dctty' as a child node of 'dc'. It's a sibling of 'dckbd'
and 'dcms'.
- Needs rework of how to send any data to keyboard and mouse.
attmt.sendchar is evil. It'd be nice to have flexible framework of
two way communication channels between wskbd/wsmouse and lower device
layer.
 1.1.2.1 31-Mar-1999  nisimura - Add LK201/VSXXX mouse codes for PMAX and 3MAX for reference. These
codes need reworks. 'dc' device should be like as 'zsc' having sub nodes
for 'dctty', 'lkkbd' and 'vsms.' The structure would be also good for
2nd and 3rd 4-channel serials of 5100.
 1.1 17-Apr-1999  nisimura branches: 1.1.2;
file dctty.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.6 26-Nov-1999  nisimura Fix errors I made; make compilable and use unit number in 'struct device'.
 1.1.2.5 25-Nov-1999  nisimura Make these mockups more realistic to fit WSCONS.
 1.1.2.4 20-Nov-1999  nisimura Make these more realistic codes and fix many errors I made, getting
closer to dev/qbus/dz.c. No control lead status change scanner, yet.
 1.1.2.3 19-Nov-1999  nisimura Make these more realistic mockup codes; dckbd.c and dcms.c are not useful
before I commit changes in dev/dec/ directory.
 1.1.2.2 29-Oct-1999  drochner add missing newline in attach printout
 1.1.2.1 17-Apr-1999  nisimura - Introduce 'dctty' as a child node of 'dc'. It's a sibling of 'dckbd'
and 'dcms'.
- Needs rework of how to send any data to keyboard and mouse.
attmt.sendchar is evil. It'd be nice to have flexible framework of
two way communication channels between wskbd/wsmouse and lower device
layer.
 1.14 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.13 24-Apr-2021  thorpej branches: 1.13.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.12 18-May-2017  christos branches: 1.12.24;
PR/52242: Utkarsh Anand: Minimal fix for fallout from moving to the common
mips bus_space code.
 1.11 09-Jul-2011  matt branches: 1.11.12; 1.11.30; 1.11.44;
Cleanu <machine/*> includes
 1.10 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.9 28-Apr-2008  martin branches: 1.9.18; 1.9.22; 1.9.28; 1.9.30;
Remove clause 3 and 4 from TNF licenses
 1.8 29-Mar-2008  tsutsui branches: 1.8.2; 1.8.4;
- don't forget to set sc_dev
- use aprint_*() variants
 1.7 15-Mar-2008  matt Switch dz driver to PRIVALLOC and device_* accessors.
 1.6 17-Oct-2007  garbled branches: 1.6.12; 1.6.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.5 09-Oct-2007  ad Merge from vmlocking: add more calls to DELAY().
 1.4 04-Mar-2007  christos branches: 1.4.2; 1.4.10; 1.4.18; 1.4.20; 1.4.22;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 13-Dec-2003  ad branches: 1.2.16;
Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.1 15-Mar-2002  ad branches: 1.1.2; 1.1.12;
file dz_ibus.c was initially added on branch ad_pmax_wscons.
 1.1.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.12.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.3 18-Sep-2002  ad Minor tweaks.
 1.1.2.2 18-Sep-2002  ad - Attach keyboard/mouse only on 3MAX and PMAX.
- The mouse needs 8-bit characters, not 7.
 1.1.2.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.2.16.3 17-Mar-2008  yamt sync with head.
 1.2.16.2 27-Oct-2007  yamt sync with head.
 1.2.16.1 03-Sep-2007  yamt sync with head.
 1.3.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.4.22.1 14-Oct-2007  yamt sync with head.
 1.4.20.2 23-Mar-2008  matt sync with HEAD
 1.4.20.1 06-Nov-2007  matt sync with HEAD
 1.4.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.4.10.1 16-Oct-2007  garbled Sync with HEAD
 1.4.2.1 15-Jul-2007  ad On mips, add a bunch more delays. Behaves a lot better now.
 1.6.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.6.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.6.12.1 24-Mar-2008  keiichi sync with head.
 1.8.4.1 16-May-2008  yamt sync with head.
 1.8.2.1 18-May-2008  yamt sync with head.
 1.9.30.1 05-Mar-2011  bouyer Sync with HEAD
 1.9.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.9.22.1 05-Mar-2011  rmind sync with head
 1.9.18.1 29-Dec-2010  matt De-__P
Ansify
make LP64 clean.
 1.11.44.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.11.30.1 28-Aug-2017  skrll Sync with HEAD
 1.11.12.1 03-Dec-2017  jdolecek update from HEAD
 1.12.24.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.13.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.23 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.22 24-Apr-2021  thorpej branches: 1.22.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.21 09-Jun-2015  matt branches: 1.21.32;
#include either <sys/cpu.h> or <mips/cpuregs.h> as needed
 1.20 09-Jul-2011  matt branches: 1.20.12; 1.20.30;
Cleanu <machine/*> includes
 1.19 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.18 16-Mar-2009  dsl branches: 1.18.4; 1.18.6; 1.18.8;
ANSIfy functions with function-pointer arguments
 1.17 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.16 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.15 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.14 04-Mar-2007  christos branches: 1.14.44; 1.14.52; 1.14.58; 1.14.62;
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 26-Aug-2005  drochner kill some more simple submatch() functions, use config_stdsubmatch()
 1.11 25-Aug-2005  drochner replace the "locdesc_t" structure carrying the number of locators
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
 1.10 13-Sep-2004  drochner branches: 1.10.12;
autoconf cleanup: turn xxxsubmatch() functions into the locator
passing variants
 1.9 01-Jan-2003  thorpej branches: 1.9.2;
Use aprint_normal() for cfprint routines.
 1.8 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.7 29-Feb-2000  nisimura branches: 1.7.8; 1.7.12;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.6 14-Jan-2000  ad Make consistant with the new order.
 1.5 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.4 24-Nov-1999  thorpej Make separate device lists for the 3100 and 5100, and add a way to probe
for optional `dc' devices on the 5100.
 1.3 23-Nov-1999  thorpej Add an `addr' locator to the `ibus' bus. This allows you to wire down
unti numbers on systems which have e.g. multiple `dc' devices on the
internal bus (like the 5100).
 1.2 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.1 19-Apr-1998  jonathan branches: 1.1.4; 1.1.16; 1.1.22;
Support shared Decstation 3100 and Decsystem 5100 baseboard devices
using a virtual "ibus" for baseboard devices.
 1.1.22.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.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.1.4.2 14-Mar-2000  nisimura Synchronize with the efforts made lately in main trunk, filling gaps.
 1.1.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.7.12.2 03-Jan-2003  thorpej Sync with HEAD.
 1.7.12.1 18-Oct-2002  nathanw Catch up to -current.
 1.7.8.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.2.3 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.2 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.1 18-Sep-2004  skrll Sync with HEAD.
 1.10.12.2 03-Sep-2007  yamt sync with head.
 1.10.12.1 21-Jun-2006  yamt sync with head.
 1.13.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.62.1 29-Dec-2010  matt De-__P
Ansify
make LP64 clean.
 1.14.58.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.52.1 28-Apr-2009  skrll Sync with HEAD.
 1.14.44.1 04-May-2009  yamt sync with head.
 1.18.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.18.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.18.4.1 05-Mar-2011  rmind sync with head
 1.20.30.1 22-Sep-2015  skrll Sync with HEAD
 1.20.12.1 03-Dec-2017  jdolecek update from HEAD
 1.21.32.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.21.32.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.22.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.4 24-Apr-1999  simonb branches: 1.4.2; 1.4.8;
Nuke register and remove trailling white space.
 1.3 15-Mar-1999  nisimura branches: 1.3.4;
- Decouple "ibus" from TURBOchannel.
- Nuke mainbus_softc definition (it's empty).
 1.2 23-Oct-1998  jonathan Garbage-collect obsolete "field" intpri from ibus_attach_args.
clean up initalizers to use correct, in-range values for ia_cookie,
which is what ibus children passed down to ibus_intr_establish.
 1.1 19-Apr-1998  jonathan branches: 1.1.4;
Support shared Decstation 3100 and Decsystem 5100 baseboard devices
using a virtual "ibus" for baseboard devices.
 1.1.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.3.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.4.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.4.2.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.16 16-Nov-2016  macallan switch to common MIPS bus_space and bus_dma
tested by flxd@
 1.15 09-Jul-2011  matt branches: 1.15.12; 1.15.30; 1.15.34;
Cleanu <machine/*> includes
 1.14 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.13 14-Mar-2009  dsl branches: 1.13.4; 1.13.6; 1.13.8;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.12 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.11 26-May-2008  nisimura branches: 1.11.6; 1.11.12; 1.11.16;
- assign 2 clause TNF license to the files cited as my ownership.
- abandon and remove my copyright notice from the three files were
copied in order to adapt HW I don't have; pvr.c, pm.c and stic.c
 1.10 02-Oct-2002  thorpej branches: 1.10.108; 1.10.110; 1.10.112; 1.10.114;
Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 29-Feb-2000  nisimura branches: 1.8.6; 1.8.10; 1.8.14;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.7 14-Jan-2000  ad Make consistant with the new order.
 1.6 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.5 08-Jan-2000  simonb Function prototype cleanup.
 1.4 11-Dec-1999  simonb branches: 1.4.2;
Revert previous - the problem was a hard-coded KN01 dc address, not the
cookie value.
 1.3 30-Nov-1999  nisimura Fix 3max DC cookie value; should make 3max serial port working.
 1.2 24-Nov-1999  thorpej Make separate device lists for the 3100 and 5100, and add a way to probe
for optional `dc' devices on the 5100.
 1.1 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.4.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.14.1 18-Oct-2002  nathanw Catch up to -current.
 1.8.10.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.8.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.8.6.1 29-Feb-2000  bouyer file ibus_3max.c was added on branch thorpej_scsipi on 2000-11-20 22:35:43 +0000
 1.10.114.2 24-Jun-2008  wrstuden Hand-merge files that didn't merge right in recent sync w/ current.
 1.10.114.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.10.112.1 04-May-2009  yamt sync with head.
 1.10.110.1 04-Jun-2008  yamt sync with head
 1.10.108.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.16.1 29-Dec-2010  matt De-__P
Ansify
make LP64 clean.
 1.11.12.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11.6.1 28-Apr-2009  skrll Sync with HEAD.
 1.13.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.13.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.4.1 05-Mar-2011  rmind sync with head
 1.15.34.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.15.30.1 05-Dec-2016  skrll Sync with HEAD
 1.15.12.1 03-Dec-2017  jdolecek update from HEAD
 1.6 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.5 29-Jun-1999  ad branches: 1.5.2; 1.5.8;
Kill duplicate RCS ID line at top of file.
 1.4 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.3 15-Mar-1999  nisimura branches: 1.3.4;
- Decouple "ibus" from TURBOchannel.
- Nuke mainbus_softc definition (it's empty).
 1.2 23-Oct-1998  jonathan Garbage-collect obsolete "field" intpri from ibus_attach_args.
clean up initalizers to use correct, in-range values for ia_cookie,
which is what ibus children passed down to ibus_intr_establish.
 1.1 19-Apr-1998  jonathan branches: 1.1.4;
Support shared Decstation 3100 and Decsystem 5100 baseboard devices
using a virtual "ibus" for baseboard devices.
 1.1.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.3.4.2 01-Jul-1999  thorpej Sync w/ -current.
 1.3.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.5.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.2.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.24 16-Nov-2016  macallan switch to common MIPS bus_space and bus_dma
tested by flxd@
 1.23 09-Jul-2011  matt branches: 1.23.12; 1.23.30; 1.23.34;
Cleanu <machine/*> includes
 1.22 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.21 14-Mar-2009  dsl branches: 1.21.4; 1.21.6; 1.21.8;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.20 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.19 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.18 02-Oct-2002  thorpej branches: 1.18.112; 1.18.120; 1.18.126; 1.18.130;
Use CFATTACH_DECL().
 1.17 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.16 29-Feb-2000  nisimura branches: 1.16.8; 1.16.12;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.15 14-Jan-2000  ad - Make consistant with the new order.
- Ammend comment about PrestoServe.
 1.14 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.13 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.12 08-Jan-2000  simonb Function prototype cleanup.
 1.11 08-Dec-1999  simonb branches: 1.11.2;
Fix gaff in previous - need <kn230.h> and use _SYS_DZ0 not _SYS_DZ for
5100 console device.
 1.10 07-Dec-1999  simonb Use KN230_SYS_* names for 5100 device addresses.
 1.9 24-Nov-1999  simonb Don't check for additional dc instances yet.
 1.8 24-Nov-1999  simonb Fix tyop in comment.
 1.7 24-Nov-1999  thorpej Make separate device lists for the 3100 and 5100, and add a way to probe
for optional `dc' devices on the 5100.
 1.6 19-Nov-1999  nisimura Move declarations of 3100/5100 ibus interrupt establishment routines
to ibusvar.h
 1.5 19-Nov-1999  simonb Include "opt_dec_{3,5}100.h" so we know what models are
configured. Also fix prototypes for dec_3100_intr_establish()
and dec_3100_intr_disestablish().
 1.4 19-Nov-1999  nisimura Fix system type case analysis error; pointed by John.P.Darrow@wheaton.edu.
 1.3 17-Nov-1999  nisimura Consistent panic messages when erroneous kernel configurations are found.
 1.2 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.1 15-Oct-1998  nisimura branches: 1.1.2; 1.1.4;
file ibus_pmax.c was initially added on branch nisimura-pmax-wscons.
 1.1.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.1.2.5 14-Mar-2000  nisimura Synchronize with the efforts made lately in main trunk, filling gaps.
 1.1.2.4 19-Nov-1999  nisimura Cookie names were changed for two 4.ch serial option cards for 5100.
 1.1.2.3 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.1.2.2 11-May-1999  nisimura - Correct the case analysis error in ibus_pmax.c
- Now about to remove #if NTC > 0 in mainbus.c
 1.1.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.11.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.16.12.1 18-Oct-2002  nathanw Catch up to -current.
 1.16.8.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.18.130.1 29-Dec-2010  matt De-__P
Ansify
make LP64 clean.
 1.18.126.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.120.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.112.1 04-May-2009  yamt sync with head.
 1.21.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.21.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.21.4.1 05-Mar-2011  rmind sync with head
 1.23.34.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.23.30.1 05-Dec-2016  skrll Sync with HEAD
 1.23.12.1 03-Dec-2017  jdolecek update from HEAD
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file ibus_subr.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.2 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.1.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.20 09-Jul-2011  matt Cleanu <machine/*> includes
 1.19 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.18 14-Mar-2009  dsl branches: 1.18.4; 1.18.6; 1.18.8;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.17 04-Mar-2007  christos branches: 1.17.44; 1.17.52; 1.17.58; 1.17.62;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.16 29-Feb-2000  nisimura branches: 1.16.46; 1.16.84;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.15 14-Jan-2000  ad Make consistant with the new order.
 1.14 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.13 09-Jan-2000  simonb Use the badaddr() prototype in mips/include/cpu.h by including
<machine/cpu.h> in mips/include/mips_param.h. Remove duplicate
badaddr() prototypes from some pmax header files.
 1.12 08-Jan-2000  simonb Function prototype cleanup.
 1.11 24-Nov-1999  thorpej Make separate device lists for the 3100 and 5100, and add a way to probe
for optional `dc' devices on the 5100.
 1.10 23-Nov-1999  thorpej Add an `addr' locator to the `ibus' bus. This allows you to wire down
unti numbers on systems which have e.g. multiple `dc' devices on the
internal bus (like the 5100).
 1.9 19-Nov-1999  simonb Remove function declarations already declared in ibusvar.h and
fix typo in dec_3100_intr_*() declarations.
 1.8 19-Nov-1999  nisimura Move declarations of 3100/5100 ibus interrupt establishment routines
to ibusvar.h
 1.7 17-Nov-1999  nisimura A file which escaped from 11/15 jombo commit work.
 1.6 24-Apr-1999  simonb branches: 1.6.2; 1.6.8;
Nuke register and remove trailling white space.
 1.5 15-Mar-1999  nisimura branches: 1.5.4;
- Rearrangement for TC decoupling with some typo fixes.
 1.4 15-Mar-1999  nisimura - Decouple "ibus" from TURBOchannel.
- Nuke mainbus_softc definition (it's empty).
 1.3 23-Oct-1998  jonathan Garbage-collect obsolete "field" intpri from ibus_attach_args.
clean up initalizers to use correct, in-range values for ia_cookie,
which is what ibus children passed down to ibus_intr_establish.
 1.2 29-Aug-1998  mrg branches: 1.2.2;
add "int" type to interrupt handler typedefs (egcs warning)
 1.1 19-Apr-1998  jonathan Support shared Decstation 3100 and Decsystem 5100 baseboard devices
using a virtual "ibus" for baseboard devices.
 1.2.2.5 14-Mar-2000  nisimura Synchronize with the efforts made lately in main trunk, filling gaps.
 1.2.2.4 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.2.2.3 15-Mar-1999  nisimura - Decouple "ibus" from TC device implementation.
- Move IOASIC initialization to platform.os_init().
 1.2.2.2 15-Mar-1999  nisimura - Decouple "ibus" from TURBOchannel implementation.
- Sync. with main trunk.
 1.2.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.5.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.6.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.16.84.1 12-Mar-2007  rmind Sync with HEAD.
 1.16.46.1 03-Sep-2007  yamt sync with head.
 1.17.62.1 29-Dec-2010  matt De-__P
Ansify
make LP64 clean.
 1.17.58.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.17.52.1 28-Apr-2009  skrll Sync with HEAD.
 1.17.44.1 04-May-2009  yamt sync with head.
 1.18.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.18.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.18.4.1 05-Mar-2011  rmind sync with head
 1.13 04-Apr-2008  tsutsui Split device_t/softc for le(4) and variants and misc cosmetic changes.
 1.12 04-Jan-2008  ad branches: 1.12.6;
Include sys/device explicitly.
 1.11 06-Mar-2007  simonb branches: 1.11.20; 1.11.26; 1.11.32;
Fix some caddr_t rototill fallout.

Some from Erik Bertelsen on port-pmax@.
 1.10 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.9 11-Dec-2005  christos branches: 1.9.26;
merge ktrace-lwp.
 1.8 15-Jul-2003  lukem branches: 1.8.16;
__KERNEL_RCSID()
 1.7 02-Oct-2002  thorpej branches: 1.7.6;
Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 26-Sep-2002  thorpej G/c external reference to ibus_cd.
 1.4 26-Sep-2002  thorpej No need to check that that parent's cfdriver is ibus_cd.
 1.3 08-Jan-2002  chs include sys/systm.h for strcmp() prototype.
 1.2 01-Oct-2001  simonb branches: 1.2.4;
Move pmax-only if_le_ibus.c from dev/tc to arch/pmax/ibus.
 1.1 15-Oct-1998  nisimura branches: 1.1.2; 1.1.6; 1.1.8;
file if_le_ibus.c was initially added on branch nisimura-pmax-wscons.
 1.1.8.1 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.1.6.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.3 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.1.2.2 19-Mar-1999  nisimura - This LANCE is a child node of 'ibus' and has nothing to do with TC.
 1.1.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.2.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.2 11-Jan-2002  nathanw More catchup.
 1.2.4.1 01-Oct-2001  nathanw file if_le_ibus.c was added on branch nathanw_sa on 2002-01-11 23:38:41 +0000
 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.16.2 21-Jan-2008  yamt sync with head
 1.8.16.1 03-Sep-2007  yamt sync with head.
 1.9.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.11.32.1 08-Jan-2008  bouyer Sync with HEAD
 1.11.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.20.1 09-Jan-2008  matt sync with HEAD
 1.12.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.19 09-Jun-2015  matt #include either <sys/cpu.h> or <mips/cpuregs.h> as needed
 1.18 04-Jun-2011  tsutsui branches: 1.18.12; 1.18.30;
Split device_t/softc. Tested on GXemul.
 1.17 20-Feb-2011  matt branches: 1.17.2;
Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.16 14-Mar-2009  dsl branches: 1.16.4; 1.16.6; 1.16.8;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.15 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.14 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.13 03-Jan-2008  joerg branches: 1.13.10; 1.13.18; 1.13.24; 1.13.28;
Timecounter and generic todr support for pmax. From Garret D'Amore.
 1.12 02-Oct-2002  thorpej branches: 1.12.22; 1.12.84; 1.12.90; 1.12.98;
Use CFATTACH_DECL().
 1.11 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.10 26-Sep-2002  thorpej G/c external reference to ibus_cd.
 1.9 26-Sep-2002  thorpej No need to check that that parent's cfdriver is ibus_cd.
 1.8 08-Jan-2002  chs include sys/systm.h for strcmp() prototype.
 1.7 14-Jan-2000  ad branches: 1.7.8; 1.7.12;
Make consistant with the new order.
 1.6 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.5 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.4 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.3 24-Apr-1999  simonb branches: 1.3.2; 1.3.8;
Nuke register and remove trailling white space.
 1.2 19-Apr-1998  jonathan branches: 1.2.4; 1.2.12;
Copy alpha/tc/mcclock_ioasic.c (duplicated in pmax/tc/mcclock_ioasic.c)
into sys/dev/dec and split into a clockfns layer and a "middle" layer
for other DEC systems which use mcclocks with each onchip byte
register padded out to a 32-bit word.

Clone alpha/alpha/mcclock (also duplicated in pmax port) into
sys/dev/dec, and ifdef for default clockrates on pmax and alpha.

Use new machinery on pmax for ibus,ioasic attached mcclocks.
 1.1 19-Apr-1998  jonathan Support shared Decstation 3100 and Decsystem 5100 baseboard devices
using a virtual "ibus" for baseboard devices.
 1.2.12.1 21-Jun-1999  thorpej Sync w/ -current.
 1.2.4.1 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.3.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.12.3 18-Oct-2002  nathanw Catch up to -current.
 1.7.12.2 28-Feb-2002  nathanw Catch up to -current.
 1.7.12.1 11-Jan-2002  nathanw More catchup.
 1.7.8.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.7.8.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.98.1 08-Jan-2008  bouyer Sync with HEAD
 1.12.90.1 18-Feb-2008  mjf Sync with HEAD.
 1.12.84.1 09-Jan-2008  matt sync with HEAD
 1.12.22.1 21-Jan-2008  yamt sync with head
 1.13.28.1 29-Dec-2010  matt De-__P
Ansify
make LP64 clean.
 1.13.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.13.10.1 04-May-2009  yamt sync with head.
 1.16.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.16.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.16.4.2 12-Jun-2011  rmind sync with head
 1.16.4.1 05-Mar-2011  rmind sync with head
 1.17.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.18.30.1 22-Sep-2015  skrll Sync with HEAD
 1.18.12.1 03-Dec-2017  jdolecek update from HEAD
 1.19 11-Feb-2023  tsutsui Use MI <dev/ic/dc503reg.h> (added for vax smg(4)) for pmax pm(4) too.
 1.18 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.17 24-Apr-2021  thorpej branches: 1.17.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.16 18-Oct-2019  msaitoh branches: 1.16.10;
s/initalize/initialize/ in comment or printf message.
 1.15 24-Jan-2018  riastradh branches: 1.15.4;
Fix integer overflows noted by Silvio Cesare of InfoSect.

Someone^TM should name these idioms so we can eliminate this class of
copypasta bug.
 1.14 05-Jan-2018  flxd Check presence of VFB01/VFB02 frame buffer option on DEC(station|system) 3100.
 1.13 13-Jun-2017  spz correct size checks so they cannot be circumvented by integer overflows

reported by CTurt, thanks for the notification
 1.12 10-Nov-2013  christos branches: 1.12.4; 1.12.6; 1.12.8; 1.12.16; 1.12.22;
fix unused variable warnings
 1.11 11-Jan-2012  macallan branches: 1.11.2; 1.11.6; 1.11.8; 1.11.10; 1.11.16;
adjust for wsfont_find() change
 1.10 09-Jul-2011  matt branches: 1.10.2; 1.10.6;
Cleanu <machine/*> includes
 1.9 04-Jun-2011  tsutsui Split device_t/softc. No crash during device attach on GXemul.
 1.8 15-May-2010  tsutsui branches: 1.8.2; 1.8.6;
Set RI_NO_AUTO in ri_flg if init function is invoked from cnattach.
Untested. (3100 support seems somewhat broken, per gxemul output)
 1.7 26-May-2008  nisimura branches: 1.7.18; 1.7.20;
- assign 2 clause TNF license to the files cited as my ownership.
- abandon and remove my copyright notice from the three files were
copied in order to adapt HW I don't have; pvr.c, pm.c and stic.c
 1.6 28-Apr-2008  martin branches: 1.6.2;
Remove clause 3 and 4 from TNF licenses
 1.5 04-Mar-2007  christos branches: 1.5.40; 1.5.42; 1.5.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.4 12-Apr-2006  jmmv branches: 1.4.14;
Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called. The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place. There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.6; 1.3.8; 1.3.10; 1.3.12;
merge ktrace-lwp.
 1.2 13-Dec-2003  ad branches: 1.2.16;
Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.1 15-Oct-1998  nisimura branches: 1.1.2; 1.1.16; 1.1.26;
file pm.c was initially added on branch nisimura-pmax-wscons.
 1.1.26.4 13-Jan-2005  skrll Adapt to branch
 1.1.26.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.26.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.26.1 03-Aug-2004  skrll Sync with HEAD
 1.1.16.4 18-Sep-2002  ad Minor tweaks.
 1.1.16.3 25-Mar-2002  ad Remove some more debugging crud, and use the full screen.
 1.1.16.2 16-Mar-2002  ad Some fixes.
 1.1.16.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.1.2.17 14-Mar-2000  nisimura Switch to improved flexible video console text rasterizer provided by
rasops and wsfont.
 1.1.2.16 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.1.2.15 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.1.2.14 26-Oct-1999  nisimura Catchup to changes in main trunk. Remove debug message which is now
harmful due to SCSI device probe change. Enable WSSCREEN_REVERSE for
pm.c
 1.1.2.13 11-Aug-1999  nisimura - Take a special arrangement on RAMDAC colormap for monochrome.
 1.1.2.12 06-Apr-1999  nisimura - Fix a syntax error in the previous commit.
 1.1.2.11 06-Apr-1999  nisimura - Correct PCC cursor image update; loop was made 4 times larger than required.
 1.1.2.10 30-Mar-1999  nisimura - Track changes in main trunk and sweap codes.
- Make codes a bit descriptive that registers are aligned in 32bit boundary.
 1.1.2.9 29-Mar-1999  nisimura - Catch up to recent changes in main trunk.
- Reorganize various #include's.
- Yield memcpy to Mach derivated one.
- pm_cnattach() now checks the existense of framebuffer card.
 1.1.2.8 15-Mar-1999  nisimura - Decouple "ibus" from TC device implementation.
- Move IOASIC initialization to platform.os_init().
 1.1.2.7 02-Mar-1999  nisimura - Cursor image must be 32bit padded even though PCC can only handle 16x16.
 1.1.2.6 11-Jan-1999  drochner remove dummy "load_font" entries
 1.1.2.5 07-Jan-1999  nisimura - Fix an error in mmap address range check.
 1.1.2.4 24-Nov-1998  nisimura - Have cursor positioning magic parameters in softc variables as other
TC framebuffer drivers do.
 1.1.2.3 30-Oct-1998  nisimura - Make pm.c monochrome-aware and compilable with UVM.
- Make trap.c compilable with UVM.
- Place #ifdef _KERNEL guard in cpu.h
- Make asm.h more MIPS standard-alike while retaining current definitions.
 1.1.2.2 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.1.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.2.16.2 03-Sep-2007  yamt sync with head.
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.3.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.3.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.3.8.1 24-May-2006  yamt sync with head.
 1.3.6.1 22-Apr-2006  simonb Sync with head.
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.4.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.5.44.3 11-Aug-2010  yamt sync with head.
 1.5.44.2 04-May-2009  yamt sync with head.
 1.5.44.1 16-May-2008  yamt sync with head.
 1.5.42.2 04-Jun-2008  yamt sync with head
 1.5.42.1 18-May-2008  yamt sync with head.
 1.5.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.7.20.2 12-Jun-2011  rmind sync with head
 1.7.20.1 30-May-2010  rmind sync with head
 1.7.18.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.8.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.8.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.6.1 18-Feb-2012  mrg merge to -current.
 1.10.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.10.2.1 17-Apr-2012  yamt sync with head
 1.11.16.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #1456):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.11.10.1 18-May-2014  rmind sync with head
 1.11.8.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #1456):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.11.6.2 03-Dec-2017  jdolecek update from HEAD
 1.11.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.2.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #1456):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.12.22.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #39):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.12.16.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #1432):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.12.8.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #1432):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.12.6.1 28-Aug-2017  skrll Sync with HEAD
 1.12.4.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #1432):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.15.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.16.10.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.17.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 11-Feb-2023  tsutsui Use MI <dev/ic/dc503reg.h> (added for vax smg(4)) for pmax pm(4) too.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.1 15-Mar-2002  ad branches: 1.1.2; 1.1.12;
file pmreg.h was initially added on branch ad_pmax_wscons.
 1.1.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.12.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.16 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.15 24-Jul-2021  andvar branches: 1.15.2;
Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.14 24-Apr-2021  thorpej branches: 1.14.2;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.13 12-Dec-2016  maya branches: 1.13.30;
acknowleg -> acknowledg, proceedure -> procedure.
only comments were changed.

from miod
 1.12 20-Jun-2016  maya branches: 1.12.2;
Fix DEBUG build
While here, if DIAGNOSTIC panic to KASSERTMSG.

ok mlelstv@
 1.11 10-Nov-2013  christos branches: 1.11.6;
fix unused variable warnings
 1.10 09-Jul-2011  matt branches: 1.10.2; 1.10.12; 1.10.16;
Cleanu <machine/*> includes
 1.9 04-Jun-2011  tsutsui Split device_t/softc. No crash during device attach on GXemul.
 1.8 18-Mar-2009  cegger branches: 1.8.4; 1.8.6; 1.8.10;
Ansify function definitions w/o arguments. Generated with sed.
 1.7 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.6 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.5 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.4 17-Oct-2007  garbled branches: 1.4.20; 1.4.28; 1.4.34;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.3 14-Jul-2007  ad branches: 1.3.10;
This has been stuffed since 2006-04-17 - unbreak it.
 1.2 29-Jul-2006  ad branches: 1.2.14; 1.2.22;
Remove RASTERCONSOLE support from the pmax port.
 1.1 15-Mar-2002  ad branches: 1.1.2; 1.1.18; 1.1.28; 1.1.32;
file sii.c was initially added on branch ad_pmax_wscons.
 1.1.32.1 11-Aug-2006  yamt sync with head
 1.1.28.1 09-Sep-2006  rpaulo sync with head
 1.1.18.2 03-Sep-2007  yamt sync with head.
 1.1.18.1 30-Dec-2006  yamt sync with head.
 1.1.2.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.2.22.1 03-Oct-2007  garbled Sync with HEAD
 1.2.14.1 15-Jul-2007  ad Sync with head.
 1.3.10.1 06-Nov-2007  matt sync with HEAD
 1.4.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.20.1 04-May-2009  yamt sync with head.
 1.8.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.8.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.4.1 12-Jun-2011  rmind sync with head
 1.10.16.1 18-May-2014  rmind sync with head
 1.10.12.2 03-Dec-2017  jdolecek update from HEAD
 1.10.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.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.11.6.2 05-Feb-2017  skrll Sync with HEAD
 1.11.6.1 09-Jul-2016  skrll Sync with HEAD
 1.12.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.13.30.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.14.2.1 01-Aug-2021  thorpej Sync with HEAD.
 1.15.2.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.12 21-Sep-2024  andvar change u_int cast to uintprt_t to make it build for 64-bit kernel.

Fixes DIAGNOSTIC enabled build for pmax.
reviewed by simonb@
 1.11 04-Dec-2021  andvar branches: 1.11.10;
fix typos in comments and log messages, mainly in establish(ed).
 1.10 09-Jun-2015  matt #include either <sys/cpu.h> or <mips/cpuregs.h> as needed
 1.9 09-Jul-2011  matt branches: 1.9.12; 1.9.30;
Cleanu <machine/*> includes
 1.8 04-Jun-2011  tsutsui Split device_t/softc. No crash during device attach on GXemul.
 1.7 20-Feb-2011  matt branches: 1.7.2;
Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.6 14-Mar-2009  dsl branches: 1.6.4; 1.6.6; 1.6.8;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.5 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.4 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.3 04-Mar-2007  christos branches: 1.3.44; 1.3.52; 1.3.58; 1.3.62;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.2 29-Jul-2006  ad branches: 1.2.10;
Remove RASTERCONSOLE support from the pmax port.
 1.1 15-Mar-2002  ad branches: 1.1.2; 1.1.18; 1.1.28; 1.1.32;
file sii_ds.c was initially added on branch ad_pmax_wscons.
 1.1.32.1 11-Aug-2006  yamt sync with head
 1.1.28.1 09-Sep-2006  rpaulo sync with head
 1.1.18.2 03-Sep-2007  yamt sync with head.
 1.1.18.1 30-Dec-2006  yamt sync with head.
 1.1.2.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.2.10.1 12-Mar-2007  rmind Sync with HEAD.
 1.3.62.1 29-Dec-2010  matt De-__P
Ansify
make LP64 clean.
 1.3.58.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.52.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.44.1 04-May-2009  yamt sync with head.
 1.6.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.6.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.4.2 12-Jun-2011  rmind sync with head
 1.6.4.1 05-Mar-2011  rmind sync with head
 1.7.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.9.30.1 22-Sep-2015  skrll Sync with HEAD
 1.9.12.1 03-Dec-2017  jdolecek update from HEAD
 1.11.10.1 02-Aug-2025  perseant Sync with HEAD
 1.3 17-Aug-2021  andvar fix multiplei repetitive typos in comments, messages and documentation. mainly because copy paste code big amount of files are affected.
 1.2 29-Jul-2006  ad Remove RASTERCONSOLE support from the pmax port.
 1.1 15-Mar-2002  ad branches: 1.1.2; 1.1.18; 1.1.28; 1.1.32;
file siireg.h was initially added on branch ad_pmax_wscons.
 1.1.32.1 11-Aug-2006  yamt sync with head
 1.1.28.1 09-Sep-2006  rpaulo sync with head
 1.1.18.1 30-Dec-2006  yamt sync with head.
 1.1.2.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.5 26-Dec-2021  andvar fix various typos, mainly in comments.
 1.4 04-Jun-2011  tsutsui Split device_t/softc. No crash during device attach on GXemul.
 1.3 14-Mar-2009  dsl branches: 1.3.4; 1.3.6; 1.3.10;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.2 29-Jul-2006  ad branches: 1.2.62; 1.2.70; 1.2.76; 1.2.80;
Remove RASTERCONSOLE support from the pmax port.
 1.1 15-Mar-2002  ad branches: 1.1.2; 1.1.18; 1.1.28; 1.1.32;
file siivar.h was initially added on branch ad_pmax_wscons.
 1.1.32.1 11-Aug-2006  yamt sync with head
 1.1.28.1 09-Sep-2006  rpaulo sync with head
 1.1.18.1 30-Dec-2006  yamt sync with head.
 1.1.2.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.2.80.1 29-Dec-2010  matt De-__P
Ansify
make LP64 clean.
 1.2.76.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.70.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.62.1 04-May-2009  yamt sync with head.
 1.3.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.4.1 12-Jun-2011  rmind sync with head
 1.40 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.39 12-Jul-2018  maxv branches: 1.39.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.38 21-Dec-2015  christos branches: 1.38.16; 1.38.18;
Add mips fenv.h (From FreeBSD)
 1.37 23-Jul-2014  alnsn branches: 1.37.4;
Rename sljitarch.h to sljit_machdep.h.
 1.36 22-Jul-2014  alnsn Add sljitarch.h to cobalt and pmax.
 1.35 17-Jul-2011  joerg branches: 1.35.12; 1.35.26;
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.34 12-Aug-2009  matt Nuke a.out support for MIPS.
 1.33 18-Feb-2007  ad branches: 1.33.46;
+ mutex.h, rwlock.h
 1.32 29-Jul-2006  ad branches: 1.32.10;
Remove RASTERCONSOLE support from the pmax port.
 1.31 26-Jul-2006  drochner don't install <machine/db_machdep.h>, this is kernel only
 1.30 11-Dec-2005  christos branches: 1.30.4; 1.30.8;
merge ktrace-lwp.
 1.29 08-May-2004  kleink branches: 1.29.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.28 18-Jan-2003  thorpej branches: 1.28.2;
Merge the nathanw_sa branch.
 1.27 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.26 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.25 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.24 30-Nov-2001  gmcgarry branches: 1.24.10;
Remove clock_machdep.h.
 1.23 19-Sep-2001  thorpej branches: 1.23.4;
Remove pmax-specific fbio.h -- everything uses <dev/sun/fbio.h> now.
 1.22 15-Apr-2001  kleink branches: 1.22.2; 1.22.4;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.21 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.20 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
 1.19 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.18 26-Jun-2000  kleink branches: 1.18.2;
Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.17 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.16 30-Mar-2000  soren Add asm.h like other ports.
 1.15 17-Mar-2000  tron Install "machineendian_machdep.h".
 1.14 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.13 09-Nov-1999  kleink Per discussion on tech-toolchain, remove MIPS-specific <machine/elf.h> header;
all the information is available from <sys/exec_elf.h>.
 1.12 25-Oct-1999  simonb Don't let loadfile_machdep.h make it to /usr/include - the pmax
stand Makefiles already set up the compile environment so that
machine/loadfile_machdep.h can be found.

XXX: Not done for i386, mmeye or sparc - I can't test these at the
moment. It should be as simple as making a machine symlink
pointing to .<some number of ../'s>./include in the objdir...
 1.11 30-Aug-1999  mrg branches: 1.11.2; 1.11.4; 1.11.6;
install ieee.h
 1.10 19-Jul-1999  simonb Put tc_machdep.h back - the X server needs it to build.
 1.9 28-Apr-1999  christos Add loadfile_machdep.h
 1.8 30-Mar-1999  soda branches: 1.8.2; 1.8.4; 1.8.6;
regdef.h is back
 1.7 30-Mar-1999  simonb Don't install sysconf.h - nothing is exported to userland in this file.
 1.6 13-Mar-1999  drochner regdef.h is gone
 1.5 12-Mar-1999  nisimura - Exclude 'tc_machdep.h' from installed in /usr/include/machine/ directory.
 1.4 31-Jan-1999  castor Remove genpubasym.cf stuff
 1.3 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.2 15-Jan-1999  castor allow generated kernel includes and support mips pubassym.cf mechanism
 1.1 12-Jun-1998  cgd branches: 1.1.4;
Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
 1.1.4.5 14-Mar-2000  nisimura Synchronize with the recent progress in main trunk. Main trunk is
close enough with this.
 1.1.4.4 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.1.4.3 15-Mar-1999  nisimura - Adjustment for 'machine/conf.h' removal.
- A bit cleanup of handcrafted TC device config.
 1.1.4.2 24-Feb-1999  drochner there is no regdef.h
 1.1.4.1 24-Feb-1999  nisimura - Synchronize with recent changes in main trunk.
 1.8.6.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

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

synchronization to latest KAME will take place on HEAD branch soon.
 1.8.4.2 02-Aug-1999  thorpej Update from trunk.
 1.8.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.8.2.1 09-Aug-1999  cgd pull up contents of rev 1.10 (via patch). (simonb)
 1.11.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.4.1 15-Nov-1999  fvdl Sync with -current
 1.11.2.2 21-Apr-2001  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.18.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.22.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.22.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.22.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.22.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.23.4.6 11-Dec-2002  thorpej Sync with HEAD.
 1.23.4.5 17-Sep-2002  nathanw Catch up to -current.
 1.23.4.4 13-Aug-2002  nathanw Catch up to -current.
 1.23.4.3 08-Jan-2002  nathanw Catch up to -current.
 1.23.4.2 17-Nov-2001  wdk mcontext support for MIPS based ports.
 1.23.4.1 19-Sep-2001  wdk file Makefile was added on branch nathanw_sa on 2001-11-17 23:12:11 +0000
 1.24.10.2 31-Aug-2002  gehenna catch up with -current.
 1.24.10.1 19-May-2002  gehenna Remove port-dependent conf.h.
 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.12.2 26-Feb-2007  yamt sync with head.
 1.29.12.1 30-Dec-2006  yamt sync with head.
 1.30.8.1 11-Aug-2006  yamt sync with head
 1.30.4.1 09-Sep-2006  rpaulo sync with head
 1.32.10.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.33.46.1 19-Aug-2009  yamt sync with head.
 1.35.26.1 10-Aug-2014  tls Rebase.
 1.35.12.2 03-Dec-2017  jdolecek update from HEAD
 1.35.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.37.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.38.18.1 10-Jun-2019  christos Sync with HEAD
 1.38.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.39.36.1 02-Aug-2025  perseant Sync with HEAD
 1.7 19-Mar-1996  jonathan Replace ansi.h with a version that just does #include <mips/ansi.h>.
 1.6 16-Mar-1996  jtc Add _BSD_WINT_T_ definition so we can handle wint_t type added in NA1.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.3 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.2 15-Oct-1993  deraadt update from rick, tarfile of Oct 11 10:46
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.8 12-Aug-2009  matt Nuke a.out support for MIPS.
 1.7 08-Oct-1996  cgd branches: 1.7.172; 1.7.186;
repoint at shared aout_machdep.h, not exec.h
 1.6 19-Mar-1996  jonathan Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.3 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.2 14-Jan-1994  deraadt some pmax updating (Terry Friedrichsen is helping on this now).
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.7.186.1 24-Oct-2010  jym Sync with HEAD
 1.7.172.1 19-Aug-2009  yamt sync with head.
 1.1 30-Mar-2000  soren branches: 1.1.6;
Add asm.h like other ports.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 30-Mar-2000  bouyer file asm.h was added on branch thorpej_scsipi on 2000-11-20 20:20:24 +0000
 1.19 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.18 22-Mar-2003  simonb branches: 1.18.108; 1.18.116; 1.18.122; 1.18.126;
Fix a grammatical nit.
 1.17 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.16 09-Jan-2000  simonb Use the badaddr() prototype in mips/include/cpu.h by including
<machine/cpu.h> in mips/include/mips_param.h. Remove duplicate
badaddr() prototypes from some pmax header files.
 1.15 08-Jan-2000  simonb Function prototype cleanup.
 1.14 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.13 26-May-1999  nisimura branches: 1.13.2; 1.13.8;
- Continue on branch merge, incrementally.
- Catch up filename changes escaped to be fixed.
 1.12 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.11 16-Mar-1999  nisimura branches: 1.11.4;
- Final cut of TC decoulping.
 1.10 12-Mar-1999  nisimura - Nuke old leftover bogocities, round one; externs for non-existent
functions, less-intuitive #define's in inappropriate header files.
 1.9 06-Oct-1998  thorpej branches: 1.9.2;
configure() prototype is in <sys/device.h>
 1.8 25-May-1997  jonathan Lint: machdep.c calls configure() and makebootdev().
Move their declaratinos to pmax/autoconf.h.
 1.7 29-May-1996  mhitch Fix autoconfig stuff to match the alpha. The DS3100 will now
configure properly.
 1.6 14-Apr-1996  jonathan branches: 1.6.4;
Add a prototype for generic_intr_establish(), the bus-independent
pmax interrupt-establish function.
 1.5 18-Mar-1996  jonathan Change kn01 (pmax,3100) interrupt-enable signature to match
the NetBSD-1.1 convention. Change the mainbus `struct confargs'
and the "generic" interrupt-establish method, used by devices that
appear on both a kn01 and TC decstations, to match.

Change the macros in autconf.h accordingly.
 1.4 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.3 11-Jan-1996  jonathan Change the order of members of struct confargs, to be closer to
the sys/dev/tcvar.h TurboChannel configuration structures. (the initializers
in sys/arch/pmax/tc were already changed; the structure definition wasn't,
which broke autoconfiguration.)
 1.2 20-Sep-1995  jonathan Change the signature of interrupt-handlers to take a void *
(a pointer to the softc) and return an int (indicating spurious
interrupts or other conditions.)
 1.1 04-Aug-1995  jonathan Declarations for new-config autoconfigure, based on NetBSD/Alpha.
 1.6.4.1 30-May-1996  mhitch Pulled autoconfig fixes up from the trunk
 1.9.2.6 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.9.2.5 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.9.2.4 15-Mar-1999  nisimura - Adjustment for 'machine/conf.h' removal.
- A bit cleanup of handcrafted TC device config.
 1.9.2.3 15-Mar-1999  nisimura - Decouple "ibus" from TURBOchannel implementation.
- Sync. with main trunk.
 1.9.2.2 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.9.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.11.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.13.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.126.1 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.18.122.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.116.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.108.1 04-May-2009  yamt sync with head.
 1.8 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.7 11-Dec-2005  christos branches: 1.7.78; 1.7.86; 1.7.92; 1.7.96;
merge ktrace-lwp.
 1.6 24-Mar-2004  drochner remove license clauses 3 and 4 from my cpoyright notices
 1.5 09-Jan-2000  ad branches: 1.5.30;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.4 08-Jan-2000  simonb Function prototype cleanup.
 1.3 24-Apr-1999  simonb branches: 1.3.2;
Nuke register and remove trailling white space.
 1.2 22-Apr-1999  simonb Move BOOTINFO_ADDR up to 0x8001fc00, and reduce the maximum size of a
bootinfo record to 1kB (we are using less than 200 bytes now) so that it
doesn't run into addition PROM memory.

At 0x8001f00 the bootinfo record was stomping on some memory used by the
SFB cards for font information.
 1.1 23-Mar-1999  simonb branches: 1.1.2; 1.1.4;
Define a bootinfo record and initial structures that the pmax will use.
Modeled on i386 and bebox bootinfo.h.
 1.1.4.1 22-Apr-1999  perry branches: 1.1.4.1.2;
pullup 1.1->1.2 (simonb)
 1.1.4.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.1.2.3 12-Nov-1999  nisimura Sync. w/ main trunk changes.
 1.1.2.2 29-Mar-1999  drochner pull up to branch (new file)
 1.1.2.1 23-Mar-1999  drochner file bootinfo.h was added on branch nisimura-pmax-wscons on 1999-03-29 18:11:39 +0000
 1.3.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.30.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.30.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.30.1 03-Aug-2004  skrll Sync with HEAD
 1.7.96.1 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.7.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.7.78.1 04-May-2009  yamt sync with head.
 1.5 12-Aug-2009  matt Nuke a.out support for MIPS.
 1.4 09-Jan-2000  ad branches: 1.4.136; 1.4.150;
This is just a wrapper, nuke comment so it's like the others.
 1.3 19-Mar-1996  jonathan branches: 1.3.32;
Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.2 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.1 18-Jan-1995  mellon 4.4BSD binary format
 1.3.32.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.150.1 24-Oct-2010  jym Sync with HEAD
 1.4.136.1 19-Aug-2009  yamt sync with head.
 1.2 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.1 15-Jan-1999  bouyer branches: 1.1.2; 1.1.10;
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.1.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.2.2 22-Jan-1999  nisimura - Sync with various changes recently done in main trunk.
 1.1.2.1 15-Jan-1999  nisimura file bswap.h was added on branch nisimura-pmax-wscons on 1999-01-22 04:13:50 +0000
 1.31 16-Nov-2016  macallan branches: 1.31.8;
switch to common MIPS bus_space and bus_dma
tested by flxd@
 1.30 20-Feb-2011  matt branches: 1.30.14; 1.30.32; 1.30.36;
Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.29 14-Mar-2009  dsl branches: 1.29.4; 1.29.6; 1.29.8;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.28 28-Apr-2008  martin branches: 1.28.8; 1.28.14; 1.28.18;
Remove clause 3 and 4 from TNF licenses
 1.27 04-Mar-2007  christos branches: 1.27.40; 1.27.42; 1.27.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.26 21-Feb-2007  mrg add a pair of new bus_dma(9) functions:
int _bus_dmatag_subregion(bus_dma_tag_t tag,
bus_addr_t min_addr,
bus_addr_t max_addr,
bus_dma_tag_t *newtag,
int flags)
void _bus_dmatag_destroy(bus_dma_tag_t tag)

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

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

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

- use vmspace rather than proc or lwp where appropriate.
the latter is more natural to specify an address space.
(and less likely to be abused for random purposes.)
- fix a swdmover race.
 1.23 16-Feb-2006  perry Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.22 24-Dec-2005  perry branches: 1.22.2; 1.22.4; 1.22.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.21 11-Dec-2005  christos merge ktrace-lwp.
 1.20 09-Mar-2005  matt branches: 1.20.4;
Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create). dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
 1.19 15-Jun-2003  fvdl branches: 1.19.2; 1.19.10; 1.19.12;
Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
 1.18 28-Jan-2003  kent Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it.
 1.17 17-Mar-2002  simonb Make sure that private DMA flags don't overlap with standard DMA flags;
start these at 0x10000 to leave room for an increase in the latter.
 1.16 14-Nov-2001  thorpej branches: 1.16.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.15 19-Jul-2001  thorpej branches: 1.15.4;
Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
 1.14 07-Mar-2001  thorpej branches: 1.14.2;
Add the BUS_DMA_STREAMING flag.
 1.13 26-Jun-2000  simonb branches: 1.13.2;
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.12 17-Apr-2000  drochner branches: 1.12.4;
implement bus_space_vaddr()
 1.11 25-Jan-2000  drochner define a "BUS_SPACE_MAP_PREFETCHABLE" flag which basically means that
device accesses are idempotent (but should not be cached by the CPU)
 1.10 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.9 08-Apr-1999  nisimura branches: 1.9.2;
- MIPS processors do not require to have memory barrier prior to read ops.
 1.8 23-Mar-1999  drochner branches: 1.8.4;
Add a macro to check for sufficient pointer alignment in bus.h context,
"BUS_SPACE_ALIGNED_POINTER()".
Equal to the param.h "ALIGNED_POINTER()" normally, but obeys additional
requirements of the bus_space_xxx_n() macros. (BUS_SPACE_DEBUG)
 1.7 06-Jan-1999  nisimura - Complete vm_offset_t purge for DECstation.
 1.6 03-Jun-1998  thorpej branches: 1.6.4;
Add a "virtual address" private member to the pmax bus_dma_segment_t, for
use in R4000 cache flush operations in bus_dmamap_sync().
 1.5 22-May-1998  thorpej Complete from-scratch rewrite of the DECstation bus.h, brining it
up-to-date with the current API, and implementing preliminary
support for bus_dma.
 1.4 28-Nov-1997  jonathan Fix typo in bus_space_barrier definition. See PR 4488.
 1.3 30-Aug-1997  jonathan branches: 1.3.4;
Replace copyright notice.
 1.2 16-Jun-1997  jonathan branches: 1.2.4;
Commit addition of `#include <mips/locore.h>' to pmax/include.bus.h.
 1.1 08-Jun-1997  jonathan A pre-busdma pmax <bus.h> skeleton.
 1.2.4.1 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.4.1 28-Nov-1997  mellon Pull rev 1.4 up from trunk (jonathan)
 1.6.4.3 08-Apr-1999  nisimura - Synchronize a change in main trunk.
 1.6.4.2 23-Mar-1999  drochner Add a macro to check for sufficient pointer alignment in bus.h context,
"BUS_SPACE_ALIGNED_POINTER()".
Equal to the param.h "ALIGNED_POINTER()" normally, but obeys additional
requirements of the bus_space_xxx_n() macros. (BUS_SPACE_DEBUG)
 1.6.4.1 22-Jan-1999  nisimura - Sync with various changes recently done in main trunk.
 1.8.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.9.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.9.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.12.4.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.13.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.14.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.14.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.2.1 03-Aug-2001  lukem update to -current
 1.15.4.1 24-Oct-2001  thorpej Update for the new cache code. There are now two optimized
bus_dmamap_sync routines: one for a physically-indexed write-through
cache, and one for a virtually-indexed write-back cache.
 1.16.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.16.2.1 14-Nov-2001  nathanw file bus.h was added on branch nathanw_sa on 2002-04-01 07:41:56 +0000
 1.19.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.19.10.1 29-Apr-2005  kent sync with -current
 1.19.2.1 01-Apr-2005  skrll Sync with HEAD.
 1.20.4.3 03-Sep-2007  yamt sync with head.
 1.20.4.2 26-Feb-2007  yamt sync with head.
 1.20.4.1 21-Jun-2006  yamt sync with head.
 1.22.6.2 01-Jun-2006  kardel Sync with head.
 1.22.6.1 22-Apr-2006  simonb Sync with head.
 1.22.4.1 09-Sep-2006  rpaulo sync with head
 1.22.2.2 18-Feb-2006  yamt sync with head.
 1.22.2.1 18-Feb-2006  yamt adapt the rest of MD code.
 1.24.8.1 19-Jun-2006  chap Sync with head.
 1.24.2.1 26-Jun-2006  yamt sync with head.
 1.25.12.2 12-Mar-2007  rmind Sync with HEAD.
 1.25.12.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.27.44.2 04-May-2009  yamt sync with head.
 1.27.44.1 16-May-2008  yamt sync with head.
 1.27.42.1 18-May-2008  yamt sync with head.
 1.27.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.28.18.1 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.28.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.28.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.29.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.29.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.29.4.1 05-Mar-2011  rmind sync with head
 1.30.36.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.30.32.1 05-Dec-2016  skrll Sync with HEAD
 1.30.14.1 03-Dec-2017  jdolecek update from HEAD
 1.31.8.1 25-Jul-2017  snj Apply patch (requested by flxd in ticket #154):
Revert pmax switch to common MIPS bus_space and bus_dma.
 1.5 19-Mar-1996  jonathan Replace the following additional header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>,
after merging changes from the pmax and pica ports into the
src/sys/arch/mips/include tree.

ptrace.h cdefs.h pmap.h signal.h kdbparam.h
 1.4 15-Dec-1995  jonathan Change mips __warn_references() macro to use the ELF warning features
in binutils 2.6 and (patched) gcc 2.7.2. Only works with gcc in ANSI C
mode, for now.
 1.3 03-May-1995  mellon Use Alpha cdefs.h
 1.2 23-Mar-1995  jtc Changed name of __weak_reference() to __indr_reference(). They really
are indirect references, and I want to add a real __weak_reference()
macro to <machine/cdefs.h> soon.
 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.6 23-Nov-2001  simonb Remove hardcoded values for HZ (under different names!) from mcclock.c
and clock_machdep.h, so that now HZ can be any supported frequency of
the mc146818a/ds1287a RTCs.
Tested at 256Hz and 2048Hz.
 1.5 09-Jan-2000  ad branches: 1.5.8; 1.5.12;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.4 25-Aug-1999  simonb branches: 1.4.2;
Fix some small tyops.
 1.3 26-Sep-1998  drochner branches: 1.3.2;
Use the RTC chip as time-of-year clock, as the PROM console and Ultrix do.
 1.2 22-Jun-1997  jonathan branches: 1.2.8;
Copyright to NetBSD foundation.
 1.1 22-Jun-1997  jonathan Import mcclock from NetBSD/Alpha, mostly replacing the Sprite clock code.
interface. From Toru Nishimura <nisimura@itc.aist-nara.ac.jp>.

Partly merged back with Alpha code by Jonathan Stone. Needs more merging.
 1.2.8.1 23-Nov-1998  cgd Patch to it fixes a offset between the base year which the PROM
keeps the clock in (1972 or 1973) and the current year. Not
applicable to -current; done differently. (jonathan)
 1.3.2.2 12-Nov-1999  nisimura Sync. w/ main trunk changes.
 1.3.2.1 15-Oct-1998  nisimura - Reflect new internals.
 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.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.5.8.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 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 28-Feb-2002  simonb branches: 1.7.6; 1.7.10;
Use "#define<tab>".
 1.6 27-Feb-2002  christos - define other DEV_ constants that the local port uses.
- delete cdev_decl(mm) since <sys/conf.h> does it.
 1.5 26-Aug-2001  simonb branches: 1.5.6;
Switch to MI SCSI and drop old pmax MD SCSI support completely.
 1.4 09-Jan-2000  ad branches: 1.4.8;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.3 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.2 14-Apr-1996  jonathan branches: 1.2.20; 1.2.32;
Add cdev_decl() declarations for the "dtop", "fb" , and "rcons" drivers.
 1.1 10-Apr-1996  jonathan Create pmax-specific <machine/conf.h>, with prototyped declarations
for the cdevsw and bdevsw entries into pmax device drivers.
 1.2.32.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.20.1 15-Mar-1999  nisimura - Adjustment for 'machine/conf.h' removal.
- A bit cleanup of handcrafted TC device config.
 1.4.8.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.4.8.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.5.6.4 17-Sep-2002  nathanw Catch up to -current.
 1.5.6.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.5.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.5.6.1 26-Aug-2001  nathanw file conf.h was added on branch nathanw_sa on 2002-02-28 04:11:22 +0000
 1.7.10.1 19-May-2002  gehenna Remove port-dependent conf.h.
 1.7.6.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.27 04-Sep-2001  simonb branches: 1.27.6;
May as well include <mips/cpuregs.h> in <mips/cpu.h> once rather than
in every MIPS port's <machine/cpu.h>.
 1.26 04-Sep-2001  simonb Centralise struct cpu_info declaration and related info to <mips/cpu.h>.
 1.25 30-May-2001  mrg branches: 1.25.2;
use _KERNEL_OPT
 1.24 26-May-2000  thorpej branches: 1.24.6;
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 11-Apr-2000  nisimura Change to have cpu_intr() peculiar to DECstations; have ssir global
variable and cpu_intr() body in machdep.c. Reorder and rename
model specific interrupt handler arguments. Fixup machine/intr.h and
machine/cpu.h appropriately.
 1.22 24-Mar-2000  soren Revert previous.
 1.21 24-Mar-2000  soren Move sysctl definitions from arch/mips to arch/foo.
 1.20 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.19 16-Jan-1999  nisimura branches: 1.19.8;
- Fixup for recent change in arch/mips.
 1.18 25-Mar-1998  jonathan branches: 1.18.4;
Use an MD name for the FPU-interrupt mask, as in PR # 4399.
mips-based Sony news wire the FPU to hard-interrupt 3, rather than 5
as recommended in Kane.
 1.17 16-Jun-1997  jonathan Yet more merging:
* Move declaration of locore communcation variables (CPU family,
cache sizes, etc) to mips/include/locore.h. Delete from
pmax/include/cpu.h and older versions from pica/include/cpu.h.

* Move definitions of CLKF_BASEPRI, CLKF_USERMODE to mips/include/cpu.
* Delete duplicate definitions in pica/include/cpu.h, pmax/include/cpu.h.
 1.16 15-Jun-1997  mhitch More merged MIPS1/MIPS3 support for DECstations.
 1.15 19-May-1996  jonathan Add declarations for the locore variables cpu_id and fpu_id, compatible
with the Pica r4000 locore. These variables are now used
by the cpu-identification routines in mips/mips/mips_machdep.c.
 1.14 24-Mar-1996  jonathan Replace pica and pmax include/cpu.h with versions that #include <mips/cpu.h>,
and add port-specific and r3k vs. r4k definitions.
 1.13 19-Mar-1996  jonathan Add additional mips CPU and FPU ids from Pica port:
IDT r3081 family, r4600, MIPS-IV architecture, others.
 1.12 28-Jun-1995  cgd remove unused cpu_exec() definitions. moved "broken swap" markers, for
ports that still need it, to types.h.
 1.11 05-May-1995  cgd define BROKEN_SWAP and/or cpu_swapout as appropriate.
 1.10 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.9 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 02-Jun-1994  glass fix a few integration bugs, add vmfault debugging, more ultrix stuff
 1.6 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.5 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.4 15-Jan-1994  deraadt intrframe -> clockframe
 1.3 14-Jan-1994  deraadt some pmax updating (Terry Friedrichsen is helping on this now).
 1.2 15-Oct-1993  deraadt update from rick, tarfile of Oct 11 10:46
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.18.4.2 22-Jan-1999  nisimura - Sync with various changes recently done in main trunk.
 1.18.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.19.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.24.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.25.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.27.6.2 04-Sep-2001  simonb May as well include <mips/cpuregs.h> in <mips/cpu.h> once rather than
in every MIPS port's <machine/cpu.h>.
 1.27.6.1 04-Sep-2001  simonb file cpu.h was added on branch nathanw_sa on 2001-09-04 06:23:18 +0000
 1.1 05-Feb-2003  nakayama Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
 1.5 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.4 11-Apr-2011  mrg branches: 1.4.14;
obsolete DB_AOUT_SYMBOLS. however, we need to leave most of the code
in db_sym.[ch] as it is used by the elf version of crash(8).

i will be cleaning up the db_sym.c code in a follow up commit to avoid
having dead code compiled.
 1.3 09-Jan-2000  ad branches: 1.3.158; 1.3.164;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.2 23-Mar-1999  simonb branches: 1.2.8;
Move DB_{AOUT,ELF}_SYMBOLS (and DB_ELFSIZE) definition to port-specific
db_machdep.h file.
 1.1 07-Jul-1997  jonathan branches: 1.1.10;
DDB for mips.
Add DDB interface to /sys/arch/mips/mips..
Rework heuristic stack traceback to work with DDB.
Add hooks to print exception log from DDB.
Add hooks from pmax console drivers: call Debugger()
after break from serial console, or 'DO' key from LK-xxx.
 1.1.10.1 29-Mar-1999  nisimura - Catch up to recent changes in main trunk.
- Reorganize various #include's.
- Yield memcpy to Mach derivated one.
- pm_cnattach() now checks the existense of framebuffer card.
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.164.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.158.1 21-Apr-2011  rmind sync with head
 1.4.14.1 03-Dec-2017  jdolecek update from HEAD
 1.9 29-Jul-2006  ad Remove RASTERCONSOLE support from the pmax port.
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.8;
merge ktrace-lwp.
 1.7 07-Aug-2003  agc branches: 1.7.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.6 09-Jan-2000  ad branches: 1.6.28;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.5 24-Apr-1999  simonb branches: 1.5.2;
Nuke register and remove trailling white space.
 1.4 26-Oct-1994  cgd branches: 1.4.22; 1.4.30;
new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.4.30.1 21-Jun-1999  thorpej Sync w/ -current.
 1.4.22.1 15-Oct-1998  nisimura - Reflect new internals.
 1.5.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.28.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.28.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.28.1 03-Aug-2004  skrll Sync with HEAD
 1.7.16.1 30-Dec-2006  yamt sync with head.
 1.8.8.1 11-Aug-2006  yamt sync with head
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.11 16-Jun-2000  matt This file now lives is sys/dev/dec.
 1.10 11-Jun-2000  matt Make this compilable on other than pmax.
 1.9 09-Jan-2000  ad branches: 1.9.2;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.8 27-Nov-1999  simonb Use explicitly sized types for entities that exist on disk.
Use alpha-like defines for boot block offset on disk and boot block size.
 1.7 29-Oct-1999  drochner correct last change: mkboot depends on (sizeof(struct boot_block)==512)
 1.6 25-Oct-1999  simonb Begone with some garish Mach_StructureNames.
Add a comment about the bootblock structure.
 1.5 24-Apr-1999  simonb branches: 1.5.2; 1.5.4; 1.5.6;
Nuke register and remove trailling white space.
 1.4 26-Oct-1994  cgd branches: 1.4.2; 1.4.6;
new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.4.6.1 21-Jun-1999  thorpej Sync w/ -current.
 1.4.2.3 06-Dec-1999  nisimura Sync w/ recent changes in main trunk.
 1.4.2.2 12-Nov-1999  nisimura Sync. w/ main trunk changes.
 1.4.2.1 24-Feb-1999  nisimura - Synchronize with recent changes in main trunk.
 1.5.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.4.1 15-Nov-1999  fvdl Sync with -current
 1.5.2.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.9.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.6 09-Jan-2000  ad branches: 1.6.30;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.5 24-Apr-1999  simonb branches: 1.5.2;
Nuke register and remove trailling white space.
 1.4 26-Oct-1994  cgd branches: 1.4.2; 1.4.6;
new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.4.6.1 21-Jun-1999  thorpej Sync w/ -current.
 1.4.2.2 06-Dec-1999  nisimura Sync w/ recent changes in main trunk.
 1.4.2.1 24-Feb-1999  nisimura - Synchronize with recent changes in main trunk.
 1.5.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.30.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.30.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.30.1 03-Aug-2004  skrll Sync with HEAD
 1.24 11-Jun-2016  dholland gets -> unsafe_gets; nothing uses this but let's not start by accident.
(related to PR 51200)
 1.23 20-Feb-2011  matt branches: 1.23.14; 1.23.32;
Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.22 14-Dec-2009  matt branches: 1.22.4; 1.22.6; 1.22.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.21 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.20 11-Dec-2005  christos branches: 1.20.78; 1.20.86; 1.20.92; 1.20.96;
merge ktrace-lwp.
 1.19 01-Jun-2005  drochner make the argument to prom getenv() cnd the printf() format const
remove variable names from prototypes
 1.18 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.17 24-Aug-2001  mhitch branches: 1.17.6; 1.17.24;
Use the PROM bitmap, if available, to determine available memory. Also
add support of multiple memory segments so machines that allow mixed
memory sizes can utilize all available memory.
 1.16 30-Jul-2001  mhitch The memmap structure contains the memory bitmap returned by the PROM
getbitmap() call.
 1.15 09-Jan-2000  ad branches: 1.15.8;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.14 01-Mar-1999  simonb branches: 1.14.8;
Fix prototype for clear_cache (takes an address and length, not void).
 1.13 01-Feb-1999  simonb branches: 1.13.2;
Add a comment that the bcopy #define that uses the PROM's memset don't
handle overlapping copies. From Jonathan Stone.
 1.12 31-Jan-1999  simonb Add bzero/bcopy defines to use PROM memset/memcpy.

Change test to include defines from
#ifndef _KERNEL
to
#if defined(_STANDALONE) && !defined(_NO_PROM_DEFINES)
 1.11 30-Jan-1999  simonb Add REX magic number
 1.10 29-Jan-1999  simonb Add some more PROM entry points
 1.9 21-Sep-1996  jonathan Add fake, bogus prototype for gettcinfo(), with "void" arglist.
(Not having a prototype breaks -Wstrict-prototypes, this callback
isn't used, and we don't know what the prototype should be.)
 1.8 08-Apr-1996  jonathan Fix hanging open comment.
 1.7 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.6 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.5 18-Jan-1995  mellon Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.13.2.3 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.13.2.2 24-Feb-1999  nisimura - Synchronize with recent changes in main trunk.
 1.13.2.1 01-Feb-1999  nisimura file dec_prom.h was added on branch nisimura-pmax-wscons on 1999-02-24 02:11:10 +0000
 1.14.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.8.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.15.8.1 03-Aug-2001  lukem update to -current
 1.17.24.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.17.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.24.1 03-Aug-2004  skrll Sync with HEAD
 1.17.6.2 24-Aug-2001  mhitch Use the PROM bitmap, if available, to determine available memory. Also
add support of multiple memory segments so machines that allow mixed
memory sizes can utilize all available memory.
 1.17.6.1 24-Aug-2001  mhitch file dec_prom.h was added on branch nathanw_sa on 2001-08-24 15:33:18 +0000
 1.20.96.2 29-Dec-2010  matt Use a promcall wrapper function to call the prom. For non O32 systems
this will save and restore the callee saved registers since the 32-bit
prom probably won't be saving all 64bits.
 1.20.96.1 16-Sep-2009  matt Deal with some LP64 issues with only O32 console.
Make bootloader invoke kernel compatible with both O32 and N32
 1.20.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.20.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.20.78.2 11-Mar-2010  yamt sync with head
 1.20.78.1 04-May-2009  yamt sync with head.
 1.22.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.22.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.22.4.1 05-Mar-2011  rmind sync with head
 1.23.32.1 09-Jul-2016  skrll Sync with HEAD
 1.23.14.1 03-Dec-2017  jdolecek update from HEAD
 1.5 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.4 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.3 27-Nov-1999  simonb Remove NUMBOOT define - disklabel doesn't install bootblocks anymore.
 1.2 18-Jan-1995  mellon branches: 1.2.22; 1.2.34; 1.2.40;
Add NUMBOOT for benefit of disklabel program
 1.1 14-Oct-1994  cgd move arch dependence to archs. clean up a bit. deal with weird MAXPARTITONS.
 1.2.40.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.34.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.22.1 06-Dec-1999  nisimura Sync w/ recent changes in main trunk.
 1.6 26-Sep-1996  cgd rename <machine/ecoff.h> to <machine/ecoff_machdep.h> for clarity and
consistency with the way machdep headers for other things are done.
(the creation of the ecoff_machdep.h files was done on the CVS server, to
keep the RCS logs intact.)
 1.5 19-Mar-1996  jonathan Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

[bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h]
[profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h]

plus (missed one:)
ecoff.h
 1.4 16-Jun-1995  mellon Put parentheses around macro arguments
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 28-May-1994  glass more likely to work now, probably less knf...thats the next project
 1.1 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.6 26-Sep-1996  cgd since these just included mips/ecoff.h, they need to be changed to include
mips/ecoff_machdep.h.
 1.5 19-Mar-1996  jonathan Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

[bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h]
[profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h]

plus (missed one:)
ecoff.h
 1.4 16-Jun-1995  mellon Put parentheses around macro arguments
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 28-May-1994  glass more likely to work now, probably less knf...thats the next project
 1.1 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.4 09-Nov-1999  kleink Per discussion on tech-toolchain, remove MIPS-specific <machine/elf.h> header;
all the information is available from <sys/exec_elf.h>.
 1.3 19-Mar-1996  jonathan branches: 1.3.20; 1.3.32; 1.3.34; 1.3.38;
Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.2 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.1 18-Jan-1995  mellon ELF format (to be combined with elf header in sys/compat later)
 1.3.38.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.34.1 15-Nov-1999  fvdl Sync with -current
 1.3.32.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.3.20.1 12-Nov-1999  nisimura This file was removed in main trunk.
 1.5 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.4 09-Jan-2000  ad branches: 1.4.136; 1.4.154;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.3 25-Oct-1999  kleink Update to match new SVR4-style definition names in <sys/exec_elf.h>.
 1.2 17-Dec-1996  jonathan branches: 1.2.18; 1.2.30; 1.2.32; 1.2.34;
Configure pmax elf_machdep.h as little-endian elf.
 1.1 26-Sep-1996  cgd add and use a machine-dependent header, which currently defines some
macros to use to remove #ifdefs from the machine ID case check.
Eventually, these headers will contain other information, e.g.
machine-dependent relocation information, etc.
 1.2.34.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.32.1 15-Nov-1999  fvdl Sync with -current
 1.2.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.2.18.1 12-Nov-1999  nisimura Sync. w/ main trunk changes.
 1.4.154.1 22-Aug-2009  matt Move ELF{32,64}_MACHDEP_ENDIANNESS to <mips/elf_machdep.h>
 1.4.136.1 11-Mar-2010  yamt sync with head
 1.11 17-Mar-2000  mycroft In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
 1.10 16-Mar-2000  mycroft Foolish consistency. Mainly, always use underscores and sys/endian.h.
 1.9 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.8 24-Jan-1999  mycroft branches: 1.8.8;
Format consistency.
 1.7 20-Oct-1997  jonathan branches: 1.7.6;
* Use ANSI-clean names for host-specific byte-order definition
(_BYTE_ORDER, _BIG_ENDIAN, _LITTLE_ENDIAN).
Define old names from the ANSI ones if not _POSIX_SOURCE.
* Define _QUAD_HIGHWORD and _QUAD_LOWWORD properly when
_BYTE_ORDER == _BIG_ENDIAN.
 1.6 17-Oct-1997  jonathan Add bi-endian support to mips locore, <mips/endian.h>, and mips_opcode.h.
Derived from a change request (PR port-mips/4277) from
Tsubai Masanari, (tsubai@iri.co.jp).
 1.5 19-Mar-1996  jonathan Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.7.6.1 06-Dec-1999  nisimura Sync w/ recent changes in main trunk.
 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.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:20:27 +0000
 1.7 08-Oct-1996  cgd moved to aout_machdep.h (via repository copy)
 1.6 19-Mar-1996  jonathan Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.3 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.2 14-Jan-1994  deraadt some pmax updating (Terry Friedrichsen is helping on this now).
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.5 19-Sep-2001  thorpej Remove pmax-specific fbio.h -- everything uses <dev/sun/fbio.h> now.
 1.4 09-Jan-2000  ad branches: 1.4.6; 1.4.8;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.3 24-Apr-1999  simonb branches: 1.3.2;
Nuke register and remove trailling white space.
 1.2 13-Apr-1999  ad Define PMAX_FBTYPE_PX. Changes to allow fbvar.h to be included with
dev/rcons/rcons.h.
 1.1 11-Sep-1995  jonathan branches: 1.1.22; 1.1.30;
Framebuffer ioctls for Ted Lemon's pmax generic framebuffer fb
pseudo-device.
 1.1.30.1 21-Jun-1999  thorpej Sync w/ -current.
 1.1.22.1 15-Oct-1998  nisimura - Reflect new internals.
 1.3.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.8.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.6.1 01-Oct-2001  fvdl Catch up with -current.
 1.15 29-Jul-2006  ad Remove RASTERCONSOLE support from the pmax port.
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.8;
merge ktrace-lwp.
 1.13 17-Mar-2005  kleink branches: 1.13.2;
A couple of <sys/select.h>-related changes:
* Factor out struct selinfo and its header dependencies into its own header,
<sys/selinfo.h>, to avoid namespace pollution.
* Include <sys/selinfo.h> in user-visible headers where necessary.
 1.12 07-Aug-2003  agc branches: 1.12.8; 1.12.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.11 03-Feb-2000  nisimura branches: 1.11.28;
- Massive change of console initialization. Have each model its own
consinit().
- Fix fbconnect() and relatives; 'struct fbinfo' is initialized only once,
making sure no extraneous console resolution message is emitted.
 1.10 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.9 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.8 08-Jan-2000  simonb Function prototype cleanup.
 1.7 09-Dec-1999  simonb Use "u_char *" instead of "caddr_t" for all colormap references. In line
with recent MI rasops changes, and fixes compile problems with -current.
 1.6 08-Dec-1999  simonb Add newline to last line of file.
 1.5 25-Jul-1999  ad branches: 1.5.2; 1.5.8;
Change the way fb devices are configured and attached:
- 'struct fbsoftc' created, which points to a 'struct fbinfo'
- 'struct fbinfo' for each device is allocated with fballoc()

This means:
- Console device doesn't get different 'struct fbinfo' at attach
- Console device doesn't get initialized twice
- Color rcons now works
- The current Xserver MUST BE REBUILT.
 1.4 21-Jun-1999  ad Clear out 'struct fbdevice' cruft; it represents bitrot on pmax. Add
#ifdef'ed out definition for 'struct fbsoftc', the way forward until
[nisimura-pmax-wscons] is merged.
 1.3 13-Apr-1999  ad Define PMAX_FBTYPE_PX. Changes to allow fbvar.h to be included with
dev/rcons/rcons.h.
 1.2 24-May-1997  jonathan branches: 1.2.12; 1.2.20;
#ifdef notyet out the as-yet-Undefined bold mode, instead of commenting it out.
 1.1 11-Sep-1995  jonathan Framebuffer state variable for Ted Lemon's generic-framebuffer "fb"
pseudo-device, with support for the qvss/pm - compatible interface
used by X11R5 servers on DEC framebuffers.
 1.2.20.3 02-Aug-1999  thorpej Update from trunk.
 1.2.20.2 01-Jul-1999  thorpej Sync w/ -current.
 1.2.20.1 21-Jun-1999  thorpej Sync w/ -current.
 1.2.12.1 15-Oct-1998  nisimura - Reflect new internals.
 1.5.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.11.28.4 01-Apr-2005  skrll Sync with HEAD.
 1.11.28.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.28.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.28.1 03-Aug-2004  skrll Sync with HEAD
 1.12.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.12.8.1 29-Apr-2005  kent sync with -current
 1.13.2.1 30-Dec-2006  yamt sync with head.
 1.14.8.1 11-Aug-2006  yamt sync with head
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.1 21-Dec-2015  christos branches: 1.1.2; 1.1.18;
Add mips fenv.h (From FreeBSD)
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 21-Dec-2015  jdolecek file fenv.h was added on branch tls-maxphys on 2017-12-03 11:36:35 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 21-Dec-2015  skrll file fenv.h was added on branch nick-nhusb on 2015-12-27 12:09:40 +0000
 1.10 19-Apr-2018  christos s/static inline/static __inline/g for consistency.
 1.9 19-Mar-1996  jonathan branches: 1.9.80;
Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.8 18-Mar-1996  jonathan NetBSD's ieee FP definitions for the pmax are valid for other mips cpus;
change preprocessor XXX_PMAX_YYY #defines to XXX_MIPS_YYY.
 1.7 20-Jun-1995  jtc Wrap with #ifndef _XXX_FLOAT_H_/#define _XXX_FLOAT_H_/ ... /#endif.
 1.6 20-Jun-1995  jtc #include <sys/cdefs.h>.
Wrap __flt_rounds() declaration with __BEGIN_DECLS/__END_DECLS.
 1.5 11-Apr-1995  jtc Changed FLT_ROUNDS from constant to a call to __flt_rounds(), so that the
current rounding mode is accurately reported.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.9.80.1 22-Apr-2018  pgoyette Sync with HEAD
 1.2 30-Aug-1999  mycroft branches: 1.2.10;
A foolish consistency.
 1.1 29-Aug-1999  mycroft Add ieee.h.
 1.2.10.2 14-Mar-2000  nisimura Synchronize with the recent progress in main trunk. Main trunk is
close enough with this.
 1.2.10.1 30-Aug-1999  nisimura file ieee.h was added on branch nisimura-pmax-wscons on 2000-03-14 09:45:54 +0000
 1.6 04-Sep-2001  simonb branches: 1.6.6;
Clean up.
 1.5 24-Apr-1999  simonb branches: 1.5.16;
Nuke register and remove trailling white space.
 1.4 05-Jan-1998  perry branches: 1.4.12;
RCSID Police.
 1.3 19-Mar-1996  jonathan Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.2 18-Mar-1996  jonathan NetBSD's ieee FP definitions for the pmax are valid for other mips cpus;
change preprocessor XXX_PMAX_YYY #defines to XXX_MIPS_YYY.
 1.1 11-Apr-1995  jtc Mips specific portions of ieeefp.h (fp_rnd, fp_except, constants, etc.).
 1.4.12.1 21-Jun-1999  thorpej Sync w/ -current.
 1.5.16.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.6.6.2 04-Sep-2001  simonb Clean up.
 1.6.6.1 04-Sep-2001  simonb file ieeefp.h was added on branch nathanw_sa on 2001-09-04 06:26:20 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer constant macros.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
 1.1.12.1 14-Apr-2001  kleink file int_const.h was added on branch nathanw_sa on 2001-04-14 22:38:42 +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:28 +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:16 +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:29 +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:11 +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:29 +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:00 +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:29 +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:20:30 +0000
 1.34 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.33 14-Mar-2009  dsl branches: 1.33.4; 1.33.6; 1.33.8;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.32 04-Jan-2008  ad branches: 1.32.10; 1.32.18; 1.32.24; 1.32.28;
Don't pull in unrelated headers.
 1.31 03-Dec-2007  ad branches: 1.31.6;
Interrupt handling changes, in discussion since February:

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

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.29 17-Jun-2007  tsutsui branches: 1.29.8; 1.29.10;
Move declaretions of _spl*() and _{clr,set}softintr() functions
(which are in mips/locore.S) into <mips/locore.h>
from various MD files.
 1.28 16-Feb-2007  ad branches: 1.28.6; 1.28.8; 1.28.14;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
 1.27 21-Dec-2006  yamt merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.26 11-Dec-2005  christos branches: 1.26.20; 1.26.22;
merge ktrace-lwp.
 1.25 11-Jan-2005  simonb branches: 1.25.10;
Switch from intrcnt interrupt account to event counters.
 1.24 25-May-2003  tsutsui branches: 1.24.2;
Switch to use mips/softintr.c for softintr(9).
 1.23 27-Aug-2001  nisimura branches: 1.23.6;
Count and record memory error interrupts with evcnt(9).
 1.22 22-Aug-2001  nisimura Forgot to commit changes of intrcnt[] array and its indices.
 1.21 22-Aug-2001  nisimura NetBSD/pmax now has GENERIC_SOFT_INTERRUPTS.
 1.20 13-Apr-2001  thorpej branches: 1.20.2;
Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
 1.19 12-Apr-2001  thorpej splvec.splimp -> splvec.splvm
 1.18 14-Jan-2001  thorpej branches: 1.18.2;
Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
 1.17 22-Aug-2000  thorpej Add spllock(). See spl(9) for details.
 1.16 21-Aug-2000  thorpej Make sure we provide splsched() as described in spl(9).
 1.15 11-Apr-2000  nisimura Change to have cpu_intr() peculiar to DECstations; have ssir global
variable and cpu_intr() body in machdep.c. Reorder and rename
model specific interrupt handler arguments. Fixup machine/intr.h and
machine/cpu.h appropriately.
 1.14 03-Apr-2000  soda splsoftnet() should block softclock() too.
 1.13 10-Mar-2000  nisimura Arrange 'vmstat -i' to show 'optslotN'; for interrupt counts of TC slot N
as well as DECsystem 5100 optional serial card slot N.
 1.12 29-Feb-2000  nisimura - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.11 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.10 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.9 08-Jan-2000  simonb Function prototype cleanup.
 1.8 05-Aug-1999  thorpej branches: 1.8.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.7 31-May-1999  nisimura - Call _splnone() explicitely after auto config. was well done to make
sure SOFT_INTs cleared before interrupt processing is started.
 1.6 25-May-1999  nisimura - Rework spl(9) implementation. Use _spl*() processor mask manipulating
routines now reside in locore.S. No functional difference is expected.
- Replace abused splx() abuse with _splset() to change MIPS processor
interrupt mask bit. 'mips/trap.c' side will be fixed soon.
 1.5 25-Aug-1998  nisimura branches: 1.5.2; 1.5.10;
Make spl(9) rountines target port dependent. delay() is also port
dependent anticipating a target with high resolution timer available
for on-the-fly re-programming. Enum decstation_t was removed from MI
trap.c.
 1.4 30-Mar-1998  jonathan Define IPL_ constants for pmax.
 1.3 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.2 05-Jan-1998  perry RCSID Police.
 1.1 26-Oct-1997  jonathan branches: 1.1.2;
<machine/intr.h> is required. Supply an empty one.
VS: ----------------------------------------------------------------------
 1.1.2.2 26-Oct-1997  jonathan <machine/intr.h> is required. Supply an empty one.
VS: ----------------------------------------------------------------------
 1.1.2.1 26-Oct-1997  jonathan file intr.h was added on branch netbsd-1-3 on 1997-10-26 10:41:33 +0000
 1.5.10.1 21-Jun-1999  thorpej Sync w/ -current.
 1.5.2.5 12-Nov-1999  nisimura Sync. w/ main trunk changes.
 1.5.2.4 06-Aug-1999  nisimura - Define spllowersoftclock() as _spllower() and change splsoftclock()
definition to have _splraise(). This cured of severe clock slip
observed for months.
 1.5.2.3 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.5.2.2 22-Jan-1999  nisimura - Sync with various changes recently done in main trunk.
 1.5.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.8.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.8.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.8.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.18.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.20.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.20.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.23.6.2 27-Aug-2001  nisimura Count and record memory error interrupts with evcnt(9).
 1.23.6.1 27-Aug-2001  nisimura file intr.h was added on branch nathanw_sa on 2001-08-27 02:00:17 +0000
 1.24.2.1 17-Jan-2005  skrll Sync with HEAD.
 1.25.10.5 21-Jan-2008  yamt sync with head
 1.25.10.4 07-Dec-2007  yamt sync with head
 1.25.10.3 03-Sep-2007  yamt sync with head.
 1.25.10.2 26-Feb-2007  yamt sync with head.
 1.25.10.1 30-Dec-2006  yamt sync with head.
 1.26.22.4 23-Oct-2006  yamt define splserial()
 1.26.22.3 24-Sep-2006  yamt add IPL_STATCLOCK.
 1.26.22.2 24-Sep-2006  yamt add missing IPL_ definitions.
 1.26.22.1 23-Sep-2006  yamt implement splraiseipl for pmax.
 1.26.20.1 12-Jan-2007  ad Sync with head.
 1.28.14.1 26-Jun-2007  garbled Sync with HEAD.
 1.28.8.1 11-Jul-2007  mjf Sync with head.
 1.28.6.4 03-Dec-2007  ad Sync with HEAD.
 1.28.6.3 03-Dec-2007  ad Sync with HEAD.
 1.28.6.2 15-Jul-2007  ad Get pmax working.
 1.28.6.1 15-Jul-2007  ad Sync with head.
 1.29.10.2 09-Jan-2008  matt sync with HEAD
 1.29.10.1 06-Nov-2007  matt sync with HEAD
 1.29.8.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.30.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.30.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.31.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.32.28.3 29-Dec-2010  matt Use MIPS_SOFT_INT_MASK instead of MIPS_SOFT_INT_MASK_0 | MIPS_SOFT_INT_MASK_1
 1.32.28.2 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.32.28.1 06-Feb-2010  matt <mips/softintr.h> is no longer needed.
 1.32.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.32.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.32.10.1 04-May-2009  yamt sync with head.
 1.33.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.33.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.33.4.1 05-Mar-2011  rmind sync with head
 1.1 19-Feb-1998  thorpej Use the generic NetBSD/mips crash dump code.
 1.5 19-Mar-1996  jonathan Replace the following additional header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>,
after merging changes from the pmax and pica ports into the
src/sys/arch/mips/include tree.

ptrace.h cdefs.h pmap.h signal.h kdbparam.h
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.13 31-Aug-2001  simonb branches: 1.13.6;
G/C the unused kernel-only CLK_TCK #define.

XXX: does include/time.h still need <machine/limits.h>?
 1.12 09-Jan-2000  ad branches: 1.12.8;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.11 09-Jan-1998  perry branches: 1.11.16;
multiple include protect machine/limits.h, fixes pr 4473 (from Mika Nystrom)
 1.10 19-Mar-1996  jonathan Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.9 19-Mar-1996  jonathan Remove pmax-specific CLK_TICK to prepare for moving to sys/arch/mips.
 1.8 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.7 15-Nov-1994  dean put #ifdef KERNEL around CLK_TCK define
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 05-Oct-1994  jtc Add constants required by XPG3
 1.4 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.3 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.2 14-Jan-1994  deraadt some pmax updating (Terry Friedrichsen is helping on this now).
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 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.12.8.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.13.6.2 31-Aug-2001  simonb G/C the unused kernel-only CLK_TCK #define.

XXX: does include/time.h still need <machine/limits.h>?
 1.13.6.1 31-Aug-2001  simonb file limits.h was added on branch nathanw_sa on 2001-08-31 03:46:04 +0000
 1.9 06-Aug-2014  joerg Consistently define WARN in a way that passes format string checks, i.e.
always uses the same number of arguments as given in the format string.
 1.8 14-Dec-2009  matt branches: 1.8.22; 1.8.36;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.7 22-Aug-2009  he Remove BOOT_AOUT, since our mips ports no longer deal with a.out.
 1.6 28-Apr-2008  martin branches: 1.6.18;
Remove clause 3 and 4 from TNF licenses
 1.5 25-Jan-2006  christos branches: 1.5.72; 1.5.74; 1.5.76;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.4 14-Nov-2001  thorpej branches: 1.4.2; 1.4.36; 1.4.48;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.3 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 09-Jan-2000  ad branches: 1.2.2; 1.2.10; 1.2.12;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.1 28-Apr-1999  christos branches: 1.1.2; 1.1.4;
Add loadfile_machdep.h
 1.1.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.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.2.12.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.2.10.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.2 14-Mar-2000  nisimura Synchronize with the recent progress in main trunk. Main trunk is
close enough with this.
 1.2.2.1 09-Jan-2000  nisimura file loadfile_machdep.h was added on branch nisimura-pmax-wscons on 2000-03-14 09:45:54 +0000
 1.4.48.1 01-Feb-2006  yamt sync with head.
 1.4.36.1 21-Jun-2006  yamt sync with head.
 1.4.2.2 14-Nov-2001  thorpej Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.4.2.1 14-Nov-2001  thorpej file loadfile_machdep.h was added on branch nathanw_sa on 2001-11-14 18:15:34 +0000
 1.5.76.3 11-Mar-2010  yamt sync with head
 1.5.76.2 16-Sep-2009  yamt sync with head
 1.5.76.1 16-May-2008  yamt sync with head.
 1.5.74.1 18-May-2008  yamt sync with head.
 1.5.72.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.18.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.8.36.1 10-Aug-2014  tls Rebase.
 1.8.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2 31-Aug-2001  simonb branches: 1.2.6;
Remove an unneeded comment; ``sync'' with other "just include <mips/foo.h>"
files.
 1.1 29-Apr-2000  thorpej branches: 1.1.6; 1.1.10;
Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.1.10.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 29-Apr-2000  bouyer file lock.h was added on branch thorpej_scsipi on 2000-11-20 20:20:30 +0000
 1.2.6.2 31-Aug-2001  simonb Remove an unneeded comment; ``sync'' with other "just include <mips/foo.h>"
files.
 1.2.6.1 31-Aug-2001  simonb file lock.h was added on branch nathanw_sa on 2001-08-31 03:53:24 +0000
 1.6 09-Jul-2011  matt Cleanu <machine/*> includes
 1.5 05-Jun-2002  simonb ANSIfy.
 1.4 09-Jan-2000  ad branches: 1.4.8; 1.4.12; 1.4.22;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.3 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.2 20-May-1996  jonathan branches: 1.2.32;
* Move the declarations of mips locore functions from the pmax tree
to the mips tree.
* Just include the mips locore.h into the pmax one.
 1.1 19-May-1996  jonathan Define the conventional pmax locore entry-point names to be calls through
an vector (struct) of function pointers. Add prototype declarations for
each vector entry.
Add declarations for the r2000 (MIPS-I) and r4000 (MIPS-III) locore
versions of the relevant functions.
 1.2.32.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.22.1 15-Jul-2002  gehenna catch up with -current.
 1.4.12.1 20-Jun-2002  nathanw Catch up to -current.
 1.4.8.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1 30-Nov-2024  christos branches: 1.1.4;
Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 30-Nov-2024  perseant file lwp_private.h was added on branch perseant-exfatfs on 2025-08-02 05:56:00 +0000
 1.9 16-Jun-1997  jonathan Remove all references to <machine/machAsmDefs.h>.
Use #include <mips/asm.h> instead.
 1.8 25-Mar-1996  jonathan Rename the original pmax/include/machAsmDefs.h file, with CVS history,
to mips/include/asm.h.

Until all references to <machine/machAsmDefs.h> in the pmax and
pica tree are changed to use <mips/asm.h> directly, just do
#include <mips/asm.h>, for compatibility.
 1.7 18-Jan-1995  mellon Support for alternate compilers and file formats
 1.6 15-Dec-1994  mycroft Make a new macro _C_LABEL(), which prepends an underscore to the argument unless
NO_UNDERSCORES is defined. Use it in the *LEAF() and END() macros.
 1.5 14-Nov-1994  dean Prepended underscores
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.7 16-Jun-1997  jonathan Remove the machConst.h (wrapper for Sprite-derived source), and all
#includes <machine/machConst.h> uses.
Other header files now include <mips/cpuregs.h> where necessary.
 1.6 30-Sep-1996  jonathan Just include <mips/cpuregs.h>, which has the same contents this
file used to.
 1.5 28-Mar-1996  jonathan Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 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:20:31 +0000
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 17-Nov-2001  wdk branches: 1.1.2;
file mcontext.h was initially added on branch nathanw_sa.
 1.1.2.1 17-Nov-2001  wdk mcontext support for MIPS based ports.
 1.7 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.6 23-Mar-1996  jonathan branches: 1.6.32;
Just include the merged pica/pmax r2000/r4000 mips_opcode.h from
mips/include/mips_opcode.h.
 1.5 23-Mar-1996  jonathan Merge in additions of missing MIPS-I opcodes, and r4000-in-32-bit mode
opcodes from the Pica port. Per Fogelstrom claims the latter are all
supposedly MIPS-II (r6000) instructions, rather than MIPS-III (R4000),
but we haven't checked to be sure. Are LL/SC really in MIPS-II?
CVS:: ----------------------------------------------------------------------
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.6.32.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 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file mutex.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file mutex.h was added on branch yamt-lazymbuf on 2007-02-26 09:07:49 +0000
 1.2 14-Dec-2009  matt branches: 1.2.4;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.1 12-Sep-2009  matt branches: 1.1.2;
file netbsd32_machdep.h was initially added on branch matt-nb5-mips64.
 1.1.2.1 12-Sep-2009  matt Add COMPAT_NETBSD32 support.
 1.2.4.2 11-Mar-2010  yamt sync with head
 1.2.4.1 14-Dec-2009  yamt file netbsd32_machdep.h was added on branch yamt-nfs-mp on 2010-03-11 15:02:49 +0000
 1.46 07-Jan-2019  jdolecek move DEV_BSIZE, DEV_BSHIFT out of MD param.h, they are same on all ports

also move BLKDEV_IOSIZE, MAXPHYS, but allow override since some ports
have different value (powerpc uses NBPG for BLKDEV_IOSIZE, sun2/sun3
have lower MAXPHYS)
 1.45 18-Mar-2011  tsutsui branches: 1.45.54; 1.45.56;
- include <mips/mips_param.h> after MACHINE is defined
- remove redundant comment
 1.44 06-Mar-2011  he Now that MACHINE is defined in user-land in either
mips/include/mips_param.h or powerpc/include/param.h, stop
trying to re-define it in the port-specific param.h files
when _KERNEL isn't defined.
 1.43 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.42 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.41 14-Dec-2009  matt branches: 1.41.4; 1.41.6; 1.41.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.40 13-Aug-2009  matt Move MID_MACHINE to <mips/mips_param.h> and use local values so we don't
need to include exec_aout.h
 1.39 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.38 10-Sep-2006  tsutsui branches: 1.38.58; 1.38.66; 1.38.72; 1.38.76;
Change dumb DELAY(9) macro into inline version with asm like
other mips ports for gcc4's aggressive optimization.
 1.37 11-Dec-2005  christos branches: 1.37.8; 1.37.20;
merge ktrace-lwp.
 1.36 07-Aug-2003  agc branches: 1.36.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.35 26-Feb-2002  simonb branches: 1.35.18;
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.34 30-May-2001  mrg branches: 1.34.2; 1.34.8;
use _KERNEL_OPT
 1.33 30-Jun-2000  itojun branches: 1.33.2;
raise MSIZE from 128 to 256.
- for sizeof(void *) == 8 arch, this is mandatory. MHLEN is too small
already (less than 80) and there are chances for unwanted packet loss due
to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
(even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
extension header)

portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.
 1.32 06-May-2000  nisimura branches: 1.32.4;
- Remove three unused contants; KERNBASE, KERNTEXTOFF and BTOPKERNBASE.
- Protect #include <machine/intr.h> inclusion with #ifdef _KERNEL.
- Correct the case when "opt_gateway.h" is refered.
 1.31 30-Mar-2000  simonb Nuke register.
 1.30 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.29 08-Jan-2000  simonb Function prototype cleanup.
 1.28 04-Dec-1999  ragge CL* discarding.
 1.27 09-Feb-1999  tv branches: 1.27.8; 1.27.14;
Split the "mips" MACHINE_ARCH for 1.4. newsmips is "mipseb"; pmax is
"mipsel".
 1.26 25-Aug-1998  nisimura branches: 1.26.2;
Make spl(9) rountines target port dependent. delay() is also port
dependent anticipating a target with high resolution timer available
for on-the-fly re-programming. Enum decstation_t was removed from MI
trap.c.
 1.25 29-Apr-1998  thorpej Pull in opt_gateway.h as appropriate.
 1.24 20-Sep-1997  leo Move the definition of MSGBUFSIZE up to the machine-arch level if
possible. Pointed out by Bernd Ernesti.
 1.23 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.22 20-Aug-1997  jonathan Move SSIZE and DELAY() definitions to sys/arch/mips/include/mips_param.h.
Update comment in pmax/include/param.h (pr 3988).
 1.21 07-Jul-1997  jonathan branches: 1.21.2;
DDB for mips.
Add DDB interface to /sys/arch/mips/mips..
Rework heuristic stack traceback to work with DDB.
Add hooks to print exception log from DDB.
Add hooks from pmax console drivers: call Debugger()
after break from serial console, or 'DO' key from LK-xxx.
 1.20 15-Jun-1997  mhitch More merged MIPS1/MIPS3 support for DECstations.
 1.19 08-Jun-1997  jonathan Move MACHINE_ARCH and _MACHINE_ARCH from pmax/include/param.h to
mips/include/mips_param.h. (They should be common to all mips ports.)
 1.18 26-Feb-1997  jonathan Protect MCLSHIFT definition so users can customize MCLBYTES.
Also define MCLBYTES from MCLSHIFT.
 1.17 20-May-1996  jonathan branches: 1.17.8;
Fix typo in NMBCLUSTERS definition.
 1.16 19-May-1996  jonathan Remove common-across-all-MIPS-cpu definitions (e.g., user-level-visible
page/segment size definitions and macros) and move them to
mips/include/mips_param.h.
 1.15 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.14 01-Mar-1996  cgd Clean up tabbing/spacing in defns of MACHINE, MACHINE_ARCH, and MID_MACHINE.
 1.13 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.12 23-Jul-1995  jonathan Add argument prototypes - __P((void)) - to the declarations of Mach_spl*() functions.
 1.11 28-Jun-1995  cgd kill user-land DELAY macro, as suggested by gwr.
 1.10 26-Jun-1995  cgd clean up definitions of ctod(), dtoc(), ctob(), btoc(), btodb(), and
dbtob(). remove unused definitions of ctos(), stoc(), and dtob().
 1.9 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.8 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.7 28-Nov-1994  dean fix from Jonathan Stone
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 23-Aug-1994  glass add USPACE
 1.4 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.3 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.2 14-Jan-1994  deraadt some pmax updating (Terry Friedrichsen is helping on this now).
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.17.8.1 12-Mar-1997  is Merge in changes from Trunk
 1.21.2.2 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.21.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.26.2.3 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.26.2.2 24-Feb-1999  drochner #define MACHINE_ARCH "mipsel"
 1.26.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.27.14.2 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.27.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.27.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.32.4.1 23-Jul-2000  itojun pullup from main trunc (approved by releng-1-5)

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

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

1.1 -> 1.2 syssrc/sys/arch/amigappc/include/param.h
1.13 -> 1.14 syssrc/sys/arch/arc/include/param.h
1.1 -> 1.2 syssrc/sys/arch/arm26/include/param.h
1.17 -> 1.18 syssrc/sys/arch/arm32/include/param.h
1.6 -> 1.7 syssrc/sys/arch/bebox/include/param.h
1.4 -> 1.5 syssrc/sys/arch/cobalt/include/param.h
1.4 -> 1.5 syssrc/sys/arch/evbsh3/include/param.h
1.2 -> 1.3 syssrc/sys/arch/hpcmips/include/param.h
1.40 -> 1.41 syssrc/sys/arch/i386/include/param.h
1.7 -> 1.8 syssrc/sys/arch/m68k/include/param.h
1.9 -> 1.10 syssrc/sys/arch/macppc/include/param.h
1.4 -> 1.5 syssrc/sys/arch/mmeye/include/param.h
1.6 -> 1.7 syssrc/sys/arch/newsmips/include/param.h
1.7 -> 1.8 syssrc/sys/arch/ofppc/include/param.h
1.23 -> 1.24 syssrc/sys/arch/pc532/include/param.h
1.32 -> 1.33 syssrc/sys/arch/pmax/include/param.h
1.7 -> 1.8 syssrc/sys/arch/powerpc/include/param.h
1.1 -> 1.2 syssrc/sys/arch/prep/include/param.h
1.1 -> 1.2 syssrc/sys/arch/sgimips/include/param.h
1.3 -> 1.4 syssrc/sys/arch/sh3/include/param.h
1.44 -> 1.45 syssrc/sys/arch/sparc/include/param.h
1.21 -> 1.22 syssrc/sys/arch/sparc64/include/param.h
1.43 -> 1.44 syssrc/sys/arch/vax/include/param.h
 1.33.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.34.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.34.8.1 30-May-2001  nathanw file param.h was added on branch nathanw_sa on 2002-02-28 04:11:22 +0000
 1.34.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.35.18.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.35.18.2 18-Sep-2004  skrll Sync with HEAD.
 1.35.18.1 03-Aug-2004  skrll Sync with HEAD
 1.36.16.1 30-Dec-2006  yamt sync with head.
 1.37.20.1 18-Nov-2006  ad Sync with head.
 1.37.8.1 14-Sep-2006  yamt sync with head.
 1.38.76.2 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.38.76.1 22-Aug-2009  matt Move MACHINE_ARCH definition to <mips/mips_param.h>
Move mbuf related defines to <mips/mips_param.h>
 1.38.72.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.38.66.1 28-Apr-2009  skrll Sync with HEAD.
 1.38.58.3 11-Mar-2010  yamt sync with head
 1.38.58.2 19-Aug-2009  yamt sync with head.
 1.38.58.1 04-May-2009  yamt sync with head.
 1.41.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.41.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.41.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.41.4.2 21-Apr-2011  rmind sync with head
 1.41.4.1 05-Mar-2011  rmind sync with head
 1.45.56.1 10-Jun-2019  christos Sync with HEAD
 1.45.54.1 18-Jan-2019  pgoyette Synch with HEAD
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.2 14-Jan-1994  mycroft Clean up deleted files.
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.8 19-Apr-2018  christos s/static inline/static __inline/g for consistency.
 1.7 19-Mar-1996  jonathan branches: 1.7.80;
Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.6 19-Mar-1996  jonathan Change "pmax" -> "mips" before moving to sys/arch/mips/include.
 1.5 18-Jan-1995  mellon Make pcb_regs structure compatible with Ultrix
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.7.80.1 22-Apr-2018  pgoyette Sync with HEAD
 1.15 13-Sep-2000  nisimura Nuke unused obscure #define's.
 1.14 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.13 16-Jun-1997  jonathan branches: 1.13.24;
Yet more mips1/mips3 merging:

Move mips-specific pmap definitions (PMAP_PREFER for mips3, declaratin
of pmap_bootstrap() for the system-specific machdep.c) from
arch/pmax/include/pmap.h to arch/mips/include/pmap.h.
 1.12 15-Jun-1997  mhitch More merged MIPS1/MIPS3 support for DECstations.
 1.11 25-May-1997  jonathan Prototype for pmap_bootstrap().
 1.10 19-Mar-1996  jonathan Replace the following additional header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>,
after merging changes from the pmax and pica ports into the
src/sys/arch/mips/include tree.

ptrace.h cdefs.h pmap.h signal.h kdbparam.h
 1.9 19-Mar-1996  jonathan Change "pmax_xxx" macros to "mips_xxx" macros, in preparation
for moving to src/sys/arch/mips/include/pmap.h.
 1.8 12-Apr-1995  mellon Use _KERNEL, not KERNEL
 1.7 10-Apr-1995  mycroft Bring back pmap_kernel(), for now always inlined as a pointer to
kernel_pmap_store.
 1.6 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.3 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.2 15-Oct-1993  deraadt update from rick, tarfile of Oct 11 10:46
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.13.24.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

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

* Removes the PMC code of ARM XSCALE.

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

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

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

* Removes the pmc_evid_t and pmc_ctr_t types.

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

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.1.204.1 10-Jun-2019  christos Sync with HEAD
 1.1.202.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 07-Aug-2002  jdolecek file pmc.h was added on branch kqueue on 2002-09-06 08:38:51 +0000
 1.1.4.2 31-Aug-2002  gehenna catch up with -current.
 1.1.4.1 07-Aug-2002  gehenna file pmc.h was added on branch gehenna-devsw on 2002-08-31 13:45:39 +0000
 1.1.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 07-Aug-2002  nathanw file pmc.h was added on branch nathanw_sa on 2002-08-13 02:18:40 +0000
 1.9 29-Jul-2006  ad Remove RASTERCONSOLE support from the pmax port.
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.8;
merge ktrace-lwp.
 1.7 07-Aug-2003  agc branches: 1.7.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.6 09-Jan-2000  ad branches: 1.6.28;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.5 24-Apr-1999  simonb branches: 1.5.2;
Nuke register and remove trailling white space.
 1.4 26-Oct-1994  cgd branches: 1.4.22; 1.4.30;
new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.4.30.1 21-Jun-1999  thorpej Sync w/ -current.
 1.4.22.1 15-Oct-1998  nisimura - Reflect new internals.
 1.5.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.28.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.28.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.28.1 03-Aug-2004  skrll Sync with HEAD
 1.7.16.1 30-Dec-2006  yamt sync with head.
 1.8.8.1 11-Aug-2006  yamt sync with head
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.6 19-Apr-2018  christos s/static inline/static __inline/g for consistency.
 1.5 19-Mar-1996  jonathan branches: 1.5.80;
Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.5.80.1 22-Apr-2018  pgoyette Sync with HEAD
 1.8 19-Apr-2018  christos s/static inline/static __inline/g for consistency.
 1.7 19-Mar-1996  jonathan branches: 1.7.80;
Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.6 31-May-1995  jonathan Change reference in asm code from ``__mcount'' to ``___mcount'', to be
consistent with the (default) prepending of underscores to identifiers.

Because this reference is inside an ASM string it's too hairy to
conditionalize to support different toolchains that don't prepend underscores.
(Just don't do profiling with such toolchains.)
 1.5 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.7.80.1 22-Apr-2018  pgoyette Sync with HEAD
 1.6 16-Jun-1997  jonathan Move merged pmax psl.h with mips1/mips3 support to mips/include/psl.h.
Change pmax/include/psl.h to just do #include <mips/psl.h>.

pmax/include/psl.h would go away completely if it wasn't stil required
by compat/common/kern_exit_43.c.
 1.5 15-Jun-1997  mhitch More merged MIPS1/MIPS3 support for DECstations.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.7 13-Oct-1996  jonathan Merge mips1 and mips3 pte/pmap code, pass 0;
* Move mips-I pte (TLBlo) definitions from pmax/include/pte.h
to mips/include/mips1_pte.h

* Move mips-III pte (TLBlo) definitions from pica/include/pte.h
to mips/include/mips3_pte.h

* Add new mips/include/pte.h, which includes exactly one of
mips1_pte.h or mips3_pte.h (which still have namespace collisions),
depending on "options MIPS1" or "options MIPS3". (hack).
Move soft kvtopte(), ptetovk() definitions to mips/include/pte.h

* Add macro PTE_TO_PADDR() to hide the different hardware TLB formats
when mapping from pte to physical address.

* Add macro PTE_READONLY() to hide lack of SW read-only bit in mips-III
tlb. (mips1 pmap uses a sw bit in the PTE, mips3 looks up RO bit in
the kernel pmap.)

* Use macros (not direct TLB frobbing) in mips/trap.c, to make it
mips-1/mips-III indepenndet.

* Change {pmax,pica}/include/pte.h to just do #include <mips/pte.h>.
 1.6 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.5 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.7 19-Mar-1996  jonathan Replace the following additional header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>,
after merging changes from the pmax and pica ports into the
src/sys/arch/mips/include tree.

ptrace.h cdefs.h pmap.h signal.h kdbparam.h
 1.6 21-Dec-1995  jonathan Reserve a number in the machine-dependent range for PT_STEP, in
case the kernel-debugger implementation of single-stepping ever works
with user code.
 1.5 20-Dec-1995  jonathan Add support for ptrace PT_GETREGS and PT_SETREGS for NetBSD/pmax:
* define PT_GETREGS and PT_SETREGS in pmax/include/ptrace.h
* Flesh out the stubs in pmax/pmax/process_machdep.c to handle
those requests.
* Now that "struct reg" is actually used, remove the bogus
#ifdef LANGUAGE_C around its definition, and redo pmax/include/reg.h
so that the definitions needed by locore.S are in a separate file,
pmax/include/regnum.h.
* update locore.S to match.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.8 19-Apr-2018  christos s/static inline/static __inline/g for consistency.
 1.7 19-Mar-1996  jonathan branches: 1.7.80;
Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.6 20-Dec-1995  jonathan Add support for ptrace PT_GETREGS and PT_SETREGS for NetBSD/pmax:
* define PT_GETREGS and PT_SETREGS in pmax/include/ptrace.h
* Flesh out the stubs in pmax/pmax/process_machdep.c to handle
those requests.
* Now that "struct reg" is actually used, remove the bogus
#ifdef LANGUAGE_C around its definition, and redo pmax/include/reg.h
so that the definitions needed by locore.S are in a separate file,
pmax/include/regnum.h.
* update locore.S to match.
 1.5 18-Jan-1995  mellon Make register definitions compatible with Ultrix
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.7.80.1 22-Apr-2018  pgoyette Sync with HEAD
 1.7 30-Mar-1999  soda regdef.h is back
 1.6 13-Mar-1999  drochner This file is unneeded since <mips/regdef.h> went into <mips/asm.h>.
 1.5 19-Mar-1996  jonathan branches: 1.5.20;
Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.5.20.1 15-Oct-1998  nisimura - Reflect new internals.
 1.3 20-Mar-1996  jonathan Merge more header files with arch/mips/include, by replacing
with versions that #inlude the <mips/XXX.h> file:
reloc.h regnum.h varargs.h
 1.2 19-Mar-1996  jonathan Remove #ifdef LANGUAGE_C - protected definition of "struct reg".
(It was a duplicate of the real definition reg.h and was never used.)
 1.1 20-Dec-1995  jonathan Add support for ptrace PT_GETREGS and PT_SETREGS for NetBSD/pmax:
* define PT_GETREGS and PT_SETREGS in pmax/include/ptrace.h
* Flesh out the stubs in pmax/pmax/process_machdep.c to handle
those requests.
* Now that "struct reg" is actually used, remove the bogus
#ifdef LANGUAGE_C around its definition, and redo pmax/include/reg.h
so that the definitions needed by locore.S are in a separate file,
pmax/include/regnum.h.
* update locore.S to match.
 1.8 09-Sep-2001  simonb branches: 1.8.4;
Clean up and standardise across MIPS ports.
 1.7 09-Jan-2000  ad branches: 1.7.6; 1.7.8;
- Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.6 20-Mar-1996  jonathan branches: 1.6.32;
Merge more header files with arch/mips/include, by replacing
with versions that #inlude the <mips/XXX.h> file:
reloc.h regnum.h varargs.h
 1.5 19-Mar-1996  jonathan Change "XXX_pmax" to "XXX_mips" in preparation for merging with
Pica reloc.h.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.6.32.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.8.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.7.6.1 01-Oct-2001  fvdl Catch up with -current.
 1.8.4.2 09-Sep-2001  simonb Clean up and standardise across MIPS ports.
 1.8.4.1 09-Sep-2001  simonb file reloc.h was added on branch nathanw_sa on 2001-09-09 04:20:30 +0000
 1.2 05-Feb-2003  nakayama Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
 1.1 06-Jun-2000  soren branches: 1.1.4; 1.1.6;
Add rnd(4) glue for the MIPS3 cycle counter.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 06-Jun-2000  bouyer file rnd.h was added on branch thorpej_scsipi on 2000-11-20 20:20:32 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 06-Jun-2000  minoura file rnd.h was added on branch minoura-xpg4dl on 2000-06-22 17:02:25 +0000
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file rwlock.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file rwlock.h was added on branch yamt-lazymbuf on 2007-02-26 09:07:49 +0000
 1.3 19-Apr-2018  christos s/static inline/static __inline/g for consistency.
 1.2 19-Mar-1996  jonathan branches: 1.2.80;
Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.1 20-Dec-1994  cgd make the definition of _JBLEN mach. dep. header-dependent.
 1.2.80.1 22-Apr-2018  pgoyette Sync with HEAD
 1.8 19-Mar-1996  jonathan Replace the following additional header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>,
after merging changes from the pmax and pica ports into the
src/sys/arch/mips/include tree.

ptrace.h cdefs.h pmap.h signal.h kdbparam.h
 1.7 19-Mar-1996  jonathan Add eight 32-bit (XXX) words of reserved space to struct sigcontext,
for binary compatibilty with the pica port.
 1.6 18-Jan-1995  mellon break mullo and mulhi out of gp regs in sigcontext
 1.5 10-Jan-1995  jtc Only define sig_atomic_t when _ANSI_SOURCE is defined.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.1 23-Jul-2014  alnsn branches: 1.1.2; 1.1.6;
Rename sljitarch.h to sljit_machdep.h.
 1.1.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 23-Jul-2014  tls file sljit_machdep.h was added on branch tls-maxphys on 2014-08-20 00:03:18 +0000
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 23-Jul-2014  tls file sljit_machdep.h was added on branch tls-earlyentropy on 2014-08-10 06:54:05 +0000
 1.2 23-Jul-2014  alnsn Rename sljitarch.h to sljit_machdep.h.
 1.1 22-Jul-2014  alnsn Add sljitarch.h to cobalt and pmax.
 1.13 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.12 19-Mar-1996  jonathan Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.11 26-Feb-1996  jonathan Revert pmax stdarg.h and varargs.h to versions from 1995-11-13. Those
versions work correctly; at some point between then and the immediately
preceding revisions, the "stylistic" changes to one (or both) stdarg.h
and varargs.h broke passing doubles to printf().
 1.10 25-Dec-1995  mycroft Stylistic changes.
 1.9 25-Dec-1995  mycroft Stylistic changes.
 1.8 25-Dec-1995  mycroft Update for GCC 2.7, and fix bugs.
 1.7 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.6 28-Jan-1995  jtc ANSI says that <stdarg.h>'s va_end macro must expand to a void expression.
For consistancy, I'm changing <varargs.h> too.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 15-Oct-1994  cgd make <stdarg.h> a symlink, and clean up ports' stdarg.h and varargs.h files.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.14 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.13 14-Mar-2009  dsl branches: 1.13.4; 1.13.6; 1.13.8;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.12 03-Jan-2008  joerg branches: 1.12.10; 1.12.18; 1.12.24; 1.12.28;
Timecounter and generic todr support for pmax. From Garret D'Amore.
 1.11 04-Mar-2007  christos branches: 1.11.20; 1.11.26; 1.11.32;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.10 06-Jun-2000  nisimura branches: 1.10.44; 1.10.82;
Make sure model specific cpu_intr() routines call _splset() as the last
action.
 1.9 06-Mar-2000  mhitch branches: 1.9.2;
A common device_register() is used instead of a separate version for each
of the different DECstation models.
 1.8 29-Feb-2000  nisimura - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.7 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.6 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.5 25-Nov-1999  simonb Move memory sizing to a new function memsize_scan(), and add an empty
stub for memsize_bitmap() to use the PROM bitmap for memory information.
Add a memsize function pointer to the platform structure, and make all
existing DECstation models use memsize_scan() for now.

Interestingly, from the Ultrix cpuconf.{c,h} only the 3100 and 5400 use
a memory scan to determine available memory - all other models use the
PROM bitmap...
 1.4 12-Nov-1999  nisimura - Arrange 'platform' struct to have clkread entry, which can interporate
HZ using high resolution timer circuit if available. Merge os_init
into the primary hardware initialization in sysinit[].init.
- Nuke an irrelevant attempt to disable RTC under splhigh condition.
- Make sure IOASIC DECstations accumulate device interrupt mask bits into
certain global variables.
- Have witchcrafts to issue ACK to RTC interrupt.
- Add a missing \n and a minor rearrangement in cpu.c
 1.3 24-Apr-1999  simonb branches: 1.3.2; 1.3.4; 1.3.8;
Nuke register and remove trailling white space.
 1.2 26-Mar-1998  thorpej branches: 1.2.4; 1.2.12;
The line between "family" and "model" are ... very fuzzy on the DECstation.
So, don't bother.
 1.1 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.2.12.1 21-Jun-1999  thorpej Sync w/ -current.
 1.2.4.7 14-Mar-2000  nisimura Synchronize with the recent progress in main trunk. Main trunk is
close enough with this.
 1.2.4.6 06-Dec-1999  nisimura Sync w/ recent changes in main trunk.
 1.2.4.5 12-Nov-1999  nisimura Sync. w/ main trunk changes.
 1.2.4.4 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.2.4.3 26-May-1999  nisimura - Track changes in main trunk.
 1.2.4.2 12-May-1999  nisimura - Nuke unused 'umimpl_platform' extern declaration. 'os_init' call is not
used anymore.
- Fix careless mistakes.
 1.2.4.1 29-Mar-1999  nisimura - Catch up to recent changes in main trunk.
- Reorganize various #include's.
- Yield memcpy to Mach derivated one.
- pm_cnattach() now checks the existense of framebuffer card.
 1.3.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.4.1 15-Nov-1999  fvdl Sync with -current
 1.3.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.9.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.10.82.1 12-Mar-2007  rmind Sync with HEAD.
 1.10.44.2 21-Jan-2008  yamt sync with head
 1.10.44.1 03-Sep-2007  yamt sync with head.
 1.11.32.1 08-Jan-2008  bouyer Sync with HEAD
 1.11.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.20.1 09-Jan-2008  matt sync with HEAD
 1.12.28.1 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.12.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.12.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.12.10.1 04-May-2009  yamt sync with head.
 1.13.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.13.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.4.1 05-Mar-2011  rmind sync with head
 1.18 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.17 29-Feb-2000  nisimura branches: 1.17.136; 1.17.154;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.16 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.15 09-Jan-2000  simonb Use the badaddr() prototype in mips/include/cpu.h by including
<machine/cpu.h> in mips/include/mips_param.h. Remove duplicate
badaddr() prototypes from some pmax header files.
 1.14 08-Jan-2000  simonb Function prototype cleanup.
 1.13 16-Nov-1999  nisimura Back out a part of change in the previous commit; old driver uses it.
 1.12 16-Nov-1999  nisimura Remove now defunct definitions and declaratins.
 1.11 24-Apr-1999  simonb branches: 1.11.2; 1.11.8;
Nuke register and remove trailling white space.
 1.10 16-Mar-1999  nisimura branches: 1.10.4;
- Final cut of TC decoulping.
 1.9 12-Mar-1999  nisimura - Nuke old leftover bogocities, round one; externs for non-existent
functions, less-intuitive #define's in inappropriate header files.
 1.8 19-Apr-1998  jonathan branches: 1.8.4;
Define TC_KV(), TC_C() here for benefit of model-specific TCbus initializers.
 1.7 22-Jun-1997  jonathan * Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).
 1.6 25-May-1997  jonathan Lint: add prototype for badaddr() (the expansion of tc_badaddr).
 1.5 06-Oct-1996  jonathan Update pmax drivers to use "const" on 2nd arg to cfprint_t:
turbocnhannel: include/tc_machdep.h, tc/tc_subr.c, tc/asic.c
kn01 baseboard: pmax/mainbus.c
 1.4 29-May-1996  mhitch Fix autoconfig stuff to match the alpha. The DS3100 will now
configure properly.
 1.3 14-Apr-1996  jonathan branches: 1.3.4;
Fix the definition of TC_PHYS_TO_UNCACHED(addr): make it change a mips
kernel addressed to uncached space.

Add prototypes for pmax-specific TC functions used in probing for
a framebuffer console.
 1.2 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.1 28-Dec-1995  jonathan Use machine-independent TurboChannel include files from dev/tc.
Add machine-dependent TC definitions in pmax/include/tc_machdep.h.
 1.3.4.1 30-May-1996  mhitch Pulled autoconfig fixes up from the trunk
 1.8.4.5 14-Mar-2000  nisimura Synchronize with the recent progress in main trunk. Main trunk is
close enough with this.
 1.8.4.4 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.8.4.3 15-Mar-1999  nisimura - Adjustment for 'machine/conf.h' removal.
- A bit cleanup of handcrafted TC device config.
 1.8.4.2 22-Jan-1999  nisimura - Sync with various changes recently done in main trunk.
 1.8.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.10.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.11.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.17.154.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.17.136.1 11-Mar-2010  yamt sync with head
 1.7 24-Mar-1996  jonathan Replace pica and pmax include/trap.h with versions that #include <mips/cpu.h>,
after merging the definition of T_USER in the pmax port, and moving
the result to mips/cpu.h.
 1.6 24-Mar-1996  jonathan Change pmax T_USER bit (software only) to be 0x20, the same as the
Pica port. (The r4000 CPU used in the pica has more hardware execption types.)
 1.5 19-Mar-1996  jonathan Add trap definitions added for the r4000 port.
Note: T_USER is different in the pmax and pica ports!
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.26 26-Jan-2017  christos provide __HAVE_COMPAT_NETBSD32 and fix multiple include protection consistently.
 1.25 20-Jan-2008  joerg branches: 1.25.54; 1.25.74; 1.25.78; 1.25.82;
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.24 03-Jan-2008  joerg Timecounter and generic todr support for pmax. From Garret D'Amore.
 1.23 17-Oct-2007  garbled branches: 1.23.2; 1.23.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.22 14-Jul-2007  ad branches: 1.22.10;
Generic soft interrupts are mandatory.
 1.21 05-Aug-2002  simonb branches: 1.21.22; 1.21.64; 1.21.72;
Use a __HAVE_BOOTINFO_H define to check for bootinfo support instead of
speading port names in arch-dependant code.
 1.20 05-Mar-2002  simonb branches: 1.20.8;
Provide a L2 cache configuration function.
 1.19 28-Feb-2002  simonb Use "#define<tab>".
 1.18 22-Aug-2001  nisimura branches: 1.18.6;
NetBSD/pmax now has GENERIC_SOFT_INTERRUPTS.
 1.17 03-Dec-2000  simonb branches: 1.17.4;
Remove __BROKEN_CONFIG_UNIT_USAGE, not needed on pmax.
 1.16 06-Mar-2000  mhitch Define __HAVE_DEVICE_REGISTER, since pmax now has device_register().
 1.15 05-Feb-2000  cgd add __BROKEN_CONFIG_UNIT_USAGE #define, becuase these ports do very
wrong things with device configuration data "cf_unit" information.
 1.14 21-Jul-1997  jonathan branches: 1.14.22;
Kill __BROKEN_INDIRECT_CONFIG on pmax.
Based on a patch from Chris G. Demetriou, December 1996.
 1.13 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.12 19-Mar-1996  jonathan more merged pmax/mips header files: types.h

Replace header files from src/sys/arch/pmax/include/ with versions that
include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).
 1.11 09-Dec-1995  mycroft Define __FORK_BRAINDAMAGE.
 1.10 06-Jul-1995  cgd add <sys/cdefs.h> inclusions. namsspace-protect physadr, label_t
def'ns against _POSIX_SOURCE and _ANSI_SOURCE.
 1.9 28-Jun-1995  cgd remove unused cpu_exec() definitions. moved "broken swap" markers, for
ports that still need it, to types.h.
 1.8 26-Jun-1995  cgd define __BDEVSW_DUMP_OLD_TYPE for ports where it's true. clean up
some m68k ports inclusion of common header.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 20-Oct-1994  cgd update for new syscall args description mechanism
 1.5 20-Jul-1994  cgd define __BIT_TYPES_DEFINED__ for compatibility with things like BIND and nvi
 1.4 27-May-1994  glass branches: 1.4.2;
bsd 4.4-lite pmax port as ported to NetBSD
 1.3 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.2 14-Mar-1994  cgd add basic integral types (a la sparc port) that new nvi wants.
mark old 'basic integral types' as XXX -- they should be squished
when whoever gets this port working.
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.4.2.1 20-Jul-1994  cgd update from trunk.
 1.14.22.2 08-Dec-2000  bouyer Sync with HEAD.
 1.14.22.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.17.4.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.17.4.2 16-Mar-2002  jdolecek Catch up with -current.
 1.17.4.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.18.6.3 13-Aug-2002  nathanw Catch up to -current.
 1.18.6.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.18.6.1 22-Aug-2001  nathanw file types.h was added on branch nathanw_sa on 2002-04-01 07:41:57 +0000
 1.20.8.1 31-Aug-2002  gehenna catch up with -current.
 1.21.72.1 03-Oct-2007  garbled Sync with HEAD
 1.21.64.1 20-Aug-2007  ad Sync with HEAD.
 1.21.22.1 03-Sep-2007  yamt sync with head.
 1.22.10.3 23-Mar-2008  matt sync with HEAD
 1.22.10.2 09-Jan-2008  matt sync with HEAD
 1.22.10.1 06-Nov-2007  matt sync with HEAD
 1.23.8.2 23-Jan-2008  bouyer Sync with HEAD.
 1.23.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.23.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.25.82.1 21-Apr-2017  bouyer Sync with HEAD
 1.25.78.1 20-Mar-2017  pgoyette Sync with HEAD
 1.25.74.1 05-Feb-2017  skrll Sync with HEAD
 1.25.54.1 03-Dec-2017  jdolecek update from HEAD
 1.15 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.14 20-Mar-1996  jonathan Merge more header files with arch/mips/include, by replacing
with versions that #inlude the <mips/XXX.h> file:
reloc.h regnum.h varargs.h
 1.13 26-Feb-1996  jonathan Revert pmax stdarg.h and varargs.h to versions from 1995-11-13. Those
versions work correctly; at some point between then and the immediately
preceding revisions, the "stylistic" changes to one (or both) stdarg.h
and varargs.h broke passing doubles to printf().
 1.12 26-Dec-1995  mycroft Make the type of __builtin_va_list a long.
 1.11 26-Dec-1995  mycroft Use __builtin_va_alist.
 1.10 25-Dec-1995  mycroft Stylistic changes.
 1.9 25-Dec-1995  mycroft Update for GCC 2.7, and fix bugs.
 1.8 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.7 28-Jan-1995  jtc ANSI says that <stdarg.h>'s va_end macro must expand to a void expression.
For consistancy, I'm changing <varargs.h> too.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 15-Oct-1994  cgd make <stdarg.h> a symlink, and clean up ports' stdarg.h and varargs.h files.
 1.4 29-Jun-1994  deraadt _MACHINE_VARGS_H_
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.16 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.15 14-Dec-2009  matt branches: 1.15.4; 1.15.6; 1.15.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.14 24-Aug-2001  mhitch branches: 1.14.6; 1.14.130; 1.14.148;
Use the PROM bitmap, if available, to determine available memory. Also
add support of multiple memory segments so machines that allow mixed
memory sizes can utilize all available memory.
 1.13 11-Jan-2000  ad branches: 1.13.8;
Fix thinko in comment.
 1.12 09-Jan-2000  simonb Remove defines for VM_PHYSSEG_STRAT and VM_PHYSSEG_NOADD - these are
already in mips/include/vmparam.h. Now things work again (yo Andy!).
 1.11 09-Jan-2000  ad - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
that do nothing except function as mips header wrappers).
 1.10 09-Jan-2000  ad - Protect from multiple includes.
- Fix and beef up comments.
- G/C unused def.
 1.9 07-May-1999  thorpej branches: 1.9.2;
Add a second memory free list, which holds the first 8M of RAM. This is
so that devices which must allocate DMA memory in this range (e.g.
PixelStamp graphics boards) have a better chance of doing so, without
an awful hack.
 1.8 08-Jul-1998  thorpej branches: 1.8.4; 1.8.12;
Define one page free list, and put all pages on it.
 1.7 25-Feb-1998  thorpej DECstations have one physical memory segment.
 1.6 19-Mar-1996  jonathan Replace the following header files from src/sys/arch/pmax/include/
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).

bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 01-Jun-1994  glass VM_MIN_ADDR -> 0
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.8.12.2 06-Aug-1999  chs take an initial guess at UBC parameters.
 1.8.12.1 21-Jun-1999  thorpej Sync w/ -current.
 1.8.4.1 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.9.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.13.8.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.14.148.1 31-Dec-2009  matt Use mips_page_physload and mips_init_lwp0_uarea.
 1.14.130.1 11-Mar-2010  yamt sync with head
 1.14.6.2 24-Aug-2001  mhitch Use the PROM bitmap, if available, to determine available memory. Also
add support of multiple memory segments so machines that allow mixed
memory sizes can utilize all available memory.
 1.14.6.1 24-Aug-2001  mhitch file vmparam.h was added on branch nathanw_sa on 2001-08-24 15:33:18 +0000
 1.15.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.15.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.15.4.1 05-Mar-2011  rmind sync with head
 1.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:39:13 +0000
 1.2 11-Dec-2005  christos branches: 1.2.18;
merge ktrace-lwp.
 1.1 05-Nov-2005  tsutsui branches: 1.1.2;
Add empty <machine/wired_map.h> for the MI mips/wired_map.c.
 1.1.2.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.1 05-Nov-2005  skrll file wired_map.h was added on branch ktrace-lwp on 2005-11-10 13:58:15 +0000
 1.2.18.2 21-Jun-2006  yamt sync with head.
 1.2.18.1 11-Dec-2005  yamt file wired_map.h was added on branch yamt-lazymbuf on 2006-06-21 14:54:48 +0000
 1.5 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.4 07-Nov-2007  ad branches: 1.4.14;
Merge tty changes from the vmlocking branch.
 1.3 11-Dec-2005  christos branches: 1.3.30; 1.3.48; 1.3.50; 1.3.54; 1.3.56;
merge ktrace-lwp.
 1.2 13-Dec-2003  ad branches: 1.2.16;
Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.1 15-Oct-1998  nisimura branches: 1.1.2; 1.1.16; 1.1.26;
file z8530var.h was initially added on branch nisimura-pmax-wscons.
 1.1.26.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.26.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.26.1 03-Aug-2004  skrll Sync with HEAD
 1.1.16.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.1.2.3 03-Feb-2000  nisimura Manipulate ZS csr/data registers in short quantity as ULTRIX does.
 1.1.2.2 19-Oct-1998  drochner slight cleanup, add support for keyboard attachment
 1.1.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.2.16.1 15-Nov-2007  yamt sync with head.
 1.3.56.1 19-Nov-2007  mjf Sync with HEAD.
 1.3.54.1 13-Nov-2007  bouyer Sync with HEAD
 1.3.50.1 08-Nov-2007  matt sync with -HEAD
 1.3.48.1 11-Nov-2007  joerg Sync with HEAD.
 1.3.30.3 03-Dec-2007  ad Sync with HEAD.
 1.3.30.2 03-Dec-2007  ad Sync with HEAD.
 1.3.30.1 15-Jul-2007  ad Get pmax working.
 1.4.14.1 03-Apr-2008  mjf Sync with HEAD.
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.2 01-Mar-1995  mycroft Clean up deleted files.
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.13 03-Feb-2000  nisimura Merge IOASIC register definitions.
 1.12 16-Aug-1999  simonb branches: 1.12.2;
Remove board-specific CSR definitions.
 1.11 25-Mar-1999  simonb Remove trailing whitespace.
 1.10 14-Mar-1999  jonathan Clean up names for SCC interrupt bits.
 1.9 22-Jun-1998  jonathan branches: 1.9.4;
Correct the ioasic interrupt symbol definitions for MAXINE ISDN.
 1.8 19-May-1996  jonathan Add closing-comments to commented-out #defines. to avoid -Wall complaining
about comments-inside-comments.
(The #defines for the IOCTL asic should arguably be mereged with
NetBSD/Alpha in any case.)
 1.7 31-Jan-1996  jonathan Resolve pmax and alpha IOCTL asic driver differences, pass 1:

Rename the ioctl asic register and slot macros from ASIC_<xxx> to
IOASIC_<xxx>, to be compatible with the machine-indpendent names in
sys/dev/tc/ioasicvar.h. The pmax code still uses
sys/arch/pmax/pmax/asic.h, as some of the registers and offsets
defined there are not yet defined in sys/dev/tc/ioasicvar.h.

Rename the ioctl asic base-address pointer from `asic_base' to `ioasic_base'.
 1.6 29-Aug-1995  jonathan Commit a copy of pmax/asic.h from my development source tree, since
the pmax lance driver that uses the machine-independent am7990.c driver
needs some definitions for it. This is a partial re-merge of NetBSD/alpha's
tc/asic.h back to the pmax, with the addition of symbolic #define's
for registers and bits in registers that are pmax model-specific.
 1.5 28-Apr-1995  jonathan Add memory-mapped address of the IO ASIC TurboChannel bus-cycle counter,
as present on 5k/2xx and Alpha IOASICs. Older machines may or may not
have the hardware counter. To be used as a high-resolution DECstation clock.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.9.4.1 06-Dec-1999  nisimura Remove obsoluted files in this branch.
 1.12.2.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.80 13-Oct-2012  tsutsui struct device * -> device_t, use device_xname() (from chs@)
 1.79 29-Jul-2012  mlelstv branches: 1.79.2;
Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

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

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

Make cpu_rootconf(9) describe the calling order.
 1.78 09-Jul-2011  matt branches: 1.78.2; 1.78.8;
Cleanu <machine/*> includes
 1.77 06-Apr-2011  tsutsui Move intr_init() (which initializes evcnt(9) for interrupts)
from early machdep.c:mach_init() to autoconf.c:cpu_configure().

evcnt_init() isn't called yet when mach_init() is invoked from locore.S
and interrupts won't be enabled before cpu_configure(9).

Problem reported by Erik Bertelsen on port-pmax:
http://mail-index.NetBSD.org/port-pmax/2011/04/06/msg000093.html
 1.76 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.75 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.74 20-Jul-2009  tsutsui branches: 1.74.4; 1.74.6; 1.74.8;
KNF, ANSIfy, and misc cosmetics.
 1.73 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.72 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.71 03-Dec-2007  ad branches: 1.71.18; 1.71.26; 1.71.32; 1.71.36;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.70 26-Feb-2006  thorpej branches: 1.70.24; 1.70.42; 1.70.44; 1.70.50;
Use device_is_a()
 1.69 23-Feb-2006  thorpej Use device_parent().
 1.68 11-Dec-2005  christos branches: 1.68.2; 1.68.4; 1.68.6;
merge ktrace-lwp.
 1.67 01-Jun-2005  drochner branches: 1.67.2;
more cast-qual fallout
 1.66 23-Oct-2004  thorpej Centralize the declaration of booted_device and booted_partition.
 1.65 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.64 02-Apr-2003  drochner branches: 1.64.2;
allow any type of Turbochannel network card as boot device
(especially "fta")
 1.63 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.62 26-Sep-2002  thorpej Get the pointer to the driver name early, rather than constantly
deferencing the cfdriver pointer.
 1.61 27-Aug-2001  nisimura branches: 1.61.6;
Count and record memory error interrupts with evcnt(9).
 1.60 26-Aug-2001  simonb Switch to MI SCSI and drop old pmax MD SCSI support completely.
 1.59 22-Aug-2001  nisimura NetBSD/pmax now has GENERIC_SOFT_INTERRUPTS.
 1.58 25-Apr-2001  bouyer branches: 1.58.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.57 06-Jan-2001  simonb branches: 1.57.2;
Adjust recent netboot fix to work in the 5100 as well.
 1.56 23-Nov-2000  nisimura - Nuke xasc_ioasic.h and xasc_pmaz.h as no code uses the symbols they define.
- Hide #include <pmax/dev/device.h> for "pmax oldscsi" inside
#if NRZ > 0 || NTZ > 0.
 1.55 21-Nov-2000  ad Fix netbooting on the 2100/3100. Partially from Thilo Manske
<Thilo.Manske@HEH.Uni-Oldenburg.DE> in PR 11212.
 1.54 24-Jul-2000  ad Allow probe for SCSI tape drives even if no SCSI disk drives are configured.
 1.53 06-Mar-2000  mhitch branches: 1.53.4;
Use device_register() instead of dk_establish() to determine the boot
device. Works on a 3100 with both old and MI SCSI, on a 5000/25 built-in
IOASIC with both old and MI SCSI, on the 5000/25 PMAZ TC option card
with both old and MI SCSI, and with tftp boot on the 5000/25.
 1.52 04-Mar-2000  mhitch Fix boot device detection. Device probes are not done when adapters are
configured, but after all adapters have been configured. When multiple
adapters are present, only the last configured adapter could be matched
to the boot device slot. The adapter attach routines now check if that
adapter slot matches the boot device slot and saves the softc pointer
for that controller. Then when the disks are configured, dk_establish()
matches the appropriate controller. Also change the rz boot device test
to include a check for the adapter so that it works when booting from a
disk on adapters other than the first one.
 1.51 03-Mar-2000  mhitch Allow a kernel (i.e. GENERIC) to be configured with rz disks with the SII
driver and sd disks with MI ASC driver.
 1.50 29-Feb-2000  nisimura - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.49 23-Feb-2000  mhitch The check for 'rz(?,?,?)' was incorrect and would not find the boot device
on the 3100.
 1.48 19-Feb-2000  nisimura Introduce MI SCSI codes; for DECstation 5000s only this moment and
disabled by default.
 1.47 19-Feb-2000  nisimura The way to determine booted root device was simplified largely.
 1.46 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.45 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.44 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.43 08-Jan-2000  simonb Function prototype cleanup.
 1.42 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.41 21-Sep-1999  matt branches: 1.41.2; 1.41.8;
Need to pull in <sys/kernel.h> for definition of cold.
 1.40 20-Sep-1999  thorpej Declare and clear `cold' in a centralized place.
 1.39 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.38 23-Aug-1999  thorpej Garbage-collect reference to <sys/dmap.h>.
 1.37 10-Jun-1999  nisimura - Remove local declaration of 'dev_name2blk[]'.
- Minor formatting correction and removal of defunct debug lines.
 1.36 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.35 31-May-1999  nisimura - Call _splnone() explicitely after auto config. was well done to make
sure SOFT_INTs cleared before interrupt processing is started.
 1.34 25-May-1999  nisimura - Use dev_name2blk[] array prepared by config(8) instead of handcrafting
local data.
 1.33 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.32 17-Nov-1998  jonathan branches: 1.32.6;
Add md (memory disk) hooks for pmax. ecoff kernel with 2MB ramdisk
tftp-boots on new PROMs. (3MB is too large).
 1.31 26-Mar-1998  thorpej branches: 1.31.4;
Right now all platforms use the tc_slot_info[] stuff, so put it in a place
where everyone can get at it.
 1.30 25-Mar-1998  jonathan Garbage-collect old warnings.
Cvs: ----------------------------------------------------------------------
 1.29 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.28 24-Mar-1998  jonathan Rewrite pmax console-probing code from scratch
as pmax/dev/findcons.c:
* Follow the same logic: look for the device the PROM is using.
* If it's a framebuffer and we don't have a driver for it, try other
* framebuffers in PROM search order.
* If no match found, warn user and fall over to serial console.
* if no serial console found, go back to PROM.

Rework tc/scc.c attach routine to give cleaner initialization semantics.
Prune out old 'braindamage' code.
 1.27 09-Jan-1998  drochner Use of BOOTP or BOOTPARAM can be conntrolled by config option now.
 1.26 09-Nov-1997  jonathan Initialize nfs_boot_rfc_951 to 1. Makes pmax kernels to use bootp,
not RARP/bootparams, to get diskless-boot config info.
Decstation PROMs already use BOOTP so we lose nothing.
 1.25 15-Jun-1997  jonathan branches: 1.25.8;
findroot() fix for kernels configured "root on ? type ?" (i.e., disk)
that are booted via MOP or tftp:: if we don't find a block device name
that matches bootdev, give up and let setroot() force RB_ASKNAME.
 1.24 25-May-1997  jonathan Oops, #include <machine/autoconf.h> after previous change.
 1.23 25-May-1997  jonathan Lint: machdep.c calls configure() and makebootdev().
Move their declaratinos to pmax/autoconf.h.
 1.22 24-May-1997  jonathan lint: delete unused variable 'dv'.
 1.21 26-Mar-1997  gwr Move findroot/setroot stuff from configure() to cpu_rootconf().
 1.20 05-Feb-1997  mhitch branches: 1.20.2;
Fix makebootdev() bug when boot device isn't in pmax_nam2blk. When booting
from the network, makebootdev() would attempt to use a NULL pointer and
silently hang.
 1.19 31-Jan-1997  thorpej Use new machine-independent setroot().
 1.18 13-Oct-1996  christos branches: 1.18.2;
backout previous kprintf change
 1.17 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.16 10-Apr-1996  jonathan Fixes for -Wall -Wmissing-prototypes:

Add prototypes to (most of) src/sys/arch/pmax/pmax. (The un-protytyped
parts still have pending merges with the Pica port.)
Fix splx() glitches in pmax/clock.c.
Delete old cpu/fpu identification from pmax/autoconf.c, use r4400/r4600/idt
aware code from Pica port, now in mips/mips/mips_machdep.c.
Delete unused multi-CPU autoconfiguration code; NetBSD/pmax does not
support decsystem 5800s anyway.
 1.15 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.14 28-Dec-1995  thorpej Move the old-style disk instrumentation "structures" to a central location
(sys/kern/subr_disk.c) and note that they should/will be deperecated.
 1.13 13-Sep-1995  jonathan Rename the old pmax SCSI driver's "struct scsi_device" to
"struct pmax_scsi_device", to avoid name conflicts with the sys/dev/scsi
SCSI driver.
 1.12 11-Sep-1995  jonathan Rename the old 4.4bsd/pmax old-style config "struct device" to
"struct pmax_device" to avoid conflict with <sys/device.h>.

Move the glue routines for config.old pmax SCSI device probing from
autoconf.c to conf-glue.c.
 1.11 17-Aug-1995  jonathan Remove lint in the intializer of the table used to glue new-config
drivers and the old-config PMAX-specific scsi drivers.
 1.10 10-Aug-1995  jonathan Change DEcstation autoconfiguration to use new-style config.
All devices except SCSI disks and tapes are found using new config only.
SCSI disks and tapes are configured using a table edited from an ioconf.c
produced by config.old.

Boots multi-user on PMAX, 3MAX and 3MAXPLUS. The old-style "slot hand fill"
functions for those machines, and the old TurboChannel configuration
main loop, have been removed.

Since new-style config runs later in boot than the old pmax turbochannel
probing, we no longer know what devices will be configured when consinit()
is called. Use PROM output until autoconfig is finished.
 1.9 04-Aug-1995  jonathan Restructure configure(): move turbochannel-device configuration
into a separate function for readability. Rework interrupt initialization,
so interrupts are never enabled until configuration has found and
attached all devices. Call spl0() just before probing the scsi bus,
as the DECstation scsi code can't poll, and hangs if interrupts
are disabled.

Add preliminary support for new config, protected by #ifdef NEWCONF/#endif.

Cosmetic changes to swapconf() and setroot() to reduce distance
from Alpha versions of same.
 1.8 02-Aug-1995  jonathan Only print diagnostic messages about interrupt enable when DIAGNOSTIC
is defined.
 1.7 04-May-1995  jonathan Fix long-standing bug in NetBSD/pmax interrupt initalization on
Turbochannel machines with an IOASIC.

After an interrupt is taken, the IOASIC interrupt enable mask is
and'ed with the kernel's interrupt-mask variable. This masks
off any interrupts that were enabled after the hardware interrupt-enable
mask was set. Due to this bug all iynterrupts must be enabled before
the first interrupt is taken. (Interrupts enabled later aren't on in the
ioasic intr-mask register, so they aren't on in (sirm & kernelmask),
which is what used to get written back to the ioasic interrupt-mask
register. Fixed, and tested on on 3MAX+ but not xine/3min.

If this patch perchance breaks on Xines or 3mins, the old code can be
re-enabled by changing the #if 0 in machdep.c to #if 1.
 1.6 18-Jan-1995  mellon Add definition for tc_enable_interrupt for future reference
 1.5 24-Nov-1994  dean more patches from Jonathan Stone
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.18.2.2 22-Jan-1997  mhitch Clean up Jason's setroot() changes; a few typos here and there, and a fix
to makebootdev() due to the major device number being an entry in the
pmax_nam2blk table instead of the index to the previous devname table.
The GENERIC kernel can now be compiled and booted.
 1.18.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.20.2.1 02-Mar-1997  mrg swapconf() is no more.
 1.25.8.1 09-Nov-1997  mellon Pull rev 1.26 up from trunk (jonathan)
 1.31.4.9 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.31.4.8 03-Feb-2000  nisimura consinit() is now defined in machdep.c
 1.31.4.7 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.31.4.6 26-Oct-1999  nisimura Catchup to changes in main trunk. Remove debug message which is now
harmful due to SCSI device probe change. Enable WSSCREEN_REVERSE for
pm.c
 1.31.4.5 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.31.4.4 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.31.4.3 26-Apr-1999  nisimura - Arrange interrupt handler vectors initialized inside configure().
- Sweep jobs in machdep.c, and other model dependent files.
 1.31.4.2 06-Mar-1999  drochner sync with trunk rev. 1.32: add md
 1.31.4.1 15-Oct-1998  nisimura - NWSCONS cnattach() hooks at platform.cons_init for various DECstations.
- iplmask[] accumulation in autoconf.c.
- codes to identify booting disk looking at ULTRIX rz name.
- MI SCSI entries at cdevsw[]/bdevsw[].
- revised readdisklabel() with ULTRIX disklabel support.
 1.32.6.1 21-Jun-1999  thorpej Sync w/ -current.
 1.41.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.41.2.4 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.41.2.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.41.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.41.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.53.4.3 25-Jan-2001  jhawk Pull up revision 1.57 via patch (requested by simonb):
Adjust recent netboot fix to work on the 5100 as well.
 1.53.4.2 29-Nov-2000  tv Pullup 1.55 [ad]:
Fix netbooting on the 2100/3100. Partially from Thilo Manske
<Thilo.Manske@HEH.Uni-Oldenburg.DE> in PR 11212.
 1.53.4.1 26-Jul-2000  ad Pull up revision 1.54, approved by releng:
Allow probe for SCSI tape drives even if no SCSI disk drives are
configured.
 1.57.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.58.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.58.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.58.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.61.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.61.6.1 27-Aug-2001  nathanw file autoconf.c was added on branch nathanw_sa on 2002-10-18 02:39:27 +0000
 1.64.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.64.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.64.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.64.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.64.2.1 03-Aug-2004  skrll Sync with HEAD
 1.67.2.2 07-Dec-2007  yamt sync with head
 1.67.2.1 21-Jun-2006  yamt sync with head.
 1.68.6.1 22-Apr-2006  simonb Sync with head.
 1.68.4.1 09-Sep-2006  rpaulo sync with head
 1.68.2.1 01-Mar-2006  yamt sync with head.
 1.70.50.1 08-Dec-2007  mjf Sync with HEAD.
 1.70.44.1 09-Jan-2008  matt sync with HEAD
 1.70.42.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.70.24.1 15-Jul-2007  ad Get pmax working.
 1.71.36.1 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.71.32.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.71.26.1 28-Apr-2009  skrll Sync with HEAD.
 1.71.18.2 19-Aug-2009  yamt sync with head.
 1.71.18.1 04-May-2009  yamt sync with head.
 1.74.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.74.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.74.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.74.4.2 21-Apr-2011  rmind sync with head
 1.74.4.1 05-Mar-2011  rmind sync with head
 1.78.8.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.78.2.1 30-Oct-2012  yamt sync with head
 1.79.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5 05-Dec-2021  msaitoh s/invlid/invalid/ in comment.
 1.4 07-Feb-2019  mrg #if 0 the same code as already done
 1.3 16-Jul-2017  christos branches: 1.3.2; 1.3.4; 1.3.8;
fix printf formats.
 1.2 18-May-2017  christos Fix debug (make it compile)
 1.1 16-Nov-2016  macallan branches: 1.1.2; 1.1.4; 1.1.10;
switch to common MIPS bus_space and bus_dma
tested by flxd@
 1.1.10.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.1.4.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.4.1 16-Nov-2016  pgoyette file bus.c was added on branch pgoyette-localcount on 2017-01-07 08:56:23 +0000
 1.1.2.3 28-Aug-2017  skrll Sync with HEAD
 1.1.2.2 05-Dec-2016  skrll Sync with HEAD
 1.1.2.1 16-Nov-2016  skrll file bus.c was added on branch nick-nhusb on 2016-12-05 10:54:56 +0000
 1.3.8.1 10-Jun-2019  christos Sync with HEAD
 1.3.4.2 03-Dec-2017  jdolecek update from HEAD
 1.3.4.1 16-Jul-2017  jdolecek file bus.c was added on branch tls-maxphys on 2017-12-03 11:36:35 +0000
 1.3.2.2 16-Jul-2017  christos 2202773
 1.3.2.1 16-Jul-2017  christos file bus.c was added on branch perseant-stdc-iso10646 on 2017-07-16 17:35:21 +0000
 1.64 26-Jul-2022  andvar s/functin/function/ in copy pasted comment.
 1.63 22-Jan-2022  skrll Ensure bus_dmatag_subregion is called with an inclusive max_addr
everywhere.
 1.62 22-Jan-2022  skrll Trailing whitespace
 1.61 05-Dec-2021  msaitoh s/invlid/invalid/ in comment.
 1.60 21-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.59 18-May-2017  christos branches: 1.59.22;
Fix debug (make it compile)
 1.58 11-Jun-2015  matt branches: 1.58.8;
Add struct pmap_limits and pm_{min,max}addr from uvm/pmap/map.h and use it to
store avail_start, avail_end, virtual_start, and virtual_end.
Remove iospace and let emips just bump pmap_limits.virtual_start to get the
VA space it needs.
pmap_segtab.c is almost identical to uvm/pmap/pmap_segtab.c now. It won't
be long until we switch to the uvm/pmap one.
 1.57 02-Oct-2012  christos branches: 1.57.14;
move common/bus_dma/ -> dev/bus_dma/
 1.56 09-Jul-2011  matt branches: 1.56.2; 1.56.12;
Cleanu <machine/*> includes
 1.55 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.54 14-Dec-2009  matt branches: 1.54.4; 1.54.6; 1.54.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.53 21-Aug-2009  thorpej Use bus_dmamem_common.
 1.52 20-Jul-2009  tsutsui KNF, ANSIfy, and misc cosmetics.
 1.51 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.50 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.49 04-Jun-2008  ad branches: 1.49.6; 1.49.12; 1.49.16;
vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both.
 1.48 28-Apr-2008  martin branches: 1.48.2;
Remove clause 3 and 4 from TNF licenses
 1.47 04-Mar-2007  christos branches: 1.47.40; 1.47.42; 1.47.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.46 16-Apr-2006  tsutsui branches: 1.46.14;
Mising -> Mixing
 1.45 01-Mar-2006  yamt branches: 1.45.2; 1.45.4; 1.45.6;
merge yamt-uio_vmspace branch.

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

we have too many copies!
 1.42 01-Apr-2005  yamt branches: 1.42.2; 1.42.8;
merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.41 09-Mar-2005  matt Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create). dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
 1.40 28-Nov-2004  thorpej branches: 1.40.4; 1.40.6;
bus_dmamap_load_mbuf(): Skip zero-length mbufs.
kern/24811
 1.39 16-Sep-2004  rumble Correct a few comment typos that have propagated through the
tree.
 1.38 15-Jul-2003  lukem __KERNEL_RCSID()
 1.37 29-Jun-2003  fvdl branches: 1.37.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.36 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.35 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.34 02-Jun-2002  drochner move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
 1.33 14-Nov-2001  thorpej branches: 1.33.2; 1.33.12;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.32 28-Sep-2001  chs branches: 1.32.2;
don't depend on other headers to include sys/proc.h for us.
 1.31 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.30 07-Jul-2001  simonb branches: 1.30.2; 1.30.4;
b{cmp,copy,zero} -> mem{cmp,cpy,set}
Also remove some unnecessary argument casts.
 1.29 26-May-2001  chs replace vm_page_t with struct vm_page *.
 1.28 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.27 21-Mar-2001  soren s/vm_page_alloc_memory/uvm_pglistalloc/ in panic message.
 1.26 04-Oct-2000  nisimura branches: 1.26.2;
Redo the previous change to save MIPS1 only configuration. It's
uncertain whether a multiple page flush with a single HitFlush()
call is safe.
 1.25 02-Oct-2000  nisimura - Hide MachHitFlushDCache() symbol by enclosing #ifdef MIPS3 to make
compilable with MIPS1 only configuration.
- MIPS3 virtually addressed cache op can do its work in a single call for
range of address space.
 1.24 28-Sep-2000  mhitch Need to use MachHitFlushDCache() for the MIPS3 to ensure invalidating
both the primary and the secondary caches. MachFlushDCache() will not
invalidate the correct secondary cache lines for KSEG2 addresses.
R4000 systems should now be able to boot and run.
 1.23 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.22 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.21 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.20 10-Jan-2000  simonb branches: 1.20.4;
Remove unneeded include files (up to 16 in two files!).
 1.19 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.18 08-Jan-2000  simonb Function prototype cleanup.
 1.17 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.16 12-Sep-1999  chs branches: 1.16.2; 1.16.4; 1.16.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.15 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.14 25-May-1999  thorpej bus_dmamem_map() maps DMA safe memory, which is usually one or more
managed pages, into KVA space. Since the pages are managed, we should
use pmap_enter(), not pmap_kenter_pa().

Also, when entering the mappings, enter with an access_type of
VM_PROT_READ | VM_PROT_WRITE. We do this for a couple of reasons:

(1) On systems that have H/W mod/ref attributes, the hardware
may not be able to track mod/ref done by a bus master.

(2) On systems that have to do mod/ref emulation, this prevents
a mod/ref page fault from potentially happening while in an
interrupt context, which can be problematic.

This latter change is fairly important if we ever want to be able to
transfer DMA-safe memory pages to anonymous memory objects; we will need
to know that the pages are modified, or else data could be lost!

Note that while the pages are unowned (i.e. "just DMA-safe memory pages"),
they won't consume any swap resources, as the mappings are wired, and
the pages aren't on the active or inactive queues.
 1.13 26-Mar-1999  mycroft branches: 1.13.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.12 25-Mar-1999  simonb Remove trailing whitespace.
 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 06-Jan-1999  nisimura - Complete vm_offset_t purge for DECstation.
 1.9 21-Sep-1998  thorpej branches: 1.9.2;
Make bus_dmamap_load_uio() work, from Kevin Lahey <kml@nas.nasa.gov>.
 1.8 17-Jul-1998  thorpej Implement bus_dmamap_load_uio().
 1.7 03-Jun-1998  thorpej Adjust bus_dmamap_sync() for the R4000; in that case, use the stashed
virtual address for the segment, rather than the physical address, and
adjust the cache call appropriately.
 1.6 03-Jun-1998  thorpej Fill in the virtual address of each DMA segment as we load the map.
 1.5 03-Jun-1998  thorpej Sync w/ i386 port.
 1.4 27-May-1998  thorpej Ouch, key debugging printfs off BUS_DMA_DEBUG, not DEBUG ... noisy!
 1.3 27-May-1998  matt A few fixes to make it really work.
 1.2 26-May-1998  thorpej Rewrite at least the R{2,3}000 case for bus_dmamap_sync(), in hopes of
making performance of bus_dma drivers not completely suck on the DECstation.

XXX R4000 case is still abysmal, because some other data structure
modification is required to deal with the virtually-indexed R4000 cache.
 1.1 22-May-1998  thorpej Complete from-scratch rewrite of the DECstation bus.h, brining it
up-to-date with the current API, and implementing preliminary
support for bus_dma.
 1.9.2.7 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.9.2.6 26-Oct-1999  nisimura Sync. w/ main trunk.
 1.9.2.5 09-Aug-1999  drochner sync to head rev. 1.15 (pmap_extract() interface change)
 1.9.2.4 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.9.2.3 29-Mar-1999  drochner sync with trunk revs 1.11 (UVM removal) and 1.13 (pmap_enter arg change)
 1.9.2.2 16-Nov-1998  nisimura - Replace vm_offset_t with vaddr_t/paddr_t.
Note that NetBSD/newsmips has purged vm_offset_t too. Main trunk mips/
and pmax/ directories is left untouched.
 1.9.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.13.4.2 02-Aug-1999  thorpej Update from trunk.
 1.13.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.16.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.16.4.1 15-Nov-1999  fvdl Sync with -current
 1.16.2.2 27-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.20.4.3 13-Nov-2000  tv Pullup 1.25 and 1.26 [tsutsui]:
Add some #ifdef MIPS3's to allow compiling a MIPS1 only configuration.
 1.20.4.2 30-Sep-2000  mhitch Pull up rev 1.24 [approved by thorpej].

Need to use MachHitFlushDCache() for the MIPS3 to ensure invalidating
both the primary and the secondary caches. MachFlushDCache() will not
invalidate the correct secondary cache lines for KSEG2 addresses.
R4000 systems should now be able to boot and run.
 1.20.4.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.26.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.26.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.30.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.30.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.30.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.30.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.32.2.4 13-Nov-2001  thorpej Fix typo in comment.
 1.32.2.3 13-Nov-2001  thorpej For the virtually-indexed write-back cache dmamap_sync:

Note that we can only use Inv on PREREAD if the buffer
start/end are cacheline-aligned. If they're not, we
need to use WB_Inv, otherwise we can end up trashing
someone else's data.

XXX For now, simply use WB_Inv for the PREREAD case
always. I will make some other changes later that
will enable the dmamap_sync routine to easily determine
if it's safe to use Inv.

Many thanks to Michael Hitch for tracking this down.
 1.32.2.2 12-Nov-2001  nisimura Pass KSEG0 address to R3000-style cacheops.
 1.32.2.1 24-Oct-2001  thorpej Update for the new cache code. There are now two optimized
bus_dmamap_sync routines: one for a physically-indexed write-through
cache, and one for a virtually-indexed write-back cache.
 1.33.12.1 15-Jul-2002  gehenna catch up with -current.
 1.33.2.6 03-Jul-2002  nathanw Whitespace.
 1.33.2.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.33.2.4 20-Jun-2002  nathanw Catch up to -current.
 1.33.2.3 08-Jan-2002  nathanw Catch up to -current.
 1.33.2.2 15-Dec-2001  gmcgarry lwp'ify
 1.33.2.1 14-Nov-2001  gmcgarry file bus_dma.c was added on branch nathanw_sa on 2001-12-15 07:11:00 +0000
 1.37.2.8 11-Dec-2005  christos Sync with head.
 1.37.2.7 01-Apr-2005  skrll Sync with HEAD.
 1.37.2.6 19-Feb-2005  skrll Don't deref a NULL struct lwp *. This shouldn't happen, but...
 1.37.2.5 18-Dec-2004  skrll Sync with HEAD.
 1.37.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.37.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.37.2.2 03-Aug-2004  skrll Sync with HEAD
 1.37.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.40.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.40.6.1 26-Jan-2005  yamt convert arch/pmax to new apis.
 1.40.4.1 29-Apr-2005  kent sync with -current
 1.42.8.1 29-Nov-2005  yamt sync with head.
 1.42.2.2 03-Sep-2007  yamt sync with head.
 1.42.2.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.2 19-Feb-2006  yamt fix a typo.
 1.44.2.1 18-Feb-2006  yamt adapt the rest of MD code.
 1.45.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.45.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.45.2.1 24-May-2006  yamt sync with head.
 1.46.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.47.44.5 11-Mar-2010  yamt sync with head
 1.47.44.4 16-Sep-2009  yamt sync with head
 1.47.44.3 19-Aug-2009  yamt sync with head.
 1.47.44.2 04-May-2009  yamt sync with head.
 1.47.44.1 16-May-2008  yamt sync with head.
 1.47.42.2 17-Jun-2008  yamt sync with head.
 1.47.42.1 18-May-2008  yamt sync with head.
 1.47.40.2 05-Jun-2008  mjf Sync with HEAD.

Also fix build.
 1.47.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.48.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.49.16.3 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.49.16.2 01-Feb-2010  matt Update to reflect mips tree changes.
 1.49.16.1 26-Aug-2009  matt Fixup (all but mipsco) to deal the new realities in mipsland.
 1.49.12.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.49.6.1 28-Apr-2009  skrll Sync with HEAD.
 1.54.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.54.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.54.4.1 05-Mar-2011  rmind sync with head
 1.56.12.2 03-Dec-2017  jdolecek update from HEAD
 1.56.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.56.2.1 30-Oct-2012  yamt sync with head
 1.57.14.2 28-Aug-2017  skrll Sync with HEAD
 1.57.14.1 22-Sep-2015  skrll Sync with HEAD
 1.58.8.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.59.22.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.8 09-Jul-2011  matt Cleanu <machine/*> includes
 1.7 20-Jul-2009  tsutsui KNF, ANSIfy, and misc cosmetics.
 1.6 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.5 28-Apr-2008  martin branches: 1.5.8; 1.5.14;
Remove clause 3 and 4 from TNF licenses
 1.4 11-Dec-2005  christos branches: 1.4.74; 1.4.76; 1.4.78;
merge ktrace-lwp.
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 10-Jan-2000  simonb branches: 1.2.30;
Remove unneeded include files (up to 16 in two files!).
 1.1 22-May-1998  thorpej branches: 1.1.4; 1.1.16;
Complete from-scratch rewrite of the DECstation bus.h, brining it
up-to-date with the current API, and implementing preliminary
support for bus_dma.
 1.1.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.1.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.2.30.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.30.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.30.1 03-Aug-2004  skrll Sync with HEAD
 1.4.78.3 19-Aug-2009  yamt sync with head.
 1.4.78.2 04-May-2009  yamt sync with head.
 1.4.78.1 16-May-2008  yamt sync with head.
 1.4.76.1 18-May-2008  yamt sync with head.
 1.4.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.40 09-Jul-2011  matt Cleanu <machine/*> includes
 1.39 04-Jun-2011  tsutsui Split device_t/softc. Tested on GXemul.
 1.38 08-Feb-2011  rmind branches: 1.38.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.37 18-Mar-2009  cegger branches: 1.37.4; 1.37.6; 1.37.8;
Ansify function definitions w/o arguments. Generated with sed.
 1.36 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.35 03-Jan-2008  joerg branches: 1.35.10; 1.35.18; 1.35.24;
Timecounter and generic todr support for pmax. From Garret D'Amore.
 1.34 11-Dec-2005  christos branches: 1.34.50; 1.34.56; 1.34.64;
merge ktrace-lwp.
 1.33 07-Aug-2003  agc branches: 1.33.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.32 23-Nov-2001  simonb branches: 1.32.18;
Remove hardcoded values for HZ (under different names!) from mcclock.c
and clock_machdep.h, so that now HZ can be any supported frequency of
the mc146818a/ds1287a RTCs.
Tested at 256Hz and 2048Hz.
 1.31 04-Jun-2000  cgd branches: 1.31.6; 1.31.10;
Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.30 10-Jan-2000  simonb branches: 1.30.2;
Remove unneeded include files (up to 16 in two files!).
 1.29 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.28 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.27 25-Aug-1999  simonb branches: 1.27.2; 1.27.8;
Remove ifdef'd alpha call to set_clockintr() - the pmax and alpha clock.c
have diverged, and set_clockintr() doesn't exist on the alpha anymore!
 1.26 25-Mar-1999  simonb Remove trailing whitespace.
 1.25 26-Sep-1998  drochner branches: 1.25.2;
Use the RTC chip as time-of-year clock, as the PROM console and Ultrix do.
 1.24 29-Aug-1998  mrg remove unnecessary "extern int tickadj" (was also causing egcs warning)
 1.23 22-Apr-1998  jonathan defopt NTP and PPS_SYNC, in preparation for adding PPS support.
 1.22 01-Sep-1997  jonathan Set fixtick to (1000000 % hz) when NTP is configured.
 1.21 22-Jul-1997  jonathan branches: 1.21.2;
Include /sys/dev/dec/clockvar.h. Garbage-collect tc/clockvar.h.
 1.20 22-Jun-1997  jonathan Import mcclock from NetBSD/Alpha, mostly replacing the Sprite clock code.
interface. From Toru Nishimura <nisimura@itc.aist-nara.ac.jp>.

Partly merged back with Alpha code by Jonathan Stone. Needs more merging.
 1.19 22-Jun-1997  jonathan * Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).
 1.18 22-Jun-1997  jonathan Bump PROM-to-RTC offset hack up by one more year.
 1.17 16-Jun-1997  jonathan Remove the machConst.h (wrapper for Sprite-derived source), and all
#includes <machine/machConst.h> uses.
Other header files now include <mips/cpuregs.h> where necessary.
 1.16 15-Jun-1997  mhitch DECstation MIPS3 support: wbflush() is cpu-dependent, need declaration from
machine/locore.h.
 1.15 13-Oct-1996  christos backout previous kprintf change
 1.14 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.13 29-May-1996  mhitch Fix autoconfig stuff to more closely match the alpha. The DS3100 will now
configure properly. Also fix devices with TurboChannel and mainbus
attachments so they will work if no TurboChannel was configured.
Fix clock.c for a missing variable if not including NTP support.
Also remove some extraneous includes files or use the right ones.
 1.12 10-Apr-1996  jonathan branches: 1.12.4;
Fixes for -Wall -Wmissing-prototypes:

Add prototypes to (most of) src/sys/arch/pmax/pmax. (The un-protytyped
parts still have pending merges with the Pica port.)
Fix splx() glitches in pmax/clock.c.
Delete old cpu/fpu identification from pmax/autoconf.c, use r4400/r4600/idt
aware code from Pica port, now in mips/mips/mips_machdep.c.
Delete unused multi-CPU autoconfiguration code; NetBSD/pmax does not
support decsystem 5800s anyway.
 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 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.9 07-Jan-1996  jonathan Update a kludge from 4.4bsd/pmax: DECstation PROMs force the clock to
be in 1972 or 1973. If the clock is set to the actual time, the PROM
appears to reset the chip date to 1972 at each reboot.

Change the "year offset" from 22 years to 24 years (good till 1997)
until this code is replaced with something that uses the chip as a
seconds-since-beginning-of-year clock (encoded as a date, relative to
1972-01-01 00:00:00).
 1.8 10-Aug-1995  jonathan clockattach() wasn't printing a newline; add it.
 1.7 10-Aug-1995  jonathan Change DEcstation autoconfiguration to use new-style config.
All devices except SCSI disks and tapes are found using new config only.
SCSI disks and tapes are configured using a table edited from an ioconf.c
produced by config.old.

Boots multi-user on PMAX, 3MAX and 3MAXPLUS. The old-style "slot hand fill"
functions for those machines, and the old TurboChannel configuration
main loop, have been removed.

Since new-style config runs later in boot than the old pmax turbochannel
probing, we no longer know what devices will be configured when consinit()
is called. Use PROM output until autoconfig is finished.
 1.6 18-Jan-1995  mellon Update clock initialization/updating for interoperability with Ultrix (still some problems with this, though
 1.5 24-Nov-1994  dean more patches from Jonathan Stone
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.12.4.1 30-May-1996  mhitch Pulled autoconfig fixes up from the trunk
 1.21.2.1 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.25.2.3 29-Mar-1999  nisimura - Catch up to recent changes in main trunk.
- Reorganize various #include's.
- Yield memcpy to Mach derivated one.
- pm_cnattach() now checks the existense of framebuffer card.
 1.25.2.2 19-Oct-1998  drochner use rev. 1.25 from main tree (was there before the branch was created)
 1.25.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.27.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.30.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.31.10.1 08-Jan-2002  nathanw Catch up to -current.
 1.31.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.32.18.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.32.18.2 18-Sep-2004  skrll Sync with HEAD.
 1.32.18.1 03-Aug-2004  skrll Sync with HEAD
 1.33.16.1 21-Jan-2008  yamt sync with head
 1.34.64.1 08-Jan-2008  bouyer Sync with HEAD
 1.34.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.34.50.1 09-Jan-2008  matt sync with HEAD
 1.35.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.35.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.35.10.1 04-May-2009  yamt sync with head.
 1.37.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.37.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.37.4.2 12-Jun-2011  rmind sync with head
 1.37.4.1 05-Mar-2011  rmind sync with head
 1.38.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.5 03-Dec-1999  nisimura Remove a now defunct file. Most of the contents were already displaced
by others.
 1.4 26-Oct-1994  cgd branches: 1.4.22; 1.4.34; 1.4.40;
new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.4.40.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.4.34.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.4.22.2 06-Dec-1999  nisimura Remove obsoluted files in this branch.
 1.4.22.1 30-Mar-1999  nisimura - Track changes in main trunk and sweap codes.
- Make codes a bit descriptive that registers are aligned in 32bit boundary.
 1.24 26-Aug-2001  simonb Switch to MI SCSI and drop old pmax MD SCSI support completely.
 1.23 10-Jan-2000  simonb branches: 1.23.8;
Remove unneeded include files (up to 16 in two files!).
 1.22 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.21 08-Jan-2000  simonb Function prototype cleanup.
 1.20 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.19 24-Apr-1999  simonb branches: 1.19.2; 1.19.8;
Nuke register and remove trailling white space.
 1.18 22-Mar-1999  mrg branches: 1.18.4;
KNF nits.
 1.17 08-May-1998  simonb branches: 1.17.4;
- Allow all valid SCSI id's to work on the SII and first two ASC
controllers (including SCSI id 7 on the 2100/3100).
- On the pmax (2100,3100) set the host SCSI id to 6.
- Move disk and tape config for the second ASC controller from the GENERIC
config file to scsi.pmax so all configurations can use the second
controller.
 1.16 12-Jan-1998  thorpej Update for changes to config.
 1.15 28-Jul-1997  mhitch branches: 1.15.6;
Add disk and tape devices for a second ASC controller.
 1.14 21-Jul-1997  jonathan Kill __BROKEN_INDIRECT_CONFIG on pmax.
Based on a patch from Chris G. Demetriou, December 1996.
 1.13 24-May-1997  jonathan lint: add missing %d (unit number of unconfigurable device) to panic msg.
 1.12 13-Oct-1996  christos backout previous kprintf change
 1.11 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.10 01-Oct-1996  jonathan Delete old dkstat index (sd_dk) from old pmax scsi-driver struct, and delete
the last references to it from the old/new config glue in pmax/conf-glue.c.
 1.9 16-Sep-1996  jonathan * add RCS id.
* Allow configuring disks without tapes, or tapes without disks,
as suggested in PR 2743.
 1.8 10-Apr-1996  jonathan Fixes for -Wall -Wmissing-prototypes:

Add prototypes to (most of) src/sys/arch/pmax/pmax. (The un-protytyped
parts still have pending merges with the Pica port.)
Fix splx() glitches in pmax/clock.c.
Delete old cpu/fpu identification from pmax/autoconf.c, use r4400/r4600/idt
aware code from Pica port, now in mips/mips/mips_machdep.c.
Delete unused multi-CPU autoconfiguration code; NetBSD/pmax does not
support decsystem 5800s anyway.
 1.7 17-Mar-1996  jonathan Additional fixes to complete the NetBSD/1.1B config changes:

update the old-config to new-config glue used with the 4.4bsd/pmax
SCSI drivers to use new device attach declarations and names for
the "oldscsibus", "tz" and "rz" drivers.
 1.6 06-Feb-1996  jonathan Support kernels configured without an ASC (e.g, 3100-only configs) or
without an SII (e.g., TURBOChannel-only configs). Only the same old,
static, set of old-config devices and old pmax rz/tz drivers is
supported.
 1.5 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.4 28-Dec-1995  thorpej Move the old-style disk instrumentation "structures" to a central location
(sys/kern/subr_disk.c) and note that they should/will be deperecated.
 1.3 13-Sep-1995  jonathan Rename the old pmax SCSI driver's "struct scsi_device" to
"struct pmax_scsi_device", to avoid name conflicts with the sys/dev/scsi
SCSI driver.
 1.2 11-Sep-1995  jonathan Rename the old 4.4bsd/pmax old-style config "struct device" to
"struct pmax_device" to avoid conflict with <sys/device.h>.

Move the glue routines for config.old pmax SCSI device probing from
autoconf.c to conf-glue.c.
 1.1 10-Aug-1995  jonathan Change DEcstation autoconfiguration to use new-style config.
All devices except SCSI disks and tapes are found using new config only.
SCSI disks and tapes are configured using a table edited from an ioconf.c
produced by config.old.

Boots multi-user on PMAX, 3MAX and 3MAXPLUS. The old-style "slot hand fill"
functions for those machines, and the old TurboChannel configuration
main loop, have been removed.

Since new-style config runs later in boot than the old pmax turbochannel
probing, we no longer know what devices will be configured when consinit()
is called. Use PROM output until autoconfig is finished.
 1.15.6.1 08-May-1998  mycroft Pull up 1.17, per request of simonb.
 1.17.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.18.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.19.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.19.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.23.8.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.48 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.47 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.46 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.45 17-Jun-2002  christos MD systrace gluons.
 1.44 24-Feb-2002  ad branches: 1.44.6; 1.44.10;
Reserve majors 101 and 102 for wsmux and wsfont.
 1.43 12-Jan-2002  manu Added clockctl
 1.42 26-Aug-2001  simonb branches: 1.42.6;
Switch to MI SCSI and drop old pmax MD SCSI support completely.
 1.41 26-Mar-2001  lukem branches: 1.41.2;
- add dev_noimpl(xxx,yyy) macro to replace "(dev_type_xxx((*))) yyy",
and use appropriately

- create more helper macros:
. cdev__xyz_init(c,n), such as cdev__ocri_init() for
/* open, close, read, ioctl */, etc.
. cdev__xRy_init(c,n), where nullop is used instead of enodev to dummy out
method `R' and the comments now read /* xxx (read) yyy */ instead
. cdev__xyz_t_init(c,n,t) - as per cdev__xyz_init, but sets d_type = t
as well

- use seltrue instead of dev_noimpl(poll,*), as (IIRC) cdevsw.d_poll should
always DTRT WRT returning a valid result. (a few devices previously
incorrectly returned ENODEV)

- use dev_noimpl(stop,enodev) instead of dev_noimpl(stop,nullop) if tty
== 0, because it doesn't matter if dev_type_stop isn't implemented in that
case, and it allows the use of the cdev__xyz_init macros. certain ports
(sparc,sparc64,x68k) used the nullop method for dev_type_stop in a few
drivers, whereas everything else uses enodev

- ensure that the comments are accurate WRT the behaviour of a given entry
 1.40 11-Feb-2001  tsutsui branches: 1.40.2;
Add a missing colon in comment.
 1.39 02-May-2000  augustss Add am7930 audio driver.
 1.38 19-Feb-2000  nisimura Introduce MI SCSI codes; for DECstation 5000s only this moment and
disabled by default.
 1.37 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.36 16-Nov-1999  nisimura Resolve 3max IOASIC disguise; round #2.
 1.35 15-Nov-1999  simonb Move px cdev_decl up with other frame-buffer type thingies.
 1.34 24-Oct-1999  ad Add missing entry in chrtoblktbl[].
 1.33 26-Apr-1999  ad branches: 1.33.2; 1.33.4; 1.33.6;
Add cdev declaration for `px', major 98.
 1.32 25-Mar-1999  simonb branches: 1.32.4;
Remove trailing whitespace.
 1.31 17-Nov-1998  jonathan Add md (memory disk) hooks for pmax. ecoff kernel with 2MB ramdisk
tftp-boots on new PROMs. (3MB is too large).
 1.30 13-Nov-1998  oster Updating of bdev's and cdev's to support RAIDframe.
 1.29 10-Oct-1998  thorpej branches: 1.29.2;
Add scsibus entry points to the cdevsw[].
 1.28 03-Sep-1998  nisimura cdevsw[] and chrtoblktbl[] arrays were not in sync. Add missing the
two entries in chrtoblktbl[] as pointed out by Greg Oster PR#5715.
 1.27 24-Mar-1998  jonathan Fix off-by-one botch in cdevsw entries which broke ipf, tun.
Rearrange to match existing MAKEDEV entries. Add lkm back in.
 1.26 13-Oct-1997  explorer branches: 1.26.2;
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.25 24-May-1997  jonathan branches: 1.25.4;
Add 'needs-flag' to pmax, 3max dc (DZ-11 clone) front-ends (dc_ds, dc_ioasic
respectively), so console setup code can test forconfiguration of the
correct front-end (via NDC_DC and NDC_IOASIC, respectively).

Delete 'needs-flags' from dc.c. GC obsolete uses of NDC, "dc.h".
 1.24 24-May-1997  jonathan Add declarations and cdevsw/bdevsw entries for cd, ccd, ss, uk, tun.
 1.23 07-Sep-1996  mycroft Implement poll(2).
 1.22 05-Sep-1996  mycroft Remove duplicate declarations of LKM functions and macros.
 1.21 14-Mar-1996  christos branches: 1.21.4;
fdopen -> filedescopen
 1.20 05-Oct-1995  jonathan Change the pmax framebuffer driver to reflect the rcons changes as negotiated
with pk:
Use dev/rcons/files.rcons in the pmax config file.
Use "rasterconsole" as the tag in pmax/conf, and modify the pmax
framebuffer pseudo-device drivers (fb and rcons) to us rasterconsole.h and
RASTERCONSOLE for compile-time configuration of the rcons pseudo-device.
Modify the pmax rcons pseudo-device driver to initialize a little-endian,
QVSS-compatible font (set its ascent, and set the rconsole structure to
point to that font) before calling rcons_connect().

Tested on a cfb. The ascent may be wrong (or at least, not be aligned with
the hw cursor sprite) on a 3100.
 1.19 18-Sep-1995  jonathan Add cdevsw and bdevsw entries for the machine-independent sd and st drivers.
Add cdevsw and bdevsw entries for the old-pmax tz SCSI tape driver, and
add a do-nothing definition of the requisite tzdump().
 1.18 12-Sep-1995  jonathan Remove the old cdevsw entries for cfb, mfb, xcfb and pm framebuffers.
Add an entry for the generic framebuffer "fb" pseudo-device, which
should be used instead of the hardware-specific drivers.
 1.17 17-Aug-1995  thorpej Add entries for the ccd.
 1.16 02-Aug-1995  jonathan Commit ghastly change that supports select on framebuffers, since
the pr on that hasn't been closed yet.

Fix broken initialization of swap_dev.
 1.15 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.14 21-Apr-1995  mellon Fix up tty struct changes
 1.13 12-Apr-1995  mellon Fix bogus declaration for mm and chrtoblktbl
 1.12 11-Apr-1995  mellon Add rcons pseudo-device
 1.11 10-Apr-1995  mycroft Update for conf.h.
 1.10 25-Jan-1995  cgd vn -> vnd renaming, for consistency
 1.9 14-Dec-1994  mycroft Remove extra arg to d_open.
 1.8 28-Nov-1994  dean some fixes and Ultrix compat stuff from Jonathan Stone.
 1.7 23-Nov-1994  dean Ultrix compatable device numbers (from Jonathan Stone)
 1.6 14-Nov-1994  dean Prepended underscores
 1.5 14-Nov-1994  christos changed open prototype
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.21.4.1 13-Aug-1996  jonathan Add cdev entry for the lkm control device, and reserve bdevsw and devsw
slots for LKMs.
 1.25.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.26.2.2 24-Oct-1998  cgd Add two missing NODEV entries (93 and 94) in the pmax chrtoblktbl. (fixed
by thorpej on trunk when scsibus cdevsw was added.) (jonathan)
 1.26.2.1 09-May-1998  mycroft Pull up 1.27, per requst of jonathan.
 1.29.2.7 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.29.2.6 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.29.2.5 06-Mar-1999  drochner sync with trunk rev. 1.31: add md
 1.29.2.4 14-Nov-1998  drochner add RAIDframe
 1.29.2.3 16-Oct-1998  nisimura - Restore overkill for ULTRIX pty master/slave devices.
 1.29.2.2 15-Oct-1998  nisimura - Updated as recent changes for MI SCSI.
 1.29.2.1 15-Oct-1998  nisimura - NWSCONS cnattach() hooks at platform.cons_init for various DECstations.
- iplmask[] accumulation in autoconf.c.
- codes to identify booting disk looking at ULTRIX rz name.
- MI SCSI entries at cdevsw[]/bdevsw[].
- revised readdisklabel() with ULTRIX disklabel support.
 1.32.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.33.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.33.4.1 15-Nov-1999  fvdl Sync with -current
 1.33.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.33.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.33.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.40.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.41.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.41.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.41.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.41.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.41.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.42.6.6 11-Nov-2002  nathanw Catch up to -current
 1.42.6.5 17-Sep-2002  nathanw Catch up to -current.
 1.42.6.4 01-Aug-2002  nathanw Catch up to -current.
 1.42.6.3 20-Jun-2002  nathanw Catch up to -current.
 1.42.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.42.6.1 26-Aug-2001  nathanw file conf.c was added on branch nathanw_sa on 2002-02-28 04:11:22 +0000
 1.44.10.3 21-Jul-2002  gehenna catch up with -current.
 1.44.10.2 15-Jul-2002  gehenna catch up with -current.
 1.44.10.1 16-May-2002  gehenna Bye block/character device swicth tables.
 1.44.6.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.10 03-Nov-1997  jonathan Remove long-unused MD pmax console code.
 1.9 02-Sep-1996  mycroft branches: 1.9.14;
tty stop functions really should return void, not int, and certainly not both.
 1.8 10-Apr-1995  mycroft Add dummy cnstop(), more return types.
 1.7 01-Feb-1995  mellon Fix up callv references
 1.6 23-Jan-1995  mellon Undo argument change to cnopen
 1.5 22-Nov-1994  dean catching up with other changes
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.9.14.1 02-Nov-1997  mellon Obsolete (jonathan)
 1.9 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.8 11-Dec-2005  christos branches: 1.8.74; 1.8.76; 1.8.78;
merge ktrace-lwp.
 1.7 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.6 06-Sep-2002  gehenna branches: 1.6.6;
Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.5 11-Sep-1995  jonathan branches: 1.5.22; 1.5.48; 1.5.52; 1.5.60;
Delete the now-unused 4.4bsd/pmax "struct consdev". NetBSD/pmax
now uses the standard NetBSD console driver.
Add definition of RCONSDEV, a potential framebuffer console device major
number.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.5.60.1 19-May-2002  gehenna Remove port-dependent conf.h.
 1.5.52.1 17-Sep-2002  nathanw Catch up to -current.
 1.5.48.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.5.22.1 15-Oct-1998  nisimura - Reflect new internals.
 1.6.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.78.1 16-May-2008  yamt sync with head.
 1.8.76.1 18-May-2008  yamt sync with head.
 1.8.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.32 03-Mar-2022  riastradh mips: Use device_set_private for cpuN on older ports.

Specifically, for those that don't use cpu_attach_common of
mips_subr.c.
 1.31 09-Jul-2011  matt Cleanu <machine/*> includes
 1.30 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.29 20-Jul-2009  tsutsui branches: 1.29.4; 1.29.6; 1.29.8;
- use CFATTACH_DECL_NEW()
- include "ioconf.h" for declaration of struct cfdriver.
 1.28 20-Jul-2009  tsutsui KNF, ANSIfy, and misc cosmetics.
 1.27 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.26 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.25 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.24 11-Dec-2005  christos branches: 1.24.78; 1.24.86; 1.24.92; 1.24.96;
merge ktrace-lwp.
 1.23 15-Jul-2003  lukem __KERNEL_RCSID()
 1.22 02-Oct-2002  thorpej branches: 1.22.6;
Use CFATTACH_DECL().
 1.21 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.20 14-Nov-2001  thorpej branches: 1.20.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.19 24-Aug-2001  simonb branches: 1.19.4;
Fix compile problems for kernels configured for MIPS1 support only.

Patch from Thilo Manske in PR #13703.
 1.18 27-Jun-2001  nisimura branches: 1.18.2;
Do a straight and simple cpu identification in cpu_attach().
 1.17 19-Feb-2000  mycroft Use the prefix printed before cpuattach() is called.
 1.16 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.15 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.14 08-Jan-2000  simonb Function prototype cleanup.
 1.13 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.12 12-Nov-1999  nisimura - Arrange 'platform' struct to have clkread entry, which can interporate
HZ using high resolution timer circuit if available. Merge os_init
into the primary hardware initialization in sysinit[].init.
- Nuke an irrelevant attempt to disable RTC under splhigh condition.
- Make sure IOASIC DECstations accumulate device interrupt mask bits into
certain global variables.
- Have witchcrafts to issue ACK to RTC interrupt.
- Add a missing \n and a minor rearrangement in cpu.c
 1.11 25-Mar-1999  simonb branches: 1.11.8; 1.11.10; 1.11.14;
Remove trailing whitespace.
 1.10 12-Jan-1998  thorpej branches: 1.10.4;
Update for changes to config.
 1.9 21-Jul-1997  jonathan Kill __BROKEN_INDIRECT_CONFIG on pmax.
Based on a patch from Chris G. Demetriou, December 1996.
 1.8 13-Oct-1996  christos backout previous kprintf change
 1.7 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.6 16-Jun-1996  mhitch Fix cpu configuration display - extraneous "\n" was printed.
 1.5 10-Apr-1996  jonathan branches: 1.5.4;
Fixes for -Wall -Wmissing-prototypes:

Add prototypes to (most of) src/sys/arch/pmax/pmax. (The un-protytyped
parts still have pending merges with the Pica port.)
Fix splx() glitches in pmax/clock.c.
Delete old cpu/fpu identification from pmax/autoconf.c, use r4400/r4600/idt
aware code from Pica port, now in mips/mips/mips_machdep.c.
Delete unused multi-CPU autoconfiguration code; NetBSD/pmax does not
support decsystem 5800s anyway.
 1.4 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.3 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.2 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.1 10-Aug-1995  jonathan Change DEcstation autoconfiguration to use new-style config.
All devices except SCSI disks and tapes are found using new config only.
SCSI disks and tapes are configured using a table edited from an ioconf.c
produced by config.old.

Boots multi-user on PMAX, 3MAX and 3MAXPLUS. The old-style "slot hand fill"
functions for those machines, and the old TurboChannel configuration
main loop, have been removed.

Since new-style config runs later in boot than the old pmax turbochannel
probing, we no longer know what devices will be configured when consinit()
is called. Use PROM output until autoconfig is finished.
 1.5.4.1 16-Jun-1996  mhitch Pull up from trunk:
> Fix cpu configuration display - extraneous "\n" was printed.
 1.10.4.4 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.10.4.3 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.10.4.2 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.10.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.11.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.10.1 15-Nov-1999  fvdl Sync with -current
 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.18.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.18.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.18.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.19.4.1 24-Oct-2001  thorpej Update for the new cache code. There are now two optimized
bus_dmamap_sync routines: one for a physically-indexed write-through
cache, and one for a virtually-indexed write-back cache.
 1.20.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.20.2.1 14-Nov-2001  nathanw file cpu.c was added on branch nathanw_sa on 2002-10-18 02:39:27 +0000
 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.96.2 23-Dec-2011  matt Change usage to cpu_identify(self, NULL);
 1.24.96.1 13-Jan-2010  matt Deal with new cpu_identity()
 1.24.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.24.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.24.78.2 19-Aug-2009  yamt sync with head.
 1.24.78.1 04-May-2009  yamt sync with head.
 1.29.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.29.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.29.4.1 05-Mar-2011  rmind sync with head
 1.22 24-Mar-1998  jonathan Move pmax PROM-console I/O callbacks out of pmax/pmax/cpu_cons.c
into pmax/dev/promio.c, with decls in promiovar.h.

Remove obsolete cpu_cons.c and old pmax console-probe code.
 1.21 24-Mar-1998  jonathan Commit snapshot of pmax console rework as basepoint for 1.3.2 pullup:
* Do rcons output properly, using cn_tab->cn_dev which points
at rcons cdevsw entrypoints.

* The pmadx console code was using keyboard (serial) device
(major,minor) for raster consoles with special code in the keyboard
drivers to catch output intended for consoles, pull it off the device
queue, and print them via cnputc().
Ifdef out RCONS_BRAINDAMAGE.

* Other minor cleanup to pmax scc driver.
 1.20 19-Oct-1997  jonathan branches: 1.20.2;
Warn user if we fail over from framebuffer console to serial console
when no supported framebuffer is found.
 1.19 16-Jun-1997  jonathan Remove the machConst.h (wrapper for Sprite-derived source), and all
#includes <machine/machConst.h> uses.
Other header files now include <mips/cpuregs.h> where necessary.
 1.18 15-Jun-1997  mhitch Correct an #endif comment to match the #if comment.
 1.17 24-May-1997  jonathan Add 'needs-flag' to pmax, 3max dc (DZ-11 clone) front-ends (dc_ds, dc_ioasic
respectively), so console setup code can test forconfiguration of the
correct front-end (via NDC_DC and NDC_IOASIC, respectively).

Delete 'needs-flags' from dc.c. GC obsolete uses of NDC, "dc.h".
 1.16 21-May-1997  jonathan Include "rasterconsole.h" to get definition of NRASTERCONSOLE (rcons flag).
Don't try rcons on 3100s with keyboards if rcons isn't configured,
 1.15 15-May-1997  mellon Only compile in rcons tests if rcons pseudo-device was declared
 1.14 13-Oct-1996  christos backout previous kprintf change
 1.13 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.12 25-Sep-1996  jonathan * When configuring a serial console on a machine with a dc serial chip,
use the pre-autoconfig cold serial-console inititialization entry
points from the bus-specific cfattach front-end code.
* Delete post-autoconfig code to switch from PROM output to kernel
driver for machines with dc serial chips.
 1.11 29-May-1996  mhitch Fix autoconfig stuff to more closely match the alpha. The DS3100 will now
configure properly. Also fix devices with TurboChannel and mainbus
attachments so they will work if no TurboChannel was configured.
Fix clock.c for a missing variable if not including NTP support.
Also remove some extraneous includes files or use the right ones.
 1.10 19-May-1996  jonathan branches: 1.10.4;
Delete unecessary #include of "le.h", which doesn't exist anymore.
 1.9 10-Apr-1996  jonathan Fixes for -Wall -Wmissing-prototypes:

Add prototypes to (most of) src/sys/arch/pmax/pmax. (The un-protytyped
parts still have pending merges with the Pica port.)
Fix splx() glitches in pmax/clock.c.
Delete old cpu/fpu identification from pmax/autoconf.c, use r4400/r4600/idt
aware code from Pica port, now in mips/mips/mips_machdep.c.
Delete unused multi-CPU autoconfiguration code; NetBSD/pmax does not
support decsystem 5800s anyway.
 1.8 02-Feb-1996  mycroft Fix #includes.
 1.7 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.6 03-Jan-1996  jonathan arch/pmax/tc -> dev/tc, pass 1:
Eliminate pmax/tc/tc.h. Use dev/tc headers for pmax port. Change pmax TC
autoconfig tables to use structs (mostly) compatible with dev/tc/tcvar.h.
Move TC console search to tc.c.
 1.5 20-Sep-1995  jonathan Remove unecessary references to arch/sparc/rcons/raster.h, and some other lint.
 1.4 20-Sep-1995  jonathan Fix initialization of MAXINE xcfb as console.
 1.3 11-Sep-1995  jonathan Change pmax rcons and low-level serial drivers to support the
old-style pmax polled input for cn_getc(). Needed because the
input side of rcons is not initialized in time for GENERIC kernels
to use it to read a root/swap devicename from /dev/console.

Fix an argument glitch between consinit() and pminit().

Change consinit() to use PROM output for remote consoles, because
the serial drivers aren't yet initializable when consinit() is called.
 1.2 11-Sep-1995  jonathan Change pmax framebuffer drivers to use Ted Lemon's port of the
NetBSD/sparc rcons glass-tty console pseudo-device driver, via
the "fb" generic-framebuffer pseudo-device driver.

Individual framebuffer device drivers are now autoconfig glue,
and initialization code for a set of vdac/ramdac-level methods,
called "fbdriver", that's used by all the pmax device drivers.
All the handlers for user-level requests (open/ioctl/read/write/close)
are moved into the fb pseudo-device driver, which uses the
the "fbdriver" methods to work on any given pmax hardware driver.
Framebuffers supported are: sfb cfb mfb xcfb pm.

Move the qvss (pm) -style mmap()ed device interface, kernel tracking
of mouse button/movement events, and placing mouse/keyboard
events in an mmap()ed ring buffer, out of the framebuffer device
drivers and into separate source files. The fb pseudo-device driver
uses the qvss-compatible interface, since that's what the (R5) X
server uses.
 1.1 11-Apr-1995  mellon Console initialization code
 1.10.4.1 30-May-1996  mhitch Pulled autoconfig fixes up from the trunk
 1.20.2.3 04-Feb-1999  cgd Fix path for relocated sys/arch/pmax/stand include files. Done as a
patch since these files don't exist any longer in -current. (simonb)
 1.20.2.2 24-Nov-1998  cgd patch containing -current's pmax/dev/findcons.c rev 1.8. (jonathan)
 1.20.2.1 24-Nov-1998  cgd pull up rev 1.21 from trunk (jonathan)
 1.5 26-Mar-1996  jonathan Remove src/sys/arch{pmax/pmax,pica/pica}cpu_exec.c; no significant differences,
or for which the Pica port is an older revision of the pmax branch.

A merged version with the NetBSD/pmax revision history is in mips/mips/.
cpu_exec.c
elf.c
mem.c
process_machdep.c
 1.4 25-Apr-1995  mellon Fix a few compat code casualties
 1.3 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.2 10-Apr-1995  mellon Put endif COMPAT_09 inside function definition
 1.1 03-Apr-1995  mellon Move cpu-specific exec support to cpu_exec.c; Support 4.4BSD a.out
 1.54 24-Mar-2014  christos use cpu_{g,s}etmodel
 1.53 13-Oct-2012  tsutsui branches: 1.53.2;
struct device * -> device_t, use device_xname() (from chs@)
 1.52 09-Jul-2011  matt branches: 1.52.2; 1.52.12;
Cleanu <machine/*> includes
 1.51 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.50 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.49 20-Jul-2009  tsutsui branches: 1.49.4; 1.49.6; 1.49.8;
KNF, ANSIfy, and misc cosmetics.
 1.48 20-Jul-2009  tsutsui Sprinkle keyword volatile around device register accesses.
 1.47 16-Mar-2009  dsl ANSIfy functions with function-pointer arguments
 1.46 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.45 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.44 03-Dec-2007  ad branches: 1.44.18; 1.44.26; 1.44.32; 1.44.36;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.43 21-Dec-2006  yamt branches: 1.43.6; 1.43.22; 1.43.24; 1.43.30;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.42 29-Jul-2006  ad branches: 1.42.4; 1.42.6;
Remove RASTERCONSOLE support from the pmax port.
 1.41 24-Dec-2005  perry branches: 1.41.4; 1.41.8;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.40 11-Dec-2005  christos merge ktrace-lwp.
 1.39 11-Jan-2005  simonb branches: 1.39.10;
Switch from intrcnt interrupt account to event counters.
 1.38 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.37 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.36 15-Jul-2003  lukem __KERNEL_RCSID()
 1.35 18-Sep-2001  tsutsui branches: 1.35.4; 1.35.10; 1.35.22;
Initalize -> Initialize
 1.34 27-Aug-2001  nisimura branches: 1.34.2;
Count and record memory error interrupts with evcnt(9).
 1.33 22-Aug-2001  nisimura NetBSD/pmax now has GENERIC_SOFT_INTERRUPTS.
 1.32 12-Apr-2001  thorpej branches: 1.32.2;
splvec.splimp -> splvec.splvm
 1.31 21-Nov-2000  ad branches: 1.31.2;
PMIN vs. PMAX in boot message. Pointed out by Thilo Manske
<Thilo.Manske@HEH.Uni-Oldenburg.DE> in PR 11212.
 1.30 06-Jun-2000  nisimura branches: 1.30.2;
Make sure model specific cpu_intr() routines call _splset() as the last
action.
 1.29 11-Apr-2000  nisimura branches: 1.29.2;
One more line escaped from trap.c rework.
 1.28 11-Apr-2000  nisimura Forgot to remove mips_hardware_intr global variable.
 1.27 11-Apr-2000  nisimura Change to have cpu_intr() peculiar to DECstations; have ssir global
variable and cpu_intr() body in machdep.c. Reorder and rename
model specific interrupt handler arguments. Fixup machine/intr.h and
machine/cpu.h appropriately.
 1.26 06-Mar-2000  mhitch A common device_register() is used instead of a separate version for each
of the different DECstation models.
 1.25 29-Feb-2000  nisimura - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.24 03-Feb-2000  nisimura - Massive change of console initialization. Have each model its own
consinit().
- Fix fbconnect() and relatives; 'struct fbinfo' is initialized only once,
making sure no extraneous console resolution message is emitted.
 1.23 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.22 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.21 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.20 08-Jan-2000  simonb Function prototype cleanup.
 1.19 22-Dec-1999  simonb Get 2100/3100 model number correct (test was reversed). Bug report and
patch from Scott G. Akmentins-Taylor on port-pmax.
 1.18 03-Dec-1999  nisimura Cleanup rambling codes.
 1.17 25-Nov-1999  simonb Move memory sizing to a new function memsize_scan(), and add an empty
stub for memsize_bitmap() to use the PROM bitmap for memory information.
Add a memsize function pointer to the platform structure, and make all
existing DECstation models use memsize_scan() for now.

Interestingly, from the Ultrix cpuconf.{c,h} only the 3100 and 5400 use
a memory scan to determine available memory - all other models use the
PROM bitmap...
 1.16 19-Nov-1999  simonb Remove function declarations already declared in ibusvar.h and
fix typo in dec_3100_intr_*() declarations.
 1.15 16-Nov-1999  nisimura Resolve 3max IOASIC disguise; round #2.
 1.14 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.13 12-Nov-1999  nisimura - Arrange 'platform' struct to have clkread entry, which can interporate
HZ using high resolution timer circuit if available. Merge os_init
into the primary hardware initialization in sysinit[].init.
- Nuke an irrelevant attempt to disable RTC under splhigh condition.
- Make sure IOASIC DECstations accumulate device interrupt mask bits into
certain global variables.
- Have witchcrafts to issue ACK to RTC interrupt.
- Add a missing \n and a minor rearrangement in cpu.c
 1.12 26-May-1999  nisimura branches: 1.12.2; 1.12.4; 1.12.8;
- Continue on branch merge, incrementally.
- Catch up filename changes escaped to be fixed.
 1.11 25-May-1999  nisimura - Rework spl(9) implementation. Use _spl*() processor mask manipulating
routines now reside in locore.S. No functional difference is expected.
- Replace abused splx() abuse with _splset() to change MIPS processor
interrupt mask bit. 'mips/trap.c' side will be fixed soon.
 1.10 26-Apr-1999  nisimura - Sweep machdep.c; mostly imported from a development branch. Little
exposure of TC device any more. Correct comments which are no longer
feasible. Reorder declarations and definitions. Introduce 'clkread'
pointer to pull up model dependent high resolution timer value. Have
prom_systype() call.
- Place routines for model dependent high resolution timer.
- Program IOASIC registers inside os_init() call and nuke ioasic_init().
 1.9 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.8 25-Mar-1999  simonb branches: 1.8.4;
If the clock speed is less than 15MHz, we're on a 2100, otherwise a 3100.
 1.7 25-Mar-1999  simonb Remove trailing whitespace.
 1.6 05-Sep-1998  nisimura branches: 1.6.2;
- Remove lines make not effects from mainbus.c
- Remove direct device driver calls from dec_3100.c. Close PR#5522.
 1.5 21-Jul-1998  drochner adapt to LANCE driver split
 1.4 19-Apr-1998  jonathan Attach ibus to mainbus.
Commit updated dec_3100.c with interrupt-enable code for ibus.
 1.3 26-Mar-1998  jonathan * Create /sys/arch/mips/include/intr.h, with extern declaration of
interrupt-callout vector from mips locore dispatch code to port code.
* Move branch-emulation declaration to mips/include/trap.h.
* Garbage-collect pmax/pmax/trap.h.
Not needed now pmax/pmax_trap.c is gone, and after above tidy-up.
 1.2 26-Mar-1998  thorpej Set cpu_model in the dec_foo_init() functions, make them consistent and
descriptive, and print the model before reporting physical memory size.
 1.1 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.6.2.15 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.6.2.14 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.6.2.13 06-Dec-1999  nisimura Sync w/ recent changes in main trunk.
 1.6.2.12 30-Nov-1999  nisimura Synchronize them w/ recent changes in main trunk and sweep bozos I made.
 1.6.2.11 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.6.2.10 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.6.2.9 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.6.2.8 11-May-1999  nisimura - Correct the case analysis error in ibus_pmax.c
- Now about to remove #if NTC > 0 in mainbus.c
 1.6.2.7 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.6.2.6 07-May-1999  nisimura - Synchronize with main trunk changes.
- Minor formatting nits in *.h files.
 1.6.2.5 15-Mar-1999  nisimura - Decouple "ibus" from TC device implementation.
- Move IOASIC initialization to platform.os_init().
 1.6.2.4 23-Oct-1998  nisimura - Minor modifications for NWSCONS dc7085 kbd support.
 1.6.2.3 21-Oct-1998  nisimura - Add symbolic definitions for DC7085 quad line UART hardware registers.
- Pay more attention to provide "No framebuffer device configured" message
in the case of kernel with either no NWSCONS or unsupported TC option is
booted from bitmap console.
- A little progress in dc.c preparing for dckbd.c.
 1.6.2.2 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.6.2.1 15-Oct-1998  nisimura - NWSCONS cnattach() hooks at platform.cons_init for various DECstations.
- iplmask[] accumulation in autoconf.c.
- codes to identify booting disk looking at ULTRIX rz name.
- MI SCSI entries at cdevsw[]/bdevsw[].
- revised readdisklabel() with ULTRIX disklabel support.
 1.8.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.12.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.4.1 15-Nov-1999  fvdl Sync with -current
 1.12.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.12.2.2 08-Dec-2000  bouyer Sync with HEAD.
 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.29.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.30.2.1 03-Feb-2001  he Pull up revision 1.31 (requested by ad):
Distinguish between PMIN and PMAX in boot message.
 1.31.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.32.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.32.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.32.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.34.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.35.22.4 17-Jan-2005  skrll Sync with HEAD.
 1.35.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.35.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.35.22.1 03-Aug-2004  skrll Sync with HEAD
 1.35.10.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.35.4.2 18-Sep-2001  tsutsui Initalize -> Initialize
 1.35.4.1 18-Sep-2001  tsutsui file dec_3100.c was added on branch nathanw_sa on 2001-09-18 16:15:20 +0000
 1.39.10.3 07-Dec-2007  yamt sync with head
 1.39.10.2 30-Dec-2006  yamt sync with head.
 1.39.10.1 21-Jun-2006  yamt sync with head.
 1.41.8.1 11-Aug-2006  yamt sync with head
 1.41.4.1 09-Sep-2006  rpaulo sync with head
 1.42.6.1 23-Sep-2006  yamt implement splraiseipl for pmax.
 1.42.4.1 12-Jan-2007  ad Sync with head.
 1.43.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.43.24.1 09-Jan-2008  matt sync with HEAD
 1.43.22.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.43.6.1 03-Dec-2007  ad Sync with HEAD.
 1.44.36.3 29-Dec-2010  matt Add sr_map entry for IPL_DDB.
Make 3max 64bit clean.
 1.44.36.2 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.44.36.1 01-Feb-2010  matt Update to reflect mips tree changes.
 1.44.32.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.44.26.1 28-Apr-2009  skrll Sync with HEAD.
 1.44.18.2 19-Aug-2009  yamt sync with head.
 1.44.18.1 04-May-2009  yamt sync with head.
 1.49.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.49.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.49.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.49.4.1 05-Mar-2011  rmind sync with head
 1.52.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.52.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.52.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.52.2.1 30-Oct-2012  yamt sync with head
 1.53.2.1 18-May-2014  rmind sync with head
 1.56 24-Mar-2014  christos use cpu_{g,s}etmodel
 1.55 13-Oct-2012  tsutsui branches: 1.55.2;
struct device * -> device_t, use device_xname() (from chs@)
 1.54 09-Jul-2011  matt branches: 1.54.2; 1.54.12;
Cleanu <machine/*> includes
 1.53 10-Mar-2011  tsutsui Set correct struct clockframe .intr value for hardclock(9).
 1.52 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.51 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.50 20-Jul-2009  tsutsui branches: 1.50.4; 1.50.6; 1.50.8;
KNF, ANSIfy, and misc cosmetics.
 1.49 20-Jul-2009  tsutsui Sprinkle keyword volatile around device register accesses.
 1.48 16-Mar-2009  dsl ANSIfy functions with function-pointer arguments
 1.47 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.46 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.45 03-Dec-2007  ad branches: 1.45.18; 1.45.26; 1.45.32; 1.45.36;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.44 21-Dec-2006  yamt branches: 1.44.6; 1.44.22; 1.44.24; 1.44.30;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.43 29-Jul-2006  ad branches: 1.43.4; 1.43.6;
Remove RASTERCONSOLE support from the pmax port.
 1.42 24-Dec-2005  perry branches: 1.42.4; 1.42.8;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.41 11-Dec-2005  christos merge ktrace-lwp.
 1.40 11-Jan-2005  simonb branches: 1.40.10;
Switch from intrcnt interrupt account to event counters.
 1.39 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 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 18-Sep-2001  tsutsui branches: 1.37.4; 1.37.10; 1.37.22;
Some cosmetics.
 1.36 18-Sep-2001  tsutsui Initalize -> Initialize
 1.35 27-Aug-2001  nisimura branches: 1.35.2;
Count and record memory error interrupts with evcnt(9).
 1.34 24-Aug-2001  mhitch Use the PROM bitmap, if available, to determine available memory. Also
add support of multiple memory segments so machines that allow mixed
memory sizes can utilize all available memory.
 1.33 22-Aug-2001  nisimura NetBSD/pmax now has GENERIC_SOFT_INTERRUPTS.
 1.32 12-Apr-2001  thorpej branches: 1.32.2;
splvec.splimp -> splvec.splvm
 1.31 06-Jun-2000  nisimura branches: 1.31.4;
Make sure model specific cpu_intr() routines call _splset() as the last
action.
 1.30 11-Apr-2000  nisimura branches: 1.30.2;
Forgot to remove mips_hardware_intr global variable.
 1.29 11-Apr-2000  nisimura Change to have cpu_intr() peculiar to DECstations; have ssir global
variable and cpu_intr() body in machdep.c. Reorder and rename
model specific interrupt handler arguments. Fixup machine/intr.h and
machine/cpu.h appropriately.
 1.28 08-Mar-2000  mhitch Do the interrupt dispatch somewhat differently than the previous fix.
This one is more in the spirit of incorrect version which was trying
to shorten the interrupt path. This probably isn't quite as fast as
using a switch() statement to dispatch the interrupts, but should be
a little faster than testing for each of the possible 6 interrupt
conditions.
 1.27 07-Mar-2000  mhitch Using interrupt bits in a switch statement doesn't work very well if more
than one interrupt bit is set (unless you do some fancy case values).
Check each interrupt bit individually and process the interrupt if set.
5000/200 doesn't hang shortly after booting now.
 1.26 06-Mar-2000  mhitch A common device_register() is used instead of a separate version for each
of the different DECstation models.
 1.25 29-Feb-2000  nisimura - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.24 03-Feb-2000  nisimura - Massive change of console initialization. Have each model its own
consinit().
- Fix fbconnect() and relatives; 'struct fbinfo' is initialized only once,
making sure no extraneous console resolution message is emitted.
 1.23 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.22 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.21 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.20 08-Jan-2000  simonb Function prototype cleanup.
 1.19 03-Dec-1999  simonb Change debugging printf() so that it compiles if enabled.
 1.18 03-Dec-1999  nisimura Cleanup rambling codes.
 1.17 25-Nov-1999  simonb Move memory sizing to a new function memsize_scan(), and add an empty
stub for memsize_bitmap() to use the PROM bitmap for memory information.
Add a memsize function pointer to the platform structure, and make all
existing DECstation models use memsize_scan() for now.

Interestingly, from the Ultrix cpuconf.{c,h} only the 3100 and 5400 use
a memory scan to determine available memory - all other models use the
PROM bitmap...
 1.16 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.15 12-Nov-1999  nisimura - Arrange 'platform' struct to have clkread entry, which can interporate
HZ using high resolution timer circuit if available. Merge os_init
into the primary hardware initialization in sysinit[].init.
- Nuke an irrelevant attempt to disable RTC under splhigh condition.
- Make sure IOASIC DECstations accumulate device interrupt mask bits into
certain global variables.
- Have witchcrafts to issue ACK to RTC interrupt.
- Add a missing \n and a minor rearrangement in cpu.c
 1.14 16-Aug-1999  simonb branches: 1.14.2; 1.14.4; 1.14.8;
Pass (csr & KN0x_CSR_BNK32M) to dec_mtasic_err() so that it knows what
size individual memory modules are.
 1.13 26-May-1999  nisimura - Continue on branch merge, incrementally.
- Catch up filename changes escaped to be fixed.
 1.12 25-May-1999  nisimura - Rework spl(9) implementation. Use _spl*() processor mask manipulating
routines now reside in locore.S. No functional difference is expected.
- Replace abused splx() abuse with _splset() to change MIPS processor
interrupt mask bit. 'mips/trap.c' side will be fixed soon.
 1.11 21-May-1999  nisimura - Rename file names;
dec_3max_subr.c -> memc_3max.c, dec_kn02_subr.c -> memc_3min.c
 1.10 26-Apr-1999  nisimura - Sweep machdep.c; mostly imported from a development branch. Little
exposure of TC device any more. Correct comments which are no longer
feasible. Reorder declarations and definitions. Introduce 'clkread'
pointer to pull up model dependent high resolution timer value. Have
prom_systype() call.
- Place routines for model dependent high resolution timer.
- Program IOASIC registers inside os_init() call and nuke ioasic_init().
 1.9 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.8 27-Mar-1999  mhitch branches: 1.8.4;
The ECC handling was broken when the common handling was split out of dec_3max.c
and dec_3maxplus.c. The ERRSYN/CHKSYN register contains data, not an address.
Pass the address of the register rather than the contents to dec_mtasic_err()
instead of the register contents so it can read/write the register.
Correctable memory errors won't trap in dec_mtasic_err() anymore.
 1.7 25-Mar-1999  simonb Remove trailing whitespace.
 1.6 29-Aug-1998  mrg branches: 1.6.2;
minor minor KNF nit.
 1.5 22-Jun-1998  jonathan * Garbage-collect ancient 4.4bsd model-specific aliases for
ioctl asic interrupt masks.
* include sys/dev/tc/ioasicreg.h, not pmax asic.h (as prep for merge).
 1.4 29-Mar-1998  jonathan Split 3max (kn02) and 3maxplus (kn03, kn05) memory-error handling out
dec_3max.c into a shared file. These models have compatible memory
subsystems, the same memory slots, and (apparently) the same error reporting.

Add markers for where MNN probes for configurations with a mixture of
RAM sizes and for Prestoserve NVRAM (in normal RAM slots) should go.
 1.3 26-Mar-1998  jonathan * Create /sys/arch/mips/include/intr.h, with extern declaration of
interrupt-callout vector from mips locore dispatch code to port code.
* Move branch-emulation declaration to mips/include/trap.h.
* Garbage-collect pmax/pmax/trap.h.
Not needed now pmax/pmax_trap.c is gone, and after above tidy-up.
 1.2 26-Mar-1998  thorpej Set cpu_model in the dec_foo_init() functions, make them consistent and
descriptive, and print the model before reporting physical memory size.
 1.1 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.6.2.18 14-Mar-2000  nisimura Synchronize with the efforts made lately in main trunk, filling gaps.
 1.6.2.17 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.6.2.16 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.6.2.15 06-Dec-1999  nisimura Sync w/ recent changes in main trunk.
 1.6.2.14 30-Nov-1999  nisimura Synchronize them w/ recent changes in main trunk and sweep bozos I made.
 1.6.2.13 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.6.2.12 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.6.2.11 29-Oct-1999  drochner -use dckbd.h instead of wsdisplay.h to decide whether a display console
is worth trying (needed for kernels with both dc / zs support)
-correct turbo channel slots and ibus attachment
 1.6.2.10 11-Jun-1999  nisimura - Rework DECstation spl(9).
 1.6.2.9 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.6.2.8 26-May-1999  nisimura - Track changes in main trunk.
 1.6.2.7 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.6.2.6 18-Mar-1999  nisimura - Arrange how IOASIC device interrupts are served.
- Fix a bozo I made in 3MIN TC processing.
- Change 3MAX interrupt processing like as ULTRIX does.
- Clean up IOASIC a bit.
 1.6.2.5 15-Mar-1999  nisimura - Decouple "ibus" from TC device implementation.
- Move IOASIC initialization to platform.os_init().
 1.6.2.4 23-Oct-1998  nisimura - Minor modifications for NWSCONS dc7085 kbd support.
 1.6.2.3 21-Oct-1998  nisimura - Add symbolic definitions for DC7085 quad line UART hardware registers.
- Pay more attention to provide "No framebuffer device configured" message
in the case of kernel with either no NWSCONS or unsupported TC option is
booted from bitmap console.
- A little progress in dc.c preparing for dckbd.c.
 1.6.2.2 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.6.2.1 15-Oct-1998  nisimura - NWSCONS cnattach() hooks at platform.cons_init for various DECstations.
- iplmask[] accumulation in autoconf.c.
- codes to identify booting disk looking at ULTRIX rz name.
- MI SCSI entries at cdevsw[]/bdevsw[].
- revised readdisklabel() with ULTRIX disklabel support.
 1.8.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.14.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.14.4.1 15-Nov-1999  fvdl Sync with -current
 1.14.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.14.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.30.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.31.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.32.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.32.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.32.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.35.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.37.22.4 17-Jan-2005  skrll Sync with HEAD.
 1.37.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.37.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.37.22.1 03-Aug-2004  skrll Sync with HEAD
 1.37.10.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.37.4.2 18-Sep-2001  tsutsui Some cosmetics.
 1.37.4.1 18-Sep-2001  tsutsui file dec_3max.c was added on branch nathanw_sa on 2001-09-18 16:24:17 +0000
 1.40.10.3 07-Dec-2007  yamt sync with head
 1.40.10.2 30-Dec-2006  yamt sync with head.
 1.40.10.1 21-Jun-2006  yamt sync with head.
 1.42.8.1 11-Aug-2006  yamt sync with head
 1.42.4.1 09-Sep-2006  rpaulo sync with head
 1.43.6.1 23-Sep-2006  yamt implement splraiseipl for pmax.
 1.43.4.1 12-Jan-2007  ad Sync with head.
 1.44.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.44.24.1 09-Jan-2008  matt sync with HEAD
 1.44.22.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.44.6.1 03-Dec-2007  ad Sync with HEAD.
 1.45.36.3 29-Dec-2010  matt Add sr_map entry for IPL_DDB.
Make 3max 64bit clean.
 1.45.36.2 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.45.36.1 01-Feb-2010  matt Update to reflect mips tree changes.
 1.45.32.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.45.26.1 28-Apr-2009  skrll Sync with HEAD.
 1.45.18.2 19-Aug-2009  yamt sync with head.
 1.45.18.1 04-May-2009  yamt sync with head.
 1.50.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.50.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.50.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.50.4.2 21-Apr-2011  rmind sync with head
 1.50.4.1 05-Mar-2011  rmind sync with head
 1.54.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.54.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.54.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.54.2.1 30-Oct-2012  yamt sync with head
 1.55.2.1 18-May-2014  rmind sync with head
 1.7 21-May-1999  nisimura - Rename file names;
dec_3max_subr.c -> memc_3max.c, dec_kn02_subr.c -> memc_3min.c
 1.6 27-Mar-1999  mhitch branches: 1.6.4;
The ECC handling was broken when the common handling was split out of dec_3max.c
and dec_3maxplus.c. The ERRSYN/CHKSYN register contains data, not an address.
Pass the address of the register rather than the contents to dec_mtasic_err()
instead of the register contents so it can read/write the register.
Correctable memory errors won't trap in dec_mtasic_err() anymore.
 1.5 25-Mar-1999  simonb Remove trailing whitespace.
 1.4 29-Mar-1998  jonathan branches: 1.4.4;
Split 3max (kn02) and 3maxplus (kn03, kn05) memory-error handling out
dec_3max.c into a shared file. These models have compatible memory
subsystems, the same memory slots, and (apparently) the same error reporting.

Add markers for where MNN probes for configurations with a mixture of
RAM sizes and for Prestoserve NVRAM (in normal RAM slots) should go.
 1.3 26-Mar-1998  jonathan * Create /sys/arch/mips/include/intr.h, with extern declaration of
interrupt-callout vector from mips locore dispatch code to port code.
* Move branch-emulation declaration to mips/include/trap.h.
* Garbage-collect pmax/pmax/trap.h.
Not needed now pmax/pmax_trap.c is gone, and after above tidy-up.
 1.2 26-Mar-1998  thorpej Set cpu_model in the dec_foo_init() functions, make them consistent and
descriptive, and print the model before reporting physical memory size.
 1.1 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.4.4.1 21-May-1999  nisimura - Renamed and vanished.
 1.6.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3 21-May-1999  nisimura - Rename file names;
dec_3max_subr.c -> memc_3max.c, dec_kn02_subr.c -> memc_3min.c
 1.2 25-Mar-1999  simonb branches: 1.2.4;
Remove trailing whitespace.
 1.1 30-Mar-1998  jonathan branches: 1.1.4;
Declarations for shared 3max(kn02)/3maxplus(kn03/kn05) memory
subsystem and NVRAM code.
 1.1.4.1 21-May-1999  nisimura - Renamed and vanished.
 1.2.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.73 20-Sep-2024  andvar Change cookie format specifier to %p and remove casting, like in dec_3min.c
and dec_maxine.c, missed in the matt-nb5-mips64 merge.

Fixes pmax64 DIAGNOSTIC enabled build for this file.
 1.72 05-Feb-2024  andvar branches: 1.72.2;
triple "r" typos, mainly s/interrrupt/interrupt/ in comments and one definition.
 1.71 22-Mar-2016  mrg revert part of rev 1.66 that converted a tri-state variable into
a bool while leaving a comparision against "< 3".
 1.70 24-Mar-2014  christos branches: 1.70.6;
use cpu_{g,s}etmodel
 1.69 13-Oct-2012  tsutsui branches: 1.69.2;
struct device * -> device_t, use device_xname() (from chs@)
 1.68 09-Jul-2011  matt branches: 1.68.2; 1.68.12;
Cleanu <machine/*> includes
 1.67 03-Apr-2011  mhitch Fix pmax timecounters for mips3-class machines. Apparently no one else
has run a 5000/150 with 5.0 or later - I booted 5.0 a couple of time, but
clamd caused a hard hang. Now that I've given up trying to run clamd on
my 5000/150, I noticed that time ran too fast while using the
mips3_cp0_counter source. The cpu_mhz computed in mc_cpuspeed is the
CP0 clock speed, not the doubled CPU clock. Also add the mips3_cp0_counter
timecounters for the 5000/50 (maxine) and 5000/260 (3maxplus).
 1.66 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.65 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.64 14-Dec-2009  matt branches: 1.64.4; 1.64.6; 1.64.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.63 20-Jul-2009  tsutsui KNF, ANSIfy, and misc cosmetics.
 1.62 20-Jul-2009  tsutsui Sprinkle keyword volatile around device register accesses.
 1.61 16-Mar-2009  dsl ANSIfy functions with function-pointer arguments
 1.60 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.59 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.58 03-Jan-2008  joerg branches: 1.58.10; 1.58.18; 1.58.24; 1.58.28;
Timecounter and generic todr support for pmax. From Garret D'Amore.
 1.57 03-Dec-2007  ad branches: 1.57.6;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.56 21-Dec-2006  yamt branches: 1.56.6; 1.56.22; 1.56.24; 1.56.30;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.55 29-Jul-2006  ad branches: 1.55.4; 1.55.6;
Remove RASTERCONSOLE support from the pmax port.
 1.54 25-Feb-2006  wiz branches: 1.54.2;
Fix some typos.
 1.53 24-Dec-2005  perry branches: 1.53.2; 1.53.4; 1.53.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.52 11-Dec-2005  christos merge ktrace-lwp.
 1.51 11-Jan-2005  simonb branches: 1.51.10;
Switch from intrcnt interrupt account to event counters.
 1.50 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.49 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.48 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.47 18-Sep-2001  tsutsui branches: 1.47.4; 1.47.10; 1.47.22;
Initalize -> Initialize
 1.46 27-Aug-2001  nisimura branches: 1.46.2;
Count and record memory error interrupts with evcnt(9).
 1.45 24-Aug-2001  mhitch Use the PROM bitmap, if available, to determine available memory. Also
add support of multiple memory segments so machines that allow mixed
memory sizes can utilize all available memory.
 1.44 22-Aug-2001  nisimura NetBSD/pmax now has GENERIC_SOFT_INTERRUPTS.
 1.43 12-Apr-2001  thorpej branches: 1.43.2;
splvec.splimp -> splvec.splvm
 1.42 18-Feb-2001  tsutsui branches: 1.42.2;
cosmetics (white space etc.)
 1.41 06-Jun-2000  nisimura Make sure model specific cpu_intr() routines call _splset() as the last
action.
 1.40 29-May-2000  nisimura Make this file compilable. 3MAX+ has no ISDN.
 1.39 11-Apr-2000  nisimura branches: 1.39.2;
Forgot to remove mips_hardware_intr global variable.
 1.38 11-Apr-2000  nisimura Change to have cpu_intr() peculiar to DECstations; have ssir global
variable and cpu_intr() body in machdep.c. Reorder and rename
model specific interrupt handler arguments. Fixup machine/intr.h and
machine/cpu.h appropriately.
 1.37 06-Mar-2000  mhitch A common device_register() is used instead of a separate version for each
of the different DECstation models.
 1.36 29-Feb-2000  nisimura - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.35 03-Feb-2000  nisimura - Massive change of console initialization. Have each model its own
consinit().
- Fix fbconnect() and relatives; 'struct fbinfo' is initialized only once,
making sure no extraneous console resolution message is emitted.
 1.34 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.33 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.32 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.31 08-Jan-2000  simonb Function prototype cleanup.
 1.30 03-Dec-1999  nisimura Cleanup rambling codes.
 1.29 25-Nov-1999  simonb Move memory sizing to a new function memsize_scan(), and add an empty
stub for memsize_bitmap() to use the PROM bitmap for memory information.
Add a memsize function pointer to the platform structure, and make all
existing DECstation models use memsize_scan() for now.

Interestingly, from the Ultrix cpuconf.{c,h} only the 3100 and 5400 use
a memory scan to determine available memory - all other models use the
PROM bitmap...
 1.28 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.27 12-Nov-1999  nisimura - Arrange 'platform' struct to have clkread entry, which can interporate
HZ using high resolution timer circuit if available. Merge os_init
into the primary hardware initialization in sysinit[].init.
- Nuke an irrelevant attempt to disable RTC under splhigh condition.
- Make sure IOASIC DECstations accumulate device interrupt mask bits into
certain global variables.
- Have witchcrafts to issue ACK to RTC interrupt.
- Add a missing \n and a minor rearrangement in cpu.c
 1.26 16-Aug-1999  simonb branches: 1.26.2; 1.26.4; 1.26.8;
Pass (csr & KN0x_CSR_BNK32M) to dec_mtasic_err() so that it knows what
size individual memory modules are.
 1.25 13-Aug-1999  simonb Put original contents of the TURBOchannel bus-cycle counter clkread()
from an old version of machdep.c into kn03_clkread(). Fixes problems
with wild CPU time usage noted on port-pmax.
 1.24 10-Jun-1999  nisimura - Correct errorneous comments for kn*_wbflush() routines.
 1.23 08-Jun-1999  simonb Include <pmax/pmax/machdep.h> instead of declaring our own prom_*()
prototypes.
 1.22 29-May-1999  nisimura - Correct uninitialized pointer issue I made.
- Put a comment why the original prodtype detection logic made no trouble.
 1.21 29-May-1999  simonb Move initialisation of ioasic_base to dec_3maxplus_init() - it is used
in this function before dec_3maxplus_os_init() gets called.
 1.20 26-May-1999  nisimura - Continue on branch merge, incrementally.
- Catch up filename changes escaped to be fixed.
 1.19 25-May-1999  nisimura - Continue to import a development branch.
- Minor formatting fix.
 1.18 25-May-1999  nisimura - Rework spl(9) implementation. Use _spl*() processor mask manipulating
routines now reside in locore.S. No functional difference is expected.
- Replace abused splx() abuse with _splset() to change MIPS processor
interrupt mask bit. 'mips/trap.c' side will be fixed soon.
 1.17 21-May-1999  nisimura - Rename file names;
dec_3max_subr.c -> memc_3max.c, dec_kn02_subr.c -> memc_3min.c
 1.16 26-Apr-1999  nisimura - Sweep machdep.c; mostly imported from a development branch. Little
exposure of TC device any more. Correct comments which are no longer
feasible. Reorder declarations and definitions. Introduce 'clkread'
pointer to pull up model dependent high resolution timer value. Have
prom_systype() call.
- Place routines for model dependent high resolution timer.
- Program IOASIC registers inside os_init() call and nuke ioasic_init().
 1.15 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.14 27-Mar-1999  mhitch branches: 1.14.4;
The ECC handling was broken when the common handling was split out of dec_3max.c
and dec_3maxplus.c. The ERRSYN/CHKSYN register contains data, not an address.
Pass the address of the register rather than the contents to dec_mtasic_err()
instead of the register contents so it can read/write the register.
Correctable memory errors won't trap in dec_mtasic_err() anymore.
 1.13 25-Mar-1999  simonb Check KN03_INTR_PROD_JUMPER in the IOASIC INTR register to test if we
are running on a 5000/2x0 or a 5900, and set cpu_model accordingly.
(Test from Tohru Nishimura).
 1.12 25-Mar-1999  simonb Remove trailing whitespace.
 1.11 03-Mar-1999  simonb Fix spel in comment.
 1.10 02-Mar-1999  jonathan Do callouts for IOCTL asic lance interrupts before SCSI callouts.
 1.9 29-Aug-1998  mrg branches: 1.9.2;
minor minor KNF nit.
 1.8 22-Jun-1998  jonathan * Garbage-collect ancient 4.4bsd model-specific aliases for
ioctl asic interrupt masks.
* include sys/dev/tc/ioasicreg.h, not pmax asic.h (as prep for merge).
 1.7 30-Mar-1998  jonathan Move sprintf() of model string after call to model-specific *_os_init()
routine, so that cpu_mhz is set.
 1.6 29-Mar-1998  jonathan Split 3max (kn02) and 3maxplus (kn03, kn05) memory-error handling out
dec_3max.c into a shared file. These models have compatible memory
subsystems, the same memory slots, and (apparently) the same error reporting.

Add markers for where MNN probes for configurations with a mixture of
RAM sizes and for Prestoserve NVRAM (in normal RAM slots) should go.
 1.5 26-Mar-1998  jonathan * Create /sys/arch/mips/include/intr.h, with extern declaration of
interrupt-callout vector from mips locore dispatch code to port code.
* Move branch-emulation declaration to mips/include/trap.h.
* Garbage-collect pmax/pmax/trap.h.
Not needed now pmax/pmax_trap.c is gone, and after above tidy-up.
 1.4 26-Mar-1998  thorpej Set cpu_model in the dec_foo_init() functions, make them consistent and
descriptive, and print the model before reporting physical memory size.
 1.3 26-Mar-1998  thorpej Right now all platforms use the tc_slot_info[] stuff, so put it in a place
where everyone can get at it.
 1.2 25-Mar-1998  jonathan * Use new defopt model-specific options and opt files.
Replace all DS5000_* and DS3100 ifdefs with ifdefs on DEC_ options.
* Use MI declarations, not pmax-specific, in model-specific init
that uses baseboard (ioasic) registers.
* Further cleanup of machdep.c. Clock-tick still needs more thought.
* Use 'ibus' names for 3100 baseboard devices in MI code.
 1.1 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.9.2.22 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.9.2.21 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.9.2.20 06-Dec-1999  nisimura Sync w/ recent changes in main trunk.
 1.9.2.19 30-Nov-1999  nisimura Synchronize them w/ recent changes in main trunk and sweep bozos I made.
 1.9.2.18 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.9.2.17 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.9.2.16 29-Oct-1999  drochner use zskbd.h instead of wsdisplay.h to decide whether a display console
is worth trying (needed for kernels with both dc / zs support)
 1.9.2.15 05-Sep-1999  nisimura - Reduce clatters and cleanup.
 1.9.2.14 13-Aug-1999  nisimura - Resolve code inconsistency.
 1.9.2.13 13-Aug-1999  nisimura - Track a fix made in main trunk. microtime() interpolation error.
 1.9.2.12 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.9.2.11 26-May-1999  nisimura - Track changes in main trunk.
 1.9.2.10 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.9.2.9 26-Apr-1999  nisimura - Arrange interrupt handler vectors initialized inside configure().
- Sweep jobs in machdep.c, and other model dependent files.
 1.9.2.8 29-Mar-1999  drochner use common dev/tc/ioasic code
 1.9.2.7 29-Mar-1999  nisimura - Catch up to recent changes in main trunk.
- Reorganize various #include's.
- Yield memcpy to Mach derivated one.
- pm_cnattach() now checks the existense of framebuffer card.
 1.9.2.6 18-Mar-1999  nisimura - Arrange how IOASIC device interrupts are served.
- Fix a bozo I made in 3MIN TC processing.
- Change 3MAX interrupt processing like as ULTRIX does.
- Clean up IOASIC a bit.
 1.9.2.5 15-Mar-1999  nisimura - Decouple "ibus" from TC device implementation.
- Move IOASIC initialization to platform.os_init().
 1.9.2.4 21-Oct-1998  nisimura - Add symbolic definitions for DC7085 quad line UART hardware registers.
- Pay more attention to provide "No framebuffer device configured" message
in the case of kernel with either no NWSCONS or unsupported TC option is
booted from bitmap console.
- A little progress in dc.c preparing for dckbd.c.
 1.9.2.3 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.9.2.2 19-Oct-1998  drochner add console initialization for keyboard
 1.9.2.1 15-Oct-1998  nisimura - NWSCONS cnattach() hooks at platform.cons_init for various DECstations.
- iplmask[] accumulation in autoconf.c.
- codes to identify booting disk looking at ULTRIX rz name.
- MI SCSI entries at cdevsw[]/bdevsw[].
- revised readdisklabel() with ULTRIX disklabel support.
 1.14.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.26.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.26.4.1 15-Nov-1999  fvdl Sync with -current
 1.26.2.3 21-Apr-2001  bouyer Sync with HEAD
 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.39.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.42.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.43.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.43.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.43.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.46.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.47.22.4 17-Jan-2005  skrll Sync with HEAD.
 1.47.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.47.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.47.22.1 03-Aug-2004  skrll Sync with HEAD
 1.47.10.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.47.4.2 18-Sep-2001  tsutsui Initalize -> Initialize
 1.47.4.1 18-Sep-2001  tsutsui file dec_3maxplus.c was added on branch nathanw_sa on 2001-09-18 16:15:21 +0000
 1.51.10.4 21-Jan-2008  yamt sync with head
 1.51.10.3 07-Dec-2007  yamt sync with head
 1.51.10.2 30-Dec-2006  yamt sync with head.
 1.51.10.1 21-Jun-2006  yamt sync with head.
 1.53.6.1 22-Apr-2006  simonb Sync with head.
 1.53.4.1 09-Sep-2006  rpaulo sync with head
 1.53.2.1 01-Mar-2006  yamt sync with head.
 1.54.2.1 11-Aug-2006  yamt sync with head
 1.55.6.1 23-Sep-2006  yamt implement splraiseipl for pmax.
 1.55.4.1 12-Jan-2007  ad Sync with head.
 1.56.30.2 18-Feb-2008  mjf Sync with HEAD.
 1.56.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.56.24.1 09-Jan-2008  matt sync with HEAD
 1.56.22.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.56.6.1 03-Dec-2007  ad Sync with HEAD.
 1.57.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.58.28.3 29-Dec-2010  matt Add sr_map entry for IPL_DDB.
Make 3max 64bit clean.
 1.58.28.2 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.58.28.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.58.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.58.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.58.10.3 11-Mar-2010  yamt sync with head
 1.58.10.2 19-Aug-2009  yamt sync with head.
 1.58.10.1 04-May-2009  yamt sync with head.
 1.64.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.64.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.64.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.64.4.2 21-Apr-2011  rmind sync with head
 1.64.4.1 05-Mar-2011  rmind sync with head
 1.68.12.3 03-Dec-2017  jdolecek update from HEAD
 1.68.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.68.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.68.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.68.2.1 30-Oct-2012  yamt sync with head
 1.69.2.1 18-May-2014  rmind sync with head
 1.70.6.1 22-Apr-2016  skrll Sync with HEAD
 1.72.2.1 02-Aug-2025  perseant Sync with HEAD
 1.75 02-Jun-2024  andvar Fix various typos, mainly triple letters.
 1.74 17-Sep-2018  tsutsui Fix hangup after framebuffers are attached on 3MIN. PR port-pmax/53611

Ok'ed by mrg@. Should be pulled up to netbsd-7 and netbsd-8.
 1.73 24-Mar-2014  christos branches: 1.73.4; 1.73.22; 1.73.28; 1.73.30;
use cpu_{g,s}etmodel
 1.72 13-Oct-2012  tsutsui branches: 1.72.2;
struct device * -> device_t, use device_xname() (from chs@)
 1.71 09-Jul-2011  matt branches: 1.71.2; 1.71.12;
Cleanu <machine/*> includes
 1.70 03-Apr-2011  mhitch Fix pmax timecounters for mips3-class machines. Apparently no one else
has run a 5000/150 with 5.0 or later - I booted 5.0 a couple of time, but
clamd caused a hard hang. Now that I've given up trying to run clamd on
my 5000/150, I noticed that time ran too fast while using the
mips3_cp0_counter source. The cpu_mhz computed in mc_cpuspeed is the
CP0 clock speed, not the doubled CPU clock. Also add the mips3_cp0_counter
timecounters for the 5000/50 (maxine) and 5000/260 (3maxplus).
 1.69 10-Mar-2011  tsutsui Set correct struct clockframe .intr value for hardclock(9).
 1.68 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.67 08-Feb-2011  rmind Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.66 14-Dec-2009  matt branches: 1.66.4; 1.66.6; 1.66.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.65 20-Jul-2009  tsutsui KNF, ANSIfy, and misc cosmetics.
 1.64 20-Jul-2009  tsutsui Sprinkle keyword volatile around device register accesses.
 1.63 16-Mar-2009  dsl ANSIfy functions with function-pointer arguments
 1.62 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.61 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.60 15-Mar-2008  tsutsui branches: 1.60.4; 1.60.12; 1.60.18; 1.60.22;
Wrap mips3_cp0_count_read() stuff (for DECstation 5000/150) with
#if defined(MIPS3) so that kernel config without options MIPS3 compiles.
Problem reported by Erik Bertelsen on port-pmax.
 1.59 03-Jan-2008  joerg branches: 1.59.2; 1.59.6;
Timecounter and generic todr support for pmax. From Garret D'Amore.
 1.58 03-Dec-2007  ad branches: 1.58.6;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.57 21-Dec-2006  yamt branches: 1.57.6; 1.57.22; 1.57.24; 1.57.30;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.56 29-Jul-2006  ad branches: 1.56.4; 1.56.6;
Remove RASTERCONSOLE support from the pmax port.
 1.55 25-Feb-2006  wiz branches: 1.55.2;
Fix some typos.
 1.54 24-Dec-2005  perry branches: 1.54.2; 1.54.4; 1.54.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.53 11-Dec-2005  christos merge ktrace-lwp.
 1.52 11-Jan-2005  simonb branches: 1.52.10;
Switch from intrcnt interrupt account to event counters.
 1.51 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.50 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.49 18-Sep-2001  tsutsui branches: 1.49.4; 1.49.10; 1.49.22;
Initalize -> Initialize
 1.48 27-Aug-2001  nisimura branches: 1.48.2;
Count and record memory error interrupts with evcnt(9).
 1.47 24-Aug-2001  mhitch Use the PROM bitmap, if available, to determine available memory. Also
add support of multiple memory segments so machines that allow mixed
memory sizes can utilize all available memory.
 1.46 22-Aug-2001  nisimura NetBSD/pmax now has GENERIC_SOFT_INTERRUPTS.
 1.45 12-Apr-2001  thorpej branches: 1.45.2;
splvec.splimp -> splvec.splvm
 1.44 11-Feb-2001  tsutsui branches: 1.44.2;
space/tab cosmetics
 1.43 05-Oct-2000  cgd clean up and consistency for CP0 Count, Compare, Wired, and Config
access function names and prototypes.
 1.42 06-Jun-2000  nisimura Make sure model specific cpu_intr() routines call _splset() as the last
action.
 1.41 28-May-2000  mhitch Remove local declaration of physmem_boardmax. The external physmem_boardmax
was not getting modified for 4MB SIMMS, and when fully populated with 8
SIMMS the memory size was configured at 128MB instead of 32MB.
 1.40 11-Apr-2000  nisimura branches: 1.40.2;
Forgot to remove mips_hardware_intr global variable.
 1.39 11-Apr-2000  nisimura Change to have cpu_intr() peculiar to DECstations; have ssir global
variable and cpu_intr() body in machdep.c. Reorder and rename
model specific interrupt handler arguments. Fixup machine/intr.h and
machine/cpu.h appropriately.
 1.38 05-Apr-2000  ad Only spew about every interrupt that gets hooked up if DEBUG is defined
(i.e. not DIAGNOSTIC).
 1.37 06-Mar-2000  mhitch A common device_register() is used instead of a separate version for each
of the different DECstation models.
 1.36 01-Mar-2000  ad Make this compile in DEBUG/DIAGNOSTIC case.
 1.35 29-Feb-2000  nisimura - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.34 03-Feb-2000  nisimura - Massive change of console initialization. Have each model its own
consinit().
- Fix fbconnect() and relatives; 'struct fbinfo' is initialized only once,
making sure no extraneous console resolution message is emitted.
 1.33 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.32 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.31 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.30 08-Jan-2000  simonb Function prototype cleanup.
 1.29 03-Dec-1999  nisimura Cleanup rambling codes.
 1.28 01-Dec-1999  nisimura Simply the way how 3min estimates CPU speed. Save 25+ instructions.
 1.27 28-Nov-1999  simonb Don't use magic numbers! Use XINE_REG_IMSK and KMIN_REG_IMSK.
 1.26 25-Nov-1999  simonb Move memory sizing to a new function memsize_scan(), and add an empty
stub for memsize_bitmap() to use the PROM bitmap for memory information.
Add a memsize function pointer to the platform structure, and make all
existing DECstation models use memsize_scan() for now.

Interestingly, from the Ultrix cpuconf.{c,h} only the 3100 and 5400 use
a memory scan to determine available memory - all other models use the
PROM bitmap...
 1.25 16-Nov-1999  nisimura Restore a change in 1.23 which I accidentally lost at the previous commit.
 1.24 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.23 15-Nov-1999  mhitch Set IOASIC interrupt mask when changing device interrupts. (Old
initialization appears to have enabled IOASIC interrupts, and then used
a separate mask in the interrupt routine to decide which ones to process.
New initialization doesn't enable all the required interrupts, and the
device interrupt enable/disable routine wasn't changing the IOASIC mask).
Also fix a printf() format type.
 1.22 12-Nov-1999  nisimura - Arrange 'platform' struct to have clkread entry, which can interporate
HZ using high resolution timer circuit if available. Merge os_init
into the primary hardware initialization in sysinit[].init.
- Nuke an irrelevant attempt to disable RTC under splhigh condition.
- Make sure IOASIC DECstations accumulate device interrupt mask bits into
certain global variables.
- Have witchcrafts to issue ACK to RTC interrupt.
- Add a missing \n and a minor rearrangement in cpu.c
 1.21 10-Jun-1999  nisimura branches: 1.21.2; 1.21.4; 1.21.8;
- Correct errorneous comments for kn*_wbflush() routines.
 1.20 08-Jun-1999  simonb Include <pmax/pmax/machdep.h> instead of declaring our own prom_*()
prototypes.
 1.19 27-May-1999  nisimura - Save MIPS1 only configuration for 3min, pointed by Erik Bertelsen
<erik@mediator.uni-c.dk>
 1.18 26-May-1999  nisimura - Continue on branch merge, incrementally.
- Catch up filename changes escaped to be fixed.
 1.17 25-May-1999  nisimura - Continue to import a development branch.
- Minor formatting fix.
 1.16 25-May-1999  nisimura - Rework spl(9) implementation. Use _spl*() processor mask manipulating
routines now reside in locore.S. No functional difference is expected.
- Replace abused splx() abuse with _splset() to change MIPS processor
interrupt mask bit. 'mips/trap.c' side will be fixed soon.
 1.15 21-May-1999  nisimura - Rename file names;
dec_3max_subr.c -> memc_3max.c, dec_kn02_subr.c -> memc_3min.c
 1.14 26-Apr-1999  nisimura - Sweep machdep.c; mostly imported from a development branch. Little
exposure of TC device any more. Correct comments which are no longer
feasible. Reorder declarations and definitions. Introduce 'clkread'
pointer to pull up model dependent high resolution timer value. Have
prom_systype() call.
- Place routines for model dependent high resolution timer.
- Program IOASIC registers inside os_init() call and nuke ioasic_init().
 1.13 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.12 25-Mar-1999  simonb branches: 1.12.4;
Remove trailing whitespace.
 1.11 02-Mar-1999  jonathan Fix up eliding nested interrupts.
 1.10 02-Mar-1999  jonathan Re-enable 3MIN clock intrs after servicing. Prepare to do same for ttys.
 1.9 02-Mar-1999  jonathan Do callouts for IOCTL asic lance interrupts before SCSI callouts.
 1.8 18-Feb-1999  jonathan Use cpu_spl3() for all device-level spls, not splhigh().
Lets reset button work when stuck at device spl.
 1.7 22-Jun-1998  jonathan branches: 1.7.4;
* Garbage-collect ancient 4.4bsd model-specific aliases for
ioctl asic interrupt masks.
* include sys/dev/tc/ioasicreg.h, not pmax asic.h (as prep for merge).
 1.6 19-Apr-1998  jonathan Add locore assembler functions to read mips3 cycle counter, and
read and write compare register (controls cycle-driven periodic interrupt).

Use cycle counter for microsecond time on mips3, but for now only on
3min motherboards (5000/150). the MAXINE baseboard microsecond
counter is more stable and I don't ave no 5000/260 to test.

XXX clkread() is a mess, it should be rewritten.
XXX should add nanotime() to give inkernel nanosecond resolution,
and then microtime() reworked to use nanotime().
 1.5 30-Mar-1998  jonathan Move sprintf() of model string after call to model-specific *_os_init()
routine, so that cpu_mhz is set.
 1.4 26-Mar-1998  jonathan * Create /sys/arch/mips/include/intr.h, with extern declaration of
interrupt-callout vector from mips locore dispatch code to port code.
* Move branch-emulation declaration to mips/include/trap.h.
* Garbage-collect pmax/pmax/trap.h.
Not needed now pmax/pmax_trap.c is gone, and after above tidy-up.
 1.3 26-Mar-1998  thorpej Set cpu_model in the dec_foo_init() functions, make them consistent and
descriptive, and print the model before reporting physical memory size.
 1.2 25-Mar-1998  jonathan * Use new defopt model-specific options and opt files.
Replace all DS5000_* and DS3100 ifdefs with ifdefs on DEC_ options.
* Use MI declarations, not pmax-specific, in model-specific init
that uses baseboard (ioasic) registers.
* Further cleanup of machdep.c. Clock-tick still needs more thought.
* Use 'ibus' names for 3100 baseboard devices in MI code.
 1.1 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.7.4.19 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.7.4.18 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.7.4.17 06-Dec-1999  nisimura Sync w/ recent changes in main trunk.
 1.7.4.16 30-Nov-1999  nisimura Synchronize them w/ recent changes in main trunk and sweep bozos I made.
 1.7.4.15 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.7.4.14 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.7.4.13 05-Sep-1999  nisimura - Reduce clatters and cleanup.
 1.7.4.12 13-Aug-1999  nisimura - Resolve code inconsistency.
 1.7.4.11 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.7.4.10 26-May-1999  nisimura - Track changes in main trunk.
 1.7.4.9 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.7.4.8 26-Apr-1999  nisimura - Arrange interrupt handler vectors initialized inside configure().
- Sweep jobs in machdep.c, and other model dependent files.
 1.7.4.7 29-Mar-1999  drochner use common dev/tc/ioasic code
 1.7.4.6 29-Mar-1999  nisimura - Catch up to recent changes in main trunk.
- Reorganize various #include's.
- Yield memcpy to Mach derivated one.
- pm_cnattach() now checks the existense of framebuffer card.
 1.7.4.5 18-Mar-1999  nisimura - Arrange how IOASIC device interrupts are served.
- Fix a bozo I made in 3MIN TC processing.
- Change 3MAX interrupt processing like as ULTRIX does.
- Clean up IOASIC a bit.
 1.7.4.4 15-Mar-1999  nisimura - Decouple "ibus" from TC device implementation.
- Move IOASIC initialization to platform.os_init().
 1.7.4.3 21-Oct-1998  nisimura - Add symbolic definitions for DC7085 quad line UART hardware registers.
- Pay more attention to provide "No framebuffer device configured" message
in the case of kernel with either no NWSCONS or unsupported TC option is
booted from bitmap console.
- A little progress in dc.c preparing for dckbd.c.
 1.7.4.2 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.7.4.1 15-Oct-1998  nisimura - NWSCONS cnattach() hooks at platform.cons_init for various DECstations.
- iplmask[] accumulation in autoconf.c.
- codes to identify booting disk looking at ULTRIX rz name.
- MI SCSI entries at cdevsw[]/bdevsw[].
- revised readdisklabel() with ULTRIX disklabel support.
 1.12.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.21.8.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.3 21-Apr-2001  bouyer Sync with HEAD
 1.21.2.2 12-Mar-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.40.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.44.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.45.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.45.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.45.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.48.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.49.22.4 17-Jan-2005  skrll Sync with HEAD.
 1.49.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.49.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.49.22.1 03-Aug-2004  skrll Sync with HEAD
 1.49.10.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.49.4.2 18-Sep-2001  tsutsui Initalize -> Initialize
 1.49.4.1 18-Sep-2001  tsutsui file dec_3min.c was added on branch nathanw_sa on 2001-09-18 16:15:21 +0000
 1.52.10.5 17-Mar-2008  yamt sync with head.
 1.52.10.4 21-Jan-2008  yamt sync with head
 1.52.10.3 07-Dec-2007  yamt sync with head
 1.52.10.2 30-Dec-2006  yamt sync with head.
 1.52.10.1 21-Jun-2006  yamt sync with head.
 1.54.6.1 22-Apr-2006  simonb Sync with head.
 1.54.4.1 09-Sep-2006  rpaulo sync with head
 1.54.2.1 01-Mar-2006  yamt sync with head.
 1.55.2.1 11-Aug-2006  yamt sync with head
 1.56.6.1 23-Sep-2006  yamt implement splraiseipl for pmax.
 1.56.4.1 12-Jan-2007  ad Sync with head.
 1.57.30.2 18-Feb-2008  mjf Sync with HEAD.
 1.57.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.57.24.2 23-Mar-2008  matt sync with HEAD
 1.57.24.1 09-Jan-2008  matt sync with HEAD
 1.57.22.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.57.6.1 03-Dec-2007  ad Sync with HEAD.
 1.58.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.59.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.59.2.1 24-Mar-2008  keiichi sync with head.
 1.60.22.4 29-Dec-2010  matt Add sr_map entry for IPL_DDB.
Make 3max 64bit clean.
 1.60.22.3 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.60.22.2 01-Feb-2010  matt Update to reflect mips tree changes.
 1.60.22.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.60.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.60.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.60.4.3 11-Mar-2010  yamt sync with head
 1.60.4.2 19-Aug-2009  yamt sync with head.
 1.60.4.1 04-May-2009  yamt sync with head.
 1.66.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.66.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.66.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.66.4.2 21-Apr-2011  rmind sync with head
 1.66.4.1 05-Mar-2011  rmind sync with head
 1.71.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.71.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.71.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.71.2.1 30-Oct-2012  yamt sync with head
 1.72.2.1 18-May-2014  rmind sync with head
 1.73.30.1 10-Jun-2019  christos Sync with HEAD
 1.73.28.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.73.22.1 23-Sep-2018  martin Pull up following revision(s) (requested by tsutsui in ticket #1033):

sys/arch/pmax/pmax/dec_3min.c: revision 1.74

Fix hangup after framebuffers are attached on 3MIN. PR port-pmax/53611

Ok'ed by mrg@. Should be pulled up to netbsd-7 and netbsd-8.
 1.73.4.1 30-Oct-2018  sborrill Pull up the following revisions(s) (requested by tsutsui in ticket #1641):
sys/arch/pmax/pmax/dec_3min.c: revision 1.74

Fix hangup after framebuffers are attached on 3MIN.
Addresses PR port-pmax/53611
 1.48 24-Mar-2014  christos use cpu_{g,s}etmodel
 1.47 13-Oct-2012  tsutsui branches: 1.47.2;
struct device * -> device_t, use device_xname() (from chs@)
 1.46 09-Jul-2011  matt branches: 1.46.2; 1.46.12;
Cleanu <machine/*> includes
 1.45 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.44 20-Jul-2009  tsutsui branches: 1.44.4; 1.44.6; 1.44.8;
KNF, ANSIfy, and misc cosmetics.
 1.43 16-Mar-2009  dsl ANSIfy functions with function-pointer arguments
 1.42 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.41 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.40 03-Dec-2007  ad branches: 1.40.18; 1.40.26; 1.40.32; 1.40.36;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.39 21-Dec-2006  yamt branches: 1.39.6; 1.39.22; 1.39.24; 1.39.30;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.38 29-Jul-2006  ad branches: 1.38.4; 1.38.6;
Remove RASTERCONSOLE support from the pmax port.
 1.37 24-Dec-2005  perry branches: 1.37.4; 1.37.8;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.36 11-Dec-2005  christos merge ktrace-lwp.
 1.35 11-Jan-2005  simonb branches: 1.35.10;
Switch from intrcnt interrupt account to event counters.
 1.34 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.33 18-Sep-2001  tsutsui branches: 1.33.4; 1.33.10; 1.33.22;
Initalize -> Initialize
 1.32 27-Aug-2001  nisimura branches: 1.32.2;
Count and record memory error interrupts with evcnt(9).
 1.31 22-Aug-2001  nisimura Restore icsr value assignment op which was lost since r1.21.
 1.30 22-Aug-2001  nisimura NetBSD/pmax now has GENERIC_SOFT_INTERRUPTS.
 1.29 19-Jun-2001  wiz branches: 1.29.2;
`existent', not `existant'
 1.28 12-Apr-2001  thorpej splvec.splimp -> splvec.splvm
 1.27 11-Feb-2001  tsutsui branches: 1.27.2;
space/tab cosmetics
 1.26 06-Jun-2000  nisimura Make sure model specific cpu_intr() routines call _splset() as the last
action.
 1.25 11-Apr-2000  nisimura branches: 1.25.2;
Forgot to remove mips_hardware_intr global variable.
 1.24 11-Apr-2000  nisimura Change to have cpu_intr() peculiar to DECstations; have ssir global
variable and cpu_intr() body in machdep.c. Reorder and rename
model specific interrupt handler arguments. Fixup machine/intr.h and
machine/cpu.h appropriately.
 1.23 06-Mar-2000  mhitch A common device_register() is used instead of a separate version for each
of the different DECstation models.
 1.22 04-Mar-2000  nisimura Fix mipsmate SCSI lossage made by my previous change.
 1.21 29-Feb-2000  nisimura - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.20 03-Feb-2000  nisimura Nuke mistakenly introduced #include "rasterconsole.h".
 1.19 03-Feb-2000  nisimura - Massive change of console initialization. Have each model its own
consinit().
- Fix fbconnect() and relatives; 'struct fbinfo' is initialized only once,
making sure no extraneous console resolution message is emitted.
 1.18 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.17 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.16 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.15 08-Jan-2000  simonb Function prototype cleanup.
 1.14 03-Dec-1999  nisimura Cleanup rambling codes.
 1.13 25-Nov-1999  simonb Move memory sizing to a new function memsize_scan(), and add an empty
stub for memsize_bitmap() to use the PROM bitmap for memory information.
Add a memsize function pointer to the platform structure, and make all
existing DECstation models use memsize_scan() for now.

Interestingly, from the Ultrix cpuconf.{c,h} only the 3100 and 5400 use
a memory scan to determine available memory - all other models use the
PROM bitmap...
 1.12 19-Nov-1999  simonb Remove function declarations already declared in ibusvar.h and
fix typo in dec_3100_intr_*() declarations.
 1.11 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.10 12-Nov-1999  nisimura - Arrange 'platform' struct to have clkread entry, which can interporate
HZ using high resolution timer circuit if available. Merge os_init
into the primary hardware initialization in sysinit[].init.
- Nuke an irrelevant attempt to disable RTC under splhigh condition.
- Make sure IOASIC DECstations accumulate device interrupt mask bits into
certain global variables.
- Have witchcrafts to issue ACK to RTC interrupt.
- Add a missing \n and a minor rearrangement in cpu.c
 1.9 08-Jun-1999  simonb branches: 1.9.2; 1.9.4; 1.9.8;
Include <pmax/pmax/machdep.h> instead of declaring our own prom_*()
prototypes.
 1.8 26-May-1999  nisimura - Continue on branch merge, incrementally.
- Catch up filename changes escaped to be fixed.
 1.7 25-May-1999  nisimura - Rework spl(9) implementation. Use _spl*() processor mask manipulating
routines now reside in locore.S. No functional difference is expected.
- Replace abused splx() abuse with _splset() to change MIPS processor
interrupt mask bit. 'mips/trap.c' side will be fixed soon.
 1.6 26-Apr-1999  nisimura - Sweep machdep.c; mostly imported from a development branch. Little
exposure of TC device any more. Correct comments which are no longer
feasible. Reorder declarations and definitions. Introduce 'clkread'
pointer to pull up model dependent high resolution timer value. Have
prom_systype() call.
- Place routines for model dependent high resolution timer.
- Program IOASIC registers inside os_init() call and nuke ioasic_init().
 1.5 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.4 15-Mar-1999  nisimura branches: 1.4.4;
- 'DECstation 5100' -> 'DECsysytem 5100'.
 1.3 29-Nov-1998  jonathan Read icsr in interrupt handler (from development tree).
 1.2 27-Apr-1998  simonb branches: 1.2.4;
Pull in declaration for the variable "cold" in dec_5100_memintr().
 1.1 19-Apr-1998  jonathan Decsystem 5100 (aka mipsmate aka kn230) support:
* dec_5100.c: sysconf, interrupt, and motherboard (drain writebuffer)
support for 5100.
* support for hardware kludge in 5100: sii DMA buffer is hardware
padded to alternate 32-bit words, not alternating 16-bit halfwords.
* 5100 has no framebuffer, console is wired to serial port 0.

With ibus support, boots as far as exec'ing init, and hangs.
 1.2.4.18 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.2.4.17 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.2.4.16 06-Dec-1999  nisimura Sync w/ recent changes in main trunk.
 1.2.4.15 30-Nov-1999  nisimura Synchronize them w/ recent changes in main trunk and sweep bozos I made.
 1.2.4.14 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.2.4.13 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.2.4.12 11-Jun-1999  nisimura - Fix typos I made.
 1.2.4.11 11-Jun-1999  nisimura - Rework DECstation spl(9).
 1.2.4.10 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.2.4.9 11-May-1999  nisimura - Correct the case analysis error in ibus_pmax.c
- Now about to remove #if NTC > 0 in mainbus.c
 1.2.4.8 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.2.4.7 26-Apr-1999  nisimura - Arrange interrupt handler vectors initialized inside configure().
- Sweep jobs in machdep.c, and other model dependent files.
 1.2.4.6 15-Mar-1999  nisimura - Sync. w/ main trunk.
- Remove unnecessary includes.
 1.2.4.5 15-Mar-1999  nisimura - Call platform specific write buffer drain routine directly.
 1.2.4.4 23-Oct-1998  nisimura - Minor modifications for NWSCONS dc7085 kbd support.
 1.2.4.3 21-Oct-1998  nisimura - Add symbolic definitions for DC7085 quad line UART hardware registers.
- Pay more attention to provide "No framebuffer device configured" message
in the case of kernel with either no NWSCONS or unsupported TC option is
booted from bitmap console.
- A little progress in dc.c preparing for dckbd.c.
 1.2.4.2 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.2.4.1 15-Oct-1998  nisimura - NWSCONS cnattach() hooks at platform.cons_init for various DECstations.
- iplmask[] accumulation in autoconf.c.
- codes to identify booting disk looking at ULTRIX rz name.
- MI SCSI entries at cdevsw[]/bdevsw[].
- revised readdisklabel() with ULTRIX disklabel support.
 1.4.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.9.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.4.1 15-Nov-1999  fvdl Sync with -current
 1.9.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.9.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.9.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.25.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.27.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.29.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.29.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.29.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.32.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.33.22.4 17-Jan-2005  skrll Sync with HEAD.
 1.33.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.33.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.33.22.1 03-Aug-2004  skrll Sync with HEAD
 1.33.10.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.33.4.2 18-Sep-2001  tsutsui Initalize -> Initialize
 1.33.4.1 18-Sep-2001  tsutsui file dec_5100.c was added on branch nathanw_sa on 2001-09-18 16:15:21 +0000
 1.35.10.3 07-Dec-2007  yamt sync with head
 1.35.10.2 30-Dec-2006  yamt sync with head.
 1.35.10.1 21-Jun-2006  yamt sync with head.
 1.37.8.1 11-Aug-2006  yamt sync with head
 1.37.4.1 09-Sep-2006  rpaulo sync with head
 1.38.6.1 23-Sep-2006  yamt implement splraiseipl for pmax.
 1.38.4.1 12-Jan-2007  ad Sync with head.
 1.39.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.39.24.1 09-Jan-2008  matt sync with HEAD
 1.39.22.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.39.6.1 03-Dec-2007  ad Sync with HEAD.
 1.40.36.2 29-Dec-2010  matt Add sr_map entry for IPL_DDB.
Make 3max 64bit clean.
 1.40.36.1 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.40.32.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.40.26.1 28-Apr-2009  skrll Sync with HEAD.
 1.40.18.2 19-Aug-2009  yamt sync with head.
 1.40.18.1 04-May-2009  yamt sync with head.
 1.44.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.44.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.44.4.1 05-Mar-2011  rmind sync with head
 1.46.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.46.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.46.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.46.2.1 30-Oct-2012  yamt sync with head
 1.47.2.1 18-May-2014  rmind sync with head
 1.4 21-May-1999  nisimura - Rename file names;
dec_3max_subr.c -> memc_3max.c, dec_kn02_subr.c -> memc_3min.c
 1.3 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.2 25-Mar-1999  simonb branches: 1.2.4;
Remove trailing whitespace.
 1.1 25-Mar-1998  jonathan branches: 1.1.4;
Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.1.4.3 21-May-1999  nisimura - Renamed and vanished.
 1.1.4.2 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.1.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.2.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.2 21-May-1999  nisimura - Rename file names;
dec_3max_subr.c -> memc_3max.c, dec_kn02_subr.c -> memc_3min.c
 1.1 25-Mar-1998  jonathan branches: 1.1.4; 1.1.12;
Declarations for shared 3min/maxine memory handler.
 1.1.12.1 21-Jun-1999  thorpej Sync w/ -current.
 1.1.4.2 21-May-1999  nisimura - Renamed and vanished.
 1.1.4.1 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.65 24-Mar-2014  christos use cpu_{g,s}etmodel
 1.64 13-Oct-2012  tsutsui branches: 1.64.2;
struct device * -> device_t, use device_xname() (from chs@)
 1.63 09-Jul-2011  matt branches: 1.63.2; 1.63.12;
Cleanu <machine/*> includes
 1.62 03-Apr-2011  mhitch Fix pmax timecounters for mips3-class machines. Apparently no one else
has run a 5000/150 with 5.0 or later - I booted 5.0 a couple of time, but
clamd caused a hard hang. Now that I've given up trying to run clamd on
my 5000/150, I noticed that time ran too fast while using the
mips3_cp0_counter source. The cpu_mhz computed in mc_cpuspeed is the
CP0 clock speed, not the doubled CPU clock. Also add the mips3_cp0_counter
timecounters for the 5000/50 (maxine) and 5000/260 (3maxplus).
 1.61 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.60 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.59 14-Dec-2009  matt branches: 1.59.4; 1.59.6; 1.59.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.58 20-Jul-2009  tsutsui KNF, ANSIfy, and misc cosmetics.
 1.57 20-Jul-2009  tsutsui Sprinkle keyword volatile around device register accesses.
 1.56 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.55 16-Mar-2009  dsl ANSIfy functions with function-pointer arguments
 1.54 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.53 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.52 03-Jan-2008  joerg branches: 1.52.10; 1.52.18; 1.52.24; 1.52.28;
Timecounter and generic todr support for pmax. From Garret D'Amore.
 1.51 03-Dec-2007  ad branches: 1.51.6;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.50 21-Dec-2006  yamt branches: 1.50.6; 1.50.22; 1.50.24; 1.50.30;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.49 29-Jul-2006  ad branches: 1.49.4; 1.49.6;
Remove RASTERCONSOLE support from the pmax port.
 1.48 25-Feb-2006  wiz branches: 1.48.2;
Fix some typos.
 1.47 24-Dec-2005  perry branches: 1.47.2; 1.47.4; 1.47.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.46 11-Dec-2005  christos merge ktrace-lwp.
 1.45 11-Jan-2005  simonb branches: 1.45.10;
Switch from intrcnt interrupt account to event counters.
 1.44 02-Jan-2005  mhitch For Maxine serial console on a WSCONS kernel, use the correct channel
number.
 1.43 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.42 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.41 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.40 18-Sep-2001  tsutsui branches: 1.40.4; 1.40.10; 1.40.22;
Initalize -> Initialize
 1.39 27-Aug-2001  nisimura branches: 1.39.2;
Count and record memory error interrupts with evcnt(9).
 1.38 24-Aug-2001  mhitch Use the PROM bitmap, if available, to determine available memory. Also
add support of multiple memory segments so machines that allow mixed
memory sizes can utilize all available memory.
 1.37 22-Aug-2001  nisimura NetBSD/pmax now has GENERIC_SOFT_INTERRUPTS.
 1.36 12-Apr-2001  thorpej branches: 1.36.2;
splvec.splimp -> splvec.splvm
 1.35 11-Feb-2001  tsutsui branches: 1.35.2;
space/tab cosmetics
 1.34 06-Jun-2000  nisimura Make sure model specific cpu_intr() routines call _splset() as the last
action.
 1.33 28-May-2000  gmcgarry Nuke IOASIC_INTR_ISDN which is for sample interrupts.
 1.32 02-May-2000  augustss branches: 1.32.2;
Add am7930 audio driver.
 1.31 11-Apr-2000  nisimura Forgot to remove mips_hardware_intr global variable.
 1.30 11-Apr-2000  nisimura Change to have cpu_intr() peculiar to DECstations; have ssir global
variable and cpu_intr() body in machdep.c. Reorder and rename
model specific interrupt handler arguments. Fixup machine/intr.h and
machine/cpu.h appropriately.
 1.29 06-Mar-2000  mhitch A common device_register() is used instead of a separate version for each
of the different DECstation models.
 1.28 29-Feb-2000  nisimura - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.27 09-Feb-2000  nisimura Missing commit to reflect ioasicreg.h merge.
 1.26 03-Feb-2000  nisimura - Massive change of console initialization. Have each model its own
consinit().
- Fix fbconnect() and relatives; 'struct fbinfo' is initialized only once,
making sure no extraneous console resolution message is emitted.
 1.25 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.24 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.23 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.22 08-Jan-2000  simonb Function prototype cleanup.
 1.21 03-Dec-1999  nisimura Cleanup rambling codes.
 1.20 28-Nov-1999  simonb Don't use magic numbers! Use XINE_REG_IMSK and KMIN_REG_IMSK.
 1.19 25-Nov-1999  simonb Move memory sizing to a new function memsize_scan(), and add an empty
stub for memsize_bitmap() to use the PROM bitmap for memory information.
Add a memsize function pointer to the platform structure, and make all
existing DECstation models use memsize_scan() for now.

Interestingly, from the Ultrix cpuconf.{c,h} only the 3100 and 5400 use
a memory scan to determine available memory - all other models use the
PROM bitmap...
 1.18 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.17 12-Nov-1999  nisimura - Arrange 'platform' struct to have clkread entry, which can interporate
HZ using high resolution timer circuit if available. Merge os_init
into the primary hardware initialization in sysinit[].init.
- Nuke an irrelevant attempt to disable RTC under splhigh condition.
- Make sure IOASIC DECstations accumulate device interrupt mask bits into
certain global variables.
- Have witchcrafts to issue ACK to RTC interrupt.
- Add a missing \n and a minor rearrangement in cpu.c
 1.16 10-Jun-1999  nisimura branches: 1.16.2; 1.16.4; 1.16.8;
- Correct errorneous comments for kn*_wbflush() routines.
 1.15 08-Jun-1999  simonb Include <pmax/pmax/machdep.h> instead of declaring our own prom_*()
prototypes.
 1.14 26-May-1999  nisimura - Continue on branch merge, incrementally.
- Catch up filename changes escaped to be fixed.
 1.13 25-May-1999  nisimura - Continue to import a development branch.
- Minor formatting fix.
 1.12 25-May-1999  nisimura - Rework spl(9) implementation. Use _spl*() processor mask manipulating
routines now reside in locore.S. No functional difference is expected.
- Replace abused splx() abuse with _splset() to change MIPS processor
interrupt mask bit. 'mips/trap.c' side will be fixed soon.
 1.11 21-May-1999  nisimura - Rename file names;
dec_3max_subr.c -> memc_3max.c, dec_kn02_subr.c -> memc_3min.c
 1.10 26-Apr-1999  nisimura - Forgot to commit these two.
 1.9 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.8 25-Mar-1999  simonb branches: 1.8.4;
Remove trailing whitespace.
 1.7 02-Mar-1999  jonathan Do callouts for IOCTL asic lance interrupts before SCSI callouts.
 1.6 22-Jun-1998  jonathan branches: 1.6.4;
* Garbage-collect ancient 4.4bsd model-specific aliases for
ioctl asic interrupt masks.
* include sys/dev/tc/ioasicreg.h, not pmax asic.h (as prep for merge).
 1.5 30-Mar-1998  jonathan Move sprintf() of model string after call to model-specific *_os_init()
routine, so that cpu_mhz is set.
 1.4 26-Mar-1998  jonathan * Create /sys/arch/mips/include/intr.h, with extern declaration of
interrupt-callout vector from mips locore dispatch code to port code.
* Move branch-emulation declaration to mips/include/trap.h.
* Garbage-collect pmax/pmax/trap.h.
Not needed now pmax/pmax_trap.c is gone, and after above tidy-up.
 1.3 26-Mar-1998  thorpej Set cpu_model in the dec_foo_init() functions, make them consistent and
descriptive, and print the model before reporting physical memory size.
 1.2 25-Mar-1998  jonathan * Use new defopt model-specific options and opt files.
Replace all DS5000_* and DS3100 ifdefs with ifdefs on DEC_ options.
* Use MI declarations, not pmax-specific, in model-specific init
that uses baseboard (ioasic) registers.
* Further cleanup of machdep.c. Clock-tick still needs more thought.
* Use 'ibus' names for 3100 baseboard devices in MI code.
 1.1 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.6.4.19 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.6.4.18 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.6.4.17 06-Dec-1999  nisimura Sync w/ recent changes in main trunk.
 1.6.4.16 30-Nov-1999  nisimura Synchronize them w/ recent changes in main trunk and sweep bozos I made.
 1.6.4.15 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.6.4.14 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.6.4.13 13-Aug-1999  nisimura - Resolve code inconsistency.
 1.6.4.12 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.6.4.11 26-May-1999  nisimura - Track changes in main trunk.
 1.6.4.10 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.6.4.9 26-Apr-1999  nisimura - Arrange interrupt handler vectors initialized inside configure().
- Sweep jobs in machdep.c, and other model dependent files.
 1.6.4.8 03-Apr-1999  nisimura - Use 'dev/tc/ioasicvar.h'.
 1.6.4.7 03-Apr-1999  nisimura - Make sure to fall back to serial console when 'xcfb' is not configured.
 1.6.4.6 29-Mar-1999  nisimura - Catch up to recent changes in main trunk.
- Reorganize various #include's.
- Yield memcpy to Mach derivated one.
- pm_cnattach() now checks the existense of framebuffer card.
 1.6.4.5 18-Mar-1999  nisimura - Arrange how IOASIC device interrupts are served.
- Fix a bozo I made in 3MIN TC processing.
- Change 3MAX interrupt processing like as ULTRIX does.
- Clean up IOASIC a bit.
 1.6.4.4 15-Mar-1999  nisimura - Decouple "ibus" from TC device implementation.
- Move IOASIC initialization to platform.os_init().
 1.6.4.3 21-Oct-1998  nisimura - Add symbolic definitions for DC7085 quad line UART hardware registers.
- Pay more attention to provide "No framebuffer device configured" message
in the case of kernel with either no NWSCONS or unsupported TC option is
booted from bitmap console.
- A little progress in dc.c preparing for dckbd.c.
 1.6.4.2 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.6.4.1 15-Oct-1998  nisimura - NWSCONS cnattach() hooks at platform.cons_init for various DECstations.
- iplmask[] accumulation in autoconf.c.
- codes to identify booting disk looking at ULTRIX rz name.
- MI SCSI entries at cdevsw[]/bdevsw[].
- revised readdisklabel() with ULTRIX disklabel support.
 1.8.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.16.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.16.4.1 15-Nov-1999  fvdl Sync with -current
 1.16.2.3 21-Apr-2001  bouyer Sync with HEAD
 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.32.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.35.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.36.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.36.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.36.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.39.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.40.22.4 17-Jan-2005  skrll Sync with HEAD.
 1.40.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.40.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.40.22.1 03-Aug-2004  skrll Sync with HEAD
 1.40.10.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.40.4.2 18-Sep-2001  tsutsui Initalize -> Initialize
 1.40.4.1 18-Sep-2001  tsutsui file dec_maxine.c was added on branch nathanw_sa on 2001-09-18 16:15:21 +0000
 1.45.10.4 21-Jan-2008  yamt sync with head
 1.45.10.3 07-Dec-2007  yamt sync with head
 1.45.10.2 30-Dec-2006  yamt sync with head.
 1.45.10.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 01-Mar-2006  yamt sync with head.
 1.48.2.1 11-Aug-2006  yamt sync with head
 1.49.6.1 23-Sep-2006  yamt implement splraiseipl for pmax.
 1.49.4.1 12-Jan-2007  ad Sync with head.
 1.50.30.2 18-Feb-2008  mjf Sync with HEAD.
 1.50.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.50.24.1 09-Jan-2008  matt sync with HEAD
 1.50.22.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.50.6.1 03-Dec-2007  ad Sync with HEAD.
 1.51.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.52.28.4 29-Dec-2010  matt Add sr_map entry for IPL_DDB.
Make 3max 64bit clean.
 1.52.28.3 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.52.28.2 01-Feb-2010  matt Update to reflect mips tree changes.
 1.52.28.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.52.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.52.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.52.10.3 11-Mar-2010  yamt sync with head
 1.52.10.2 19-Aug-2009  yamt sync with head.
 1.52.10.1 04-May-2009  yamt sync with head.
 1.59.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.59.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.59.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.59.4.2 21-Apr-2011  rmind sync with head
 1.59.4.1 05-Mar-2011  rmind sync with head
 1.63.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.63.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 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.64.2.1 18-May-2014  rmind sync with head
 1.56 15-Dec-2019  martin Disable (pretty useless and obscure) message when checking for Ultrix
comaptible labels.
 1.55 03-Apr-2019  christos branches: 1.55.4;
centralize setdisklabel(9)
 1.54 20-Feb-2011  matt branches: 1.54.56;
Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.53 20-Jul-2009  tsutsui branches: 1.53.4; 1.53.6; 1.53.8;
KNF, ANSIfy, and misc cosmetics.
 1.52 16-Mar-2009  dsl ANSIfy functions with function-pointer arguments
 1.51 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.50 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.49 15-Nov-2008  ad branches: 1.49.4;
No point wrapping the Ultrix disklabel stuff in COMPAT_ULTRIX
 1.48 02-Jan-2008  ad branches: 1.48.6; 1.48.10; 1.48.16; 1.48.18; 1.48.24;
Merge vmlocking2 to head.
 1.47 17-Oct-2007  garbled branches: 1.47.2; 1.47.4; 1.47.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.46 08-Oct-2007  ad Merge brelse() changes from the vmlocking branch.
 1.45 06-Mar-2007  simonb branches: 1.45.2; 1.45.10; 1.45.18; 1.45.20; 1.45.22;
Fix some caddr_t rototill fallout.

Some from Erik Bertelsen on port-pmax@.
 1.44 25-Nov-2006  scw branches: 1.44.4;
Replace the myriad copies of bounds_check_with_label() with a single MI
version.

Add disk_blocksize(9) so that disk drivers can record the physical
block size of a disk if it is different to DEV_BSIZE. Right now this
simply initialises dk_blkshift and dk_byteshift according to the
supplied block size. This information is used in the MI version of
bounds_check_with_label().
 1.43 11-Dec-2005  christos branches: 1.43.20; 1.43.22;
merge ktrace-lwp.
 1.42 01-Jun-2005  drochner branches: 1.42.2;
more cast-qual fallout
 1.41 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.40 15-Jul-2003  lukem __KERNEL_RCSID()
 1.39 10-May-2003  thorpej branches: 1.39.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.38 02-May-2003  dsl Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
 1.37 02-Apr-2003  drochner SBSIZE->SBLOCKSIZE (who cares about d_sbsize anyway?)
 1.36 05-Mar-2002  simonb Don't cast argument to ffs() to long.
Per discussion on port-alpha, noticed by Robert Elz.
 1.35 19-Feb-2002  wiz strategy should have an 'r'. Inspired by similar change in OpenBSD.
 1.34 20-Nov-2000  chs branches: 1.34.2; 1.34.4; 1.34.8;
rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
 1.33 16-Jun-2000  matt Use <dev/dec/dec_boot.h> instead of <machine/dec_boot.h>
 1.32 19-May-2000  thorpej branches: 1.32.2;
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.31 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.30 07-Mar-2000  tsutsui Use DISKPART/DISKMINOR/DISKUNIT instead of dkpart/dkminor/dkunit.
 1.29 06-Mar-2000  mhitch Move the now emptry dk_establish() back to disksubr.c where it originally was.
 1.28 03-Mar-2000  mhitch Do the Ultrix label check in readdisklabel() instead of in rz.c. Ultrix
disks are now usable with the MI SCSI sd devices.
The install mini-root adjustment and the default partitioning still needs
to be moved into readdisklabel().
 1.27 19-Feb-2000  nisimura Introduce MI SCSI codes; for DECstation 5000s only this moment and
disabled by default.
 1.26 18-Jan-2000  thorpej Use b_cylinder as defined in sys/buf.h
 1.25 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.24 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.23 08-Jan-2000  simonb Function prototype cleanup.
 1.22 28-Nov-1999  simonb Check bounds against RAW_PART instead of partition 0.
 1.21 25-Oct-1999  simonb Begone with some garish Mach_StructureNames.
Add a comment about the bootblock structure.
 1.20 24-Apr-1999  simonb branches: 1.20.2; 1.20.4; 1.20.6;
Nuke register and remove trailling white space.
 1.19 25-Mar-1999  simonb branches: 1.19.4;
Remove trailing whitespace.
 1.18 29-Jan-1999  simonb Include dec_{boot,exec,prom}.h from <machine/...>, not <stand/libsa/...>
 1.17 27-Jan-1999  simonb Change location of pmax/stand/*.h include files to pmax/stand/libsa/*.h
My bad - wasn't expecting the kernel proper to pull stuff in from stand...
 1.16 29-Aug-1998  mrg branches: 1.16.2;
register -> int or nothing & egcs warnings cleanup.
 1.15 25-Jun-1998  thorpej defopt COMPAT_ULTRIX
 1.14 15-Jan-1997  jonathan branches: 1.14.12;
Use <> not "" #include path for pmax/stand/dec_boot.h.
 1.13 13-Oct-1996  christos branches: 1.13.2;
backout previous kprintf change
 1.12 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.11 21-Sep-1996  jonathan Add prototype for function-pointer argument "strat" in definition of
readdisklabel(), writedisklabel(), and compatdisklabel().
 1.10 19-May-1996  jonathan make dk_establish() return type be void, not int.
 1.9 10-Apr-1996  jonathan Fixes for -Wall -Wmissing-prototypes:

Add prototypes to (most of) src/sys/arch/pmax/pmax. (The un-protytyped
parts still have pending merges with the Pica port.)
Fix splx() glitches in pmax/clock.c.
Delete old cpu/fpu identification from pmax/autoconf.c, use r4400/r4600/idt
aware code from Pica port, now in mips/mips/mips_machdep.c.
Delete unused multi-CPU autoconfiguration code; NetBSD/pmax does not
support decsystem 5800s anyway.
 1.8 02-Feb-1996  mycroft Fix #includes.
 1.7 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.6 04-Aug-1995  jonathan Add dk_establish() and bounds_check_with_label(), from the alpha port, for
the machine-independent SCSI driver. Untested.

Only print diagnostics about reading Ultrix labels when DIAGNOSTIC is defined.
 1.5 14-Jul-1995  jonathan Clean up Ultrix compatiblity code: redo Ultrix label reading code
to have the same interface as native readdisklabel(), call it cleanly
from caller of readdisklabel(), and fix bug that left d_npartitions at 1
for ultrix-compat labels. Ultrix labels now actually work.
 1.4 28-Nov-1994  dean some fixes and Ultrix compat stuff from Jonathan Stone.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.1 15-Jan-1994  deraadt new; pretty much straight from net/2
 1.13.2.1 18-Jan-1997  thorpej Update from trunk.
 1.14.12.1 04-Feb-1999  cgd pull up rev 1.17 from trunk (simonb)
 1.16.2.5 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.16.2.4 09-Dec-1999  drochner -improve faking up a disklabel from an ULTRIX partition table: use correct
checksum (magic is set by the disk driver(s?)) and mark the label as
"ULTRIX native"
-correct upper bound for number of partitions - in case we get a larger
MAXPARTITIONS ever
 1.16.2.3 28-Jan-1999  nisimura - Fix errors in reading ULTRIX disklabel. Tested and comfirmed to work.
 1.16.2.2 14-Nov-1998  drochner fix egcs warnings, nuke "register" attribute
 1.16.2.1 15-Oct-1998  nisimura - NWSCONS cnattach() hooks at platform.cons_init for various DECstations.
- iplmask[] accumulation in autoconf.c.
- codes to identify booting disk looking at ULTRIX rz name.
- MI SCSI entries at cdevsw[]/bdevsw[].
- revised readdisklabel() with ULTRIX disklabel support.
 1.19.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.20.6.2 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.20.6.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.20.4.1 15-Nov-1999  fvdl Sync with -current
 1.20.2.2 22-Nov-2000  bouyer Sync with HEAD.
 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.32.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.34.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.34.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.34.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.34.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.39.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.39.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.39.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.39.2.1 03-Aug-2004  skrll Sync with HEAD
 1.42.2.4 21-Jan-2008  yamt sync with head
 1.42.2.3 27-Oct-2007  yamt sync with head.
 1.42.2.2 03-Sep-2007  yamt sync with head.
 1.42.2.1 30-Dec-2006  yamt sync with head.
 1.43.22.1 10-Dec-2006  yamt sync with head.
 1.43.20.1 12-Jan-2007  ad Sync with head.
 1.44.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.45.22.1 14-Oct-2007  yamt sync with head.
 1.45.20.2 09-Jan-2008  matt sync with HEAD
 1.45.20.1 06-Nov-2007  matt sync with HEAD
 1.45.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.45.10.1 16-Oct-2007  garbled Sync with HEAD
 1.45.2.3 03-Dec-2007  ad Sync with HEAD.
 1.45.2.2 18-Oct-2007  ad Update for buffer cache locking changes.
 1.45.2.1 15-Jul-2007  ad Get pmax working.
 1.47.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.47.4.1 31-Dec-2007  ad Make compile with new buffer cache locking scheme.

XXX This should be largely MI, please do not make another clone of disksubr.c.
 1.47.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.48.24.1 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.48.18.2 28-Apr-2009  skrll Sync with HEAD.
 1.48.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.48.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.48.10.2 19-Aug-2009  yamt sync with head.
 1.48.10.1 04-May-2009  yamt sync with head.
 1.48.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.49.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.53.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.53.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.53.4.1 05-Mar-2011  rmind sync with head
 1.54.56.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.54.56.1 10-Jun-2019  christos Sync with HEAD
 1.55.4.1 17-Dec-2019  msaitoh Pull up following revision(s) (requested by martin in ticket #559):
sys/arch/pmax/pmax/disksubr.c: revision 1.56
Disable (pretty useless and obscure) message when checking for Ultrix
comaptible labels.
 1.2 26-Mar-1996  jonathan Remove src/sys/arch{pmax/pmax,pica/pica}cpu_exec.c; no significant differences,
or for which the Pica port is an older revision of the pmax branch.

A merged version with the NetBSD/pmax revision history is in mips/mips/.
cpu_exec.c
elf.c
mem.c
process_machdep.c
 1.1 18-Jan-1995  mellon Support for loading ELF on NetBSD/pmax - to be combined with elf loader under sys/compat later
 1.9 16-Jun-1997  jonathan Remove. Already copied to arch/mips/mips/fp.S.
 1.8 15-Dec-1994  mycroft More underscores...
 1.7 15-Dec-1994  mycroft Remove underscores from uses of *LEAF() and END(). Use _C_LABEL() in explicit
symbol references.
 1.6 23-Nov-1994  dean more underscore changes (from J. Stone)
 1.5 14-Nov-1994  dean Prepended underscores
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.6 21-Nov-1994  mycroft Clean up deleted files.
 1.5 14-Nov-1994  dean Prepended underscores
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.9 07-Apr-1996  jonathan Update arch/pmax/pmax/genassym.c to compile with -Wall: use offsetof().
Move to mips/pmax/genassym.c, as (most of) the assembler locore code is
being merged into a generic-MIPS locore.

Remove the redundant pmax/pmax/genassym.c.
 1.8 02-Feb-1996  mycroft Don't define _KERNEL here.
 1.7 16-May-1995  jtc Removing -DKERNEL, transition to _KERNEL has been completed
 1.6 28-Mar-1995  jtc Added #define _KERNEL
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.3 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.2 15-Oct-1993  deraadt update from rick, tarfile of Oct 11 10:46
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.19 09-Jul-2011  matt Cleanu <machine/*> includes
 1.18 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.17 20-Dec-2010  matt branches: 1.17.2; 1.17.4;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.16 14-Dec-2009  matt branches: 1.16.4;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.15 28-Apr-2008  martin branches: 1.15.18;
Remove clause 3 and 4 from TNF licenses
 1.14 06-Jan-2008  ad branches: 1.14.6; 1.14.8; 1.14.10;
Update curcpu()->ci_idepth, not the (left over) local.
 1.13 03-Dec-2007  ad branches: 1.13.6;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.12 21-Dec-2006  yamt branches: 1.12.6; 1.12.22; 1.12.24; 1.12.30;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.11 11-Dec-2005  christos branches: 1.11.20; 1.11.22;
merge ktrace-lwp.
 1.10 11-Jan-2005  simonb branches: 1.10.10;
Switch from intrcnt interrupt account to event counters.
 1.9 11-Jan-2005  simonb ANSIfy.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 25-May-2003  tsutsui branches: 1.7.2;
Switch to use mips/softintr.c for softintr(9).
 1.6 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.5 06-Jan-2003  wiz interrupt with two rs.
 1.4 07-Jul-2002  gmcgarry Don't invoke MachFPInterrupt() if we're using SOFTFLOAT.
 1.3 28-Sep-2001  chs branches: 1.3.4; 1.3.14;
don't depend on other headers to include sys/proc.h for us.
 1.2 27-Aug-2001  nisimura branches: 1.2.2;
Count and record memory error interrupts with evcnt(9).
 1.1 22-Aug-2001  nisimura branches: 1.1.2;
NetBSD/pmax now has GENERIC_SOFT_INTERRUPTS.
 1.1.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.4 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.1.2.1 22-Aug-2001  thorpej file interrupt.c was added on branch kqueue on 2001-08-25 06:15:45 +0000
 1.2.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.14.1 16-Jul-2002  gehenna catch up with -current.
 1.3.4.6 07-Jan-2003  thorpej Sync with HEAD.
 1.3.4.5 02-Aug-2002  gmcgarry LWPify.
 1.3.4.4 01-Aug-2002  nathanw Catch up to -current.
 1.3.4.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.3.4.2 15-Dec-2001  gmcgarry lwp'ify
 1.3.4.1 28-Sep-2001  gmcgarry file interrupt.c was added on branch nathanw_sa on 2001-12-15 07:11:01 +0000
 1.7.2.4 17-Jan-2005  skrll Sync with HEAD.
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.10.10.3 21-Jan-2008  yamt sync with head
 1.10.10.2 07-Dec-2007  yamt sync with head
 1.10.10.1 30-Dec-2006  yamt sync with head.
 1.11.22.1 23-Sep-2006  yamt implement splraiseipl for pmax.
 1.11.20.1 12-Jan-2007  ad Sync with head.
 1.12.30.2 18-Feb-2008  mjf Sync with HEAD.
 1.12.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.12.24.1 09-Jan-2008  matt sync with HEAD
 1.12.22.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.12.6.2 03-Dec-2007  ad Sync with HEAD.
 1.12.6.1 15-Jul-2007  ad Get pmax working.
 1.13.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.14.10.2 11-Mar-2010  yamt sync with head
 1.14.10.1 16-May-2008  yamt sync with head.
 1.14.8.1 18-May-2008  yamt sync with head.
 1.14.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.18.4 29-Dec-2010  matt Kill StudlyCaps
 1.15.18.3 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.15.18.2 05-Feb-2010  matt Change to deal with new method of invoking softints. Remove mips/softintr.c
from config files. Fix SYMTAB_SPACE for WGT62V43
 1.15.18.1 01-Feb-2010  matt Update to reflect mips tree changes.
 1.16.4.1 05-Mar-2011  rmind sync with head
 1.17.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.17.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8 16-Jan-2001  thorpej We haven't used the 4.4BSD kadb stuff for a long time; garbage
collect it.
 1.7 22-Feb-2000  soda clean up vm_{offset,size}_t, use {v,p}{addr,size}_t instead
 1.6 24-Apr-1999  simonb branches: 1.6.2;
Nuke register and remove trailling white space.
 1.5 22-Jun-1997  jonathan branches: 1.5.20;
* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.5.20.1 21-Jun-1999  thorpej Sync w/ -current.
 1.6.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 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 11-Dec-2005  christos merge ktrace-lwp.
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.8 29-Feb-2000  nisimura branches: 1.8.30;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.7 25-Mar-1999  simonb branches: 1.7.8;
Remove trailing whitespace.
 1.6 22-Jun-1998  jonathan branches: 1.6.4;
* Garbage-collect ancient 4.4bsd model-specific aliases for
ioctl asic interrupt masks.
* include sys/dev/tc/ioasicreg.h, not pmax asic.h (as prep for merge).
 1.5 31-Jan-1996  jonathan Resolve pmax and alpha IOCTL asic driver differences, pass 1:

Rename the ioctl asic register and slot macros from ASIC_<xxx> to
IOASIC_<xxx>, to be compatible with the machine-indpendent names in
sys/dev/tc/ioasicvar.h. The pmax code still uses
sys/arch/pmax/pmax/asic.h, as some of the registers and offsets
defined there are not yet defined in sys/dev/tc/ioasicvar.h.

Rename the ioctl asic base-address pointer from `asic_base' to `ioasic_base'.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.6.4.4 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.6.4.3 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.6.4.2 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.6.4.1 07-May-1999  nisimura - Synchronize with main trunk changes.
- Minor formatting nits in *.h files.
 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.8.30.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.30.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.30.1 03-Aug-2004  skrll Sync with HEAD
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.6 29-Feb-2000  nisimura branches: 1.6.30;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.5 25-Mar-1999  simonb branches: 1.5.8;
Remove trailing whitespace.
 1.4 26-Oct-1994  cgd branches: 1.4.22;
new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.4.22.3 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.4.22.2 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.4.22.1 07-May-1999  nisimura - Synchronize with main trunk changes.
- Minor formatting nits in *.h files.
 1.5.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.30.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.30.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.30.1 03-Aug-2004  skrll Sync with HEAD
 1.3 19-Apr-1998  jonathan Remove kn01var.h. Superseded by ibus.
 1.2 05-Jan-1998  perry RCSID Police.
 1.1 19-May-1996  jonathan Declarations for KN01 (Decstation/Decsystem 2100/3100) baseboard "bus".
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.8 29-Feb-2000  nisimura branches: 1.8.30;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.7 16-Aug-1999  simonb branches: 1.7.2;
Neaten up #defines for the CSR.

XXX: Still not sure if some of these are right.
 1.6 25-Mar-1999  simonb Remove trailing whitespace.
 1.5 29-Aug-1998  mrg branches: 1.5.2;
minor minor KNF nit.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.5.2.3 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.5.2.2 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.5.2.1 07-May-1999  nisimura - Synchronize with main trunk changes.
- Minor formatting nits in *.h files.
 1.7.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.8.30.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.30.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.30.1 03-Aug-2004  skrll Sync with HEAD
 1.13 22-Jun-2017  flxd spelling (DEC called it "TURBOchannel")
 1.12 11-Dec-2005  christos branches: 1.12.122; 1.12.142;
merge ktrace-lwp.
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.10 29-Feb-2000  nisimura branches: 1.10.30;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.9 16-Aug-1999  simonb branches: 1.9.2;
Remove bogus CSR #defines and replace with known ones.
 1.8 25-Mar-1999  simonb Add KN03_INTR_PROD_JUMPER (from Tohru Nishimura).
 1.7 25-Mar-1999  simonb Remove trailing whitespace.
 1.6 22-Jun-1998  jonathan branches: 1.6.4;
* Garbage-collect ancient 4.4bsd model-specific aliases for
ioctl asic interrupt masks.
* include sys/dev/tc/ioasicreg.h, not pmax asic.h (as prep for merge).
 1.5 31-Jan-1996  jonathan Resolve pmax and alpha IOCTL asic driver differences, pass 1:

Rename the ioctl asic register and slot macros from ASIC_<xxx> to
IOASIC_<xxx>, to be compatible with the machine-indpendent names in
sys/dev/tc/ioasicvar.h. The pmax code still uses
sys/arch/pmax/pmax/asic.h, as some of the registers and offsets
defined there are not yet defined in sys/dev/tc/ioasicvar.h.

Rename the ioctl asic base-address pointer from `asic_base' to `ioasic_base'.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.6.4.4 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.6.4.3 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.6.4.2 07-May-1999  nisimura - Synchronize with main trunk changes.
- Minor formatting nits in *.h files.
 1.6.4.1 29-Mar-1999  nisimura - Catch up to recent changes in main trunk.
- Reorganize various #include's.
- Yield memcpy to Mach derivated one.
- pm_cnattach() now checks the existense of framebuffer card.
 1.9.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.10.30.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.30.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.30.1 03-Aug-2004  skrll Sync with HEAD
 1.12.142.1 28-Aug-2017  skrll Sync with HEAD
 1.12.122.1 03-Dec-2017  jdolecek update from HEAD
 1.5 24-May-2024  rillig pmax/kn230.h: fix typos and spacing in comments
 1.4 23-May-2024  andvar s/separare/separate/ and s/separete/separate/ in comments.
 1.3 29-Sep-2002  wiz "definitions" has lots of 'i's, but that's not reason to leave one out.
 1.2 25-Mar-1999  simonb branches: 1.2.22; 1.2.26;
Remove trailing whitespace.
 1.1 19-Apr-1998  jonathan branches: 1.1.4;
Decsystem 5100 (aka mipsmate aka kn230) support:
* dec_5100.c: sysconf, interrupt, and motherboard (drain writebuffer)
support for 5100.
* support for hardware kludge in 5100: sii DMA buffer is hardware
padded to alternate 32-bit words, not alternating 16-bit halfwords.
* 5100 has no framebuffer, console is wired to serial port 0.

With ibus support, boots as far as exec'ing init, and hangs.
 1.1.4.3 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.1.4.2 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.1.4.1 07-May-1999  nisimura - Synchronize with main trunk changes.
- Minor formatting nits in *.h files.
 1.2.26.1 18-Oct-2002  nathanw Catch up to -current.
 1.2.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.23 13-Oct-1996  jonathan Remove sys/arch/pmax/pmax/{locore.S,trap.c}.
Use versions from sys/arch/mips/mips instead.
 1.22 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.21 19-May-1996  jonathan Add alternate "mips_r2000_<XXX>" entry points for the r2000/r3000-specific
locore functions. The new names are used by C code to construct a jump-table,.
making it less infeasible to have a single kernel image work on both
r3000 and r4000 systems.
 1.20 31-Mar-1996  jonathan merge mips and pica locore.S, pass 0:
* cut-and-paste all the code for both r2000 (MIPS-I) and r4000 (MIPS-III)
into both the pica and pmax locore.S.

* Change the names of the small segments of vector code that are
bcopied to the machine vector locations, to avoid clashing.
Get rid of the Sprite MachXXX names for the vector code, and
use use mips_r2000_xxx and mips_r4000_xxx instead.

Update the names used in the vector-copying code and trap handlers
to match.

* Most of the rest of the pica locore.S was copied from the pmax
locore.S, and then edited to work on an r4000. The names of
functions and of manifest constants stayed the same, although
both assmbler code and constant values changed.
cut-and-paste such code into contiguous blocks protected by
#if / #endif. Much of the cache and trap-handling code
needs r3000-only register fields, on the r3000, and r4000-only
insns and registers on the r4000.

* change the pmax r2000 exception-handling code to extract a trap
code with the user/kernel bit at 0x20 rather than 0x10.
(r2000s have 4-bit execption codes, r4000s have 5-bit.)
Use the a 16 from-user-space + 16-from-kernel space jump table,
just like on the r4000 pica port.

* add NOPs to the common code where required by the r4000 pipeline
constraints.
* add _C_LABEL() macros to the r4000 locore.

Comitted to provide a snapshot for others to test, and work on a cleaner merge.
 1.19 25-Mar-1996  jonathan Random additions from the Pica r4k port:

* Add spl4() and spl5() functions from the Pica port.
* Add MachFPTrap() as an alternate entry point for MachFPInterrupt.
The r4k reports floating-point execptions as a trap, not an interrupt,
and the Pica port uses the name MachFPTrap().
* Add nops to the Mach_spl?() functions and MachFPInterrupt, as required
for the r4k port.
Commit "floppy" interrupt counter for vmstat -i.
 1.18 04-Feb-1996  jonathan Redo the locore interrupt counters reported by vmstat -i:
* add a new enum decstation_intr_t to trap.c, naming each instrumented
interrupt symbolically, and used to index into intrcnt[]. Change the
model-specific interrupt handlers to use the decstation_intr_t when
updating interrupt counters.
* add instrumentation to the kmin and maxine interrupt handlers.
* fix a bug that counted each hardclock interrupts on the kn02 twice.

The hardcoded mapping from locore names to units is gross; but these
counters will hopefully be useful in identifying interrupt hot-spots
and PPP problems on the 3MIN.
 1.17 20-Dec-1995  jonathan Add support for ptrace PT_GETREGS and PT_SETREGS for NetBSD/pmax:
* define PT_GETREGS and PT_SETREGS in pmax/include/ptrace.h
* Flesh out the stubs in pmax/pmax/process_machdep.c to handle
those requests.
* Now that "struct reg" is actually used, remove the bogus
#ifdef LANGUAGE_C around its definition, and redo pmax/include/reg.h
so that the definitions needed by locore.S are in a separate file,
pmax/include/regnum.h.
* update locore.S to match.
 1.16 28-Sep-1995  jonathan Add a missing "nop" in a delay slot in the floating-point exception
handler. Gradual underflow and fp emulation now work correctly.
Proper denorms also fix strtod() inaccuracies and Gcc's "enquire" program.
 1.15 21-Sep-1995  jonathan Rename the force-all-pending-writes to memory function to wbflush().
Keep the old Mach-derived name "MachEmptyWriteBuffer()" as an alternate
entry point.
 1.14 13-Aug-1995  mycroft Add splsoftnet().
 1.13 05-May-1995  mellon Don't conditionalize utility routines based on DEBUG flag
 1.12 28-Apr-1995  jonathan Fix performance bug in pmax MachFlushDCache(). Old code disabled icache
and wasn't unrolled. This code runs cached and unrolled, giving an order
of magnitude improvement in some cases (e.g., DMA-capable network devices).
In use at Stanford DSG since late January 1995.
 1.11 28-Apr-1995  jonathan Check in changes suggested by Ralph Campbell: update variable names
to use turbochannel slot numbers, add a couple of extra slots, just
in case.
 1.10 09-Mar-1995  mycroft copy*str() should use size_t.
 1.9 18-Jan-1995  mellon Add conditional gp support; add interrupt disable before setting or clearing soft ints
 1.8 15-Dec-1994  mycroft Remove underscores from uses of *LEAF() and END(). Use _C_LABEL() in explicit
symbol references.
 1.7 23-Nov-1994  dean more underscore changes (from J. Stone)
 1.6 14-Nov-1994  dean Prepended underscores
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 25-Jun-1994  glass assembler problem
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.7 21-Nov-1994  mycroft Clean up deleted files.
 1.6 14-Nov-1994  dean Prepended underscores
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 25-Jun-1994  glass assembler problem
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.2 01-Mar-1995  mycroft Clean up deleted files.
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.26 05-Feb-2024  andvar s/bufffer/buffer/ in comments and log message.
 1.25 28-Mar-2011  tsutsui Use CALLFRAME_SP(sp) instead of CALLFRAME_S0(sp) to save s0.
At least PROM's _getenv() on 3MIN doesn't preserve CALLFRAME_S0(s0)
and prom_findcons() returns bogus console after mips64 merge.

XXX: I wonder if it's safe to use CALLFRAME_S0(sp) (== 0(sp)) on O32/O64..
 1.24 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.23 11-Dec-2005  christos branches: 1.23.92; 1.23.96; 1.23.100; 1.23.106; 1.23.108;
merge ktrace-lwp.
 1.22 31-May-2005  chs remove vestigal {,e}intr{names,cnt} symbols now that vmstat doesn't need them.
 1.21 11-Jan-2005  simonb Switch from intrcnt interrupt account to event counters.
 1.20 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.19 09-Jun-2003  simonb branches: 1.19.2;
Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.
 1.18 27-Aug-2001  nisimura branches: 1.18.6;
Count and record memory error interrupts with evcnt(9).
 1.17 26-Aug-2001  simonb Switch to MI SCSI and drop old pmax MD SCSI support completely.
 1.16 22-Aug-2001  nisimura Forgot to commit changes of intrcnt[] array and its indices.
 1.15 26-Jul-2000  ad branches: 1.15.4;
Remove unneeded include.
 1.14 24-Jul-2000  ad CopyToBuffer/CopyFromBuffer are used by sii/xsii and nothing else.
 1.13 10-Mar-2000  nisimura branches: 1.13.4;
Arrange 'vmstat -i' to show 'optslotN'; for interrupt counts of TC slot N
as well as DECsystem 5100 optional serial card slot N.
 1.12 25-May-1999  nisimura branches: 1.12.2;
- Rework spl(9) implementation. Use _spl*() processor mask manipulating
routines now reside in locore.S. No functional difference is expected.
- Replace abused splx() abuse with _splset() to change MIPS processor
interrupt mask bit. 'mips/trap.c' side will be fixed soon.
 1.11 07-May-1999  nisimura - Nuke '_splset' alternative entry point mistakenly added.
 1.10 27-Apr-1999  nisimura - Save Mach_splX() calls which don't fit well with DECstation. MIPS
spl machinary will be reworked, someday.
 1.9 25-Mar-1999  simonb branches: 1.9.4;
Remove trailing whitespace.
 1.8 11-Sep-1998  jonathan branches: 1.8.2;
Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.
 1.7 25-Aug-1998  nisimura Make spl(9) rountines target port dependent. delay() is also port
dependent anticipating a target with high resolution timer available
for on-the-fly re-programming. Enum decstation_t was removed from MI
trap.c.
 1.6 31-Mar-1998  jonathan Add writebuffer-flush for Decstation 5400, 5100 which use
coprocessor 3 for writebuffer control.
 1.5 25-Mar-1998  jonathan * Use new defopt model-specific options and opt files.
Replace all DS5000_* and DS3100 ifdefs with ifdefs on DEC_ options.
* Use MI declarations, not pmax-specific, in model-specific init
that uses baseboard (ioasic) registers.
* Further cleanup of machdep.c. Clock-tick still needs more thought.
* Use 'ibus' names for 3100 baseboard devices in MI code.
 1.4 15-Jun-1997  mhitch From Toru Nishimura: don't assemble pmax buffer copy routine if not
configured for DS2100/DS3100.
 1.3 22-Oct-1996  mhitch Add the missing ".set noreorder".
 1.2 30-Sep-1996  jonathan Include <mips/asm.h>, not the Sprite header names.
 1.1 30-Sep-1996  jonathan * Move Decstation-specific locore code (sii DMA copy, vmstat -i counters)
from arch/mips/mips/locore.S to arch/pmax/pmax/locore_machdep.S.
* Move ARC-specific locore code (vmstat -i counters) to
arch/pica/pica/locore_machdep.S.
* When the mips3 locore support is known to work, both ports can now use
arch/mips/mips/locore.S.
 1.8.2.5 12-Nov-1999  nisimura Sync. w/ main trunk changes.
 1.8.2.4 07-May-1999  nisimura - Synchronize with main trunk changes.
- Minor formatting nits in *.h files.
 1.8.2.3 28-Jan-1999  nisimura - Abandon returning 'MIPS_SR_INT_IE' bit of CP0 status register with
various _spl*() routines.
- cpuarch.h -> cpuregs.h
 1.8.2.2 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.8.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.9.4.1 21-Jun-1999  thorpej Sync w/ -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.13.4.1 26-Jul-2000  ad Pull up revisions 1.14, 1.15:
CopyToBuffer/CopyFromBuffer are used by sii/xsii and nothing else;
following from this, remove uneeded include.
 1.15.4.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.15.4.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.18.6.2 27-Aug-2001  nisimura Count and record memory error interrupts with evcnt(9).
 1.18.6.1 27-Aug-2001  nisimura file locore_machdep.S was added on branch nathanw_sa on 2001-08-27 02:00:20 +0000
 1.19.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.2.4 17-Jan-2005  skrll Sync with HEAD.
 1.19.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.19.2.1 03-Aug-2004  skrll Sync with HEAD
 1.23.108.1 05-Mar-2011  bouyer Sync with HEAD
 1.23.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.23.100.2 21-Apr-2011  rmind sync with head
 1.23.100.1 05-Mar-2011  rmind sync with head
 1.23.96.1 29-Dec-2010  matt Use a promcall wrapper function to call the prom. For non O32 systems
this will save and restore the callee saved registers since the 32-bit
prom probably won't be saving all 64bits.
 1.23.92.1 28-Mar-2011  jym Cure sync hiccups. Code with compile errors is not really useful, heh.
 1.256 05-Mar-2024  thorpej Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

It's a small step, but it's a step.
 1.255 15-Jan-2024  andvar Fix few typos in comments, mainly s/argment/argument/.
 1.254 28-Sep-2020  simonb Protect where the bootinfo esym value is less than the kernel "end"
symbol by setting the end of kernel marker to the greater of these
two values.
XXX: elf2ecoff bug??
 1.253 04-Sep-2020  skrll Fix build of INSTALL kernel which doesn't have DDB
 1.252 03-Sep-2020  simonb Make DDB "machine reset" call emulate pushing the HALT button.
Useful if DDB gets confused and "reboot" doesn't work.
 1.251 22-Dec-2016  cherry switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.250 01-Feb-2016  christos branches: 1.250.2;
PR/50737: David Binderman: Check bounds before dereferencing.
 1.249 30-Jun-2015  matt Use cpu_startup_common()
 1.248 24-Mar-2014  christos branches: 1.248.6;
use cpu_{g,s}etmodel
 1.247 10-Nov-2013  christos more unused variable fixes
 1.246 10-Nov-2013  christos fix unused variable warnings
 1.245 28-Jul-2012  matt branches: 1.245.2; 1.245.4;
Fix -fno-common fallout.
 1.244 09-Jul-2011  matt branches: 1.244.2;
Cleanu <machine/*> includes
 1.243 06-Apr-2011  tsutsui Move intr_init() (which initializes evcnt(9) for interrupts)
from early machdep.c:mach_init() to autoconf.c:cpu_configure().

evcnt_init() isn't called yet when mach_init() is invoked from locore.S
and interrupts won't be enabled before cpu_configure(9).

Problem reported by Erik Bertelsen on port-pmax:
http://mail-index.NetBSD.org/port-pmax/2011/04/06/msg000093.html
 1.242 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.241 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.240 02-Mar-2010  pooka branches: 1.240.2; 1.240.4; 1.240.6;
Remove fs_mfs.h from users because it is now unnecessary and don't
generate fs_mfs.h anymore.
 1.239 08-Feb-2010  joerg Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.238 14-Dec-2009  matt branches: 1.238.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.237 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.236 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.235 15-Aug-2009  matt Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
 1.234 21-Jul-2009  tsutsui No need to clear BSS in kernel itself if there is valid bootinfo,
i.e. it's loaded by our native bootloader.
 1.233 21-Jul-2009  tsutsui Fix an #ifdef botch in rev 1.214 that causes
[ Kernel symbol table invalid! ] message at boot,
which means no ksyms(4) support even on GENERIC kernel.

Should be pulled up to netbsd-4 and netbsd-5.
 1.232 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.231 16-Mar-2009  dsl ANSIfy functions with function-pointer arguments
 1.230 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.229 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.228 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.227 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.226 30-Nov-2008  martin branches: 1.226.4;
As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
 1.225 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.224 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.223 02-Jul-2008  ad branches: 1.223.2; 1.223.4; 1.223.6; 1.223.8;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.222 03-Jan-2008  joerg branches: 1.222.6; 1.222.10; 1.222.12; 1.222.14;
Timecounter and generic todr support for pmax. From Garret D'Amore.
 1.221 17-Oct-2007  garbled branches: 1.221.2; 1.221.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.220 21-Jul-2007  ad branches: 1.220.6;
Don't depend on uvm_extern.h pulling in proc.h.
 1.219 17-May-2007  yamt branches: 1.219.2; 1.219.4;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.218 06-Mar-2007  simonb branches: 1.218.2; 1.218.4; 1.218.10;
Fix some caddr_t rototill fallout.

Some from Erik Bertelsen on port-pmax@.
 1.217 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.216 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.215 21-Dec-2006  yamt branches: 1.215.2;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.214 15-Apr-2006  matt branches: 1.214.8; 1.214.10; 1.214.12;
Don't do a.out check unless EXEC_AOUT is present.
 1.213 09-Apr-2006  tsutsui Remove declarations for cpu_model[] since it's in <sys/systm.h>.
 1.212 11-Dec-2005  christos branches: 1.212.4; 1.212.6; 1.212.8; 1.212.10; 1.212.12;
merge ktrace-lwp.
 1.211 01-Jun-2005  drochner branches: 1.211.2;
more cast-qual fallout
 1.210 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.209 11-Jan-2005  simonb branches: 1.209.2;
Switch from intrcnt interrupt account to event counters.
 1.208 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.207 31-Oct-2003  simonb Remove some assigned-to but otherwise unused variables.
 1.206 26-Sep-2003  simonb Cast through (void *) to appease gcc3.
XXX1 - why does this "type-punned pointer" warning only affect little-
endian MIPS and not big-endian MIPS?!
XXX2 - too much duplicated code.
 1.205 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.204 26-Apr-2003  ragge branches: 1.204.2;
Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.203 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.202 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.201 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.200 04-Aug-2002  gmcgarry Merge cpu_sysctl() for all mips ports, based on powerpc and m68k precedent.

For now, only pmax implements CPU_BOOTED_KERNEL. Need to revisit.
 1.199 05-Mar-2002  simonb branches: 1.199.8;
Provide a L2 cache configuration function.
 1.198 30-Nov-2001  gmcgarry Don't abuse preprocessor flags.
 1.197 14-Nov-2001  thorpej branches: 1.197.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.196 10-Sep-2001  chris branches: 1.196.2;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.195 26-Aug-2001  mhitch branches: 1.195.2;
Fix memsize_scan() - cut and pasted code can't use physmem because it hasn't
been set yet.
 1.194 24-Aug-2001  mhitch Use the PROM bitmap, if available, to determine available memory. Also
add support of multiple memory segments so machines that allow mixed
memory sizes can utilize all available memory.
 1.193 22-Aug-2001  nisimura NetBSD/pmax now has GENERIC_SOFT_INTERRUPTS.
 1.192 02-Jun-2001  chs branches: 1.192.2;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.191 24-Apr-2001  thorpej Do the first allocsys() pass (the pass that computes sizes) before
calling pmap_bootstrap(); pmap_bootstrap() needs some of the size
information computed by allocsys().
 1.190 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.189 23-Apr-2001  thorpej Call pmap_bootstrap() before calling uvm_pageboot_alloc(), so that
the kernel virtual address space bounds will be set up.
 1.188 22-Apr-2001  thorpej Use uvm_pageboot_alloc() for early memory allocation, rather than
calling pmap_steal_memory() directly. On these platforms, since
uvm_pageboot_alloc() is a wrapper around pmap_steal_memory(), there
is no functional change. This is merely for API consistency.
 1.187 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.186 22-Jan-2001  jdolecek branches: 1.186.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.185 15-Jan-2001  thorpej Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
 1.184 27-Nov-2000  nisimura Back out the change of the way to grab proc0's USPACE. It produces
kernel lock up in mach_init() by a reason unknown to me.
 1.183 27-Nov-2000  soren Consistently use pmap_steal_memory() to allocate USPACE.
 1.182 27-Nov-2000  nisimura Fix an typo by cut'paste work in the previous change.
 1.181 27-Nov-2000  nisimura Use pmap_steal_memory() to glab proc0's USPACE.
 1.180 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.179 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.178 29-Jul-2000  jdolecek g/c RB_DFLTROOT

I've tried hard to find also various usage() messages and remove the
appropriate flag from there as well, hopefully all occurences are covered.
 1.177 14-Jul-2000  jeffs Use cpu_intr() definition from mips/cpu.h instead of local one.
 1.176 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.175 28-Jun-2000  ad Apply patch supplied by Konrad Schroder in PR 10452: fixes console output
on PMAG-D.
 1.174 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.173 06-Jun-2000  nisimura branches: 1.173.2;
One more fix escaped from iointr() change.
 1.172 26-May-2000  thorpej branches: 1.172.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.171 12-Apr-2000  nisimura Add a comment block describes what the intent of safepri global variable
as "During autoconfiguration or after a panic, a sleep will simply ..."
 1.170 12-Apr-2000  nisimura - Abandon processor type check for R3000 or R4000/R4400 because VAX
processor is unlikely able to boot the kernel.
- Correct comments about what mach_init() and cpu_startup() do.
- Relocate cn_tab = &promcd to make ROM console printf() work in the
earliest stage of boot.
 1.169 11-Apr-2000  nisimura Change to have cpu_intr() peculiar to DECstations; have ssir global
variable and cpu_intr() body in machdep.c. Reorder and rename
model specific interrupt handler arguments. Fixup machine/intr.h and
machine/cpu.h appropriately.
 1.168 25-Mar-2000  nisimura Make sure proc0 PCB has spl0 condition in CP0 status register field.

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

Reported by Ethan Solomita <ethan@geocast.com>.
 1.167 06-Mar-2000  mhitch A common device_register() is used instead of a separate version for each
of the different DECstation models.
 1.166 03-Mar-2000  nisimura Make clearer a bit how proc0's USPACE is intialized.
 1.165 29-Feb-2000  nisimura Remove unnecessary cast for kernend variable when grabbing proc0 USPACE.
 1.164 29-Feb-2000  nisimura - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.163 03-Feb-2000  nisimura - Massive change of console initialization. Have each model its own
consinit().
- Fix fbconnect() and relatives; 'struct fbinfo' is initialized only once,
making sure no extraneous console resolution message is emitted.
 1.162 19-Jan-2000  thorpej Move callout initialization to a single location; no need to duplicate
that code all over the place.
 1.161 19-Jan-2000  msaitoh check whether tv_usec >= 1000000
 1.160 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.159 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.158 09-Jan-2000  simonb Move include of <sys/sysctl.h> after <vm/vm.h>
Add some parentheses around part of an expression to keep gcc -Wall happy.
 1.157 09-Jan-2000  ad Fix some spacing, spelling, RCS ID and KNF nits that I came across.
 1.156 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.155 08-Jan-2000  simonb Function prototype cleanup.
 1.154 04-Dec-1999  ragge CL* discarding.
 1.153 25-Nov-1999  simonb Move memory sizing to a new function memsize_scan(), and add an empty
stub for memsize_bitmap() to use the PROM bitmap for memory information.
Add a memsize function pointer to the platform structure, and make all
existing DECstation models use memsize_scan() for now.

Interestingly, from the Ultrix cpuconf.{c,h} only the 3100 and 5400 use
a memory scan to determine available memory - all other models use the
PROM bitmap...
 1.152 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.151 12-Nov-1999  nisimura - Arrange 'platform' struct to have clkread entry, which can interporate
HZ using high resolution timer circuit if available. Merge os_init
into the primary hardware initialization in sysinit[].init.
- Nuke an irrelevant attempt to disable RTC under splhigh condition.
- Make sure IOASIC DECstations accumulate device interrupt mask bits into
certain global variables.
- Have witchcrafts to issue ACK to RTC interrupt.
- Add a missing \n and a minor rearrangement in cpu.c
 1.150 12-Sep-1999  chs branches: 1.150.2; 1.150.4; 1.150.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.149 09-Sep-1999  nisimura Use bus_dmamap_load() to obtain 128KB chunk for LANCE merging codes from
NetBSD/alpha. Tested ok with DEC3000 and DECstation.
 1.148 26-Jun-1999  simonb Since we know the start and end addresses of the symbol table, subtract
these and pass as the first parameter of ddb_init(). We used to pass
the contents of the start of the symbol table cast to an int, which for
an ELF kernel is "0x7f ELF" - not quite the symbol table size! How this
used to ever work I dunno...
 1.147 08-Jun-1999  simonb Include <pmax/pmax/machdep.h> instead of declaring our own prom_*()
prototypes.
 1.146 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.145 26-May-1999  nisimura - Remove now obsolete function declaration.
 1.144 25-May-1999  nisimura - Rework spl(9) implementation. Use _spl*() processor mask manipulating
routines now reside in locore.S. No functional difference is expected.
- Replace abused splx() abuse with _splset() to change MIPS processor
interrupt mask bit. 'mips/trap.c' side will be fixed soon.
 1.143 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.142 18-May-1999  nisimura - Move MachSetPID(1) call to pmap_bootstrap() adajacent to kernel pmap
initialization code.
- Abandon mips_init_proc0() and do the 4 lines straightly in MD mach_init().
- Restore a block of code accidentally lost in prevous commit.
- Change the term 'tlbpid' to a MIPS3 nomenclature 'asid'.
- Hide PTE size exposures by symbolic names in locore.S
 1.141 11-May-1999  nisimura - Have 'promcall.c' for various utilities by PROM calls.
- Adjust files.pmax.
 1.140 07-May-1999  thorpej Add a second memory free list, which holds the first 8M of RAM. This is
so that devices which must allocate DMA memory in this range (e.g.
PixelStamp graphics boards) have a better chance of doing so, without
an awful hack.
 1.139 26-Apr-1999  nisimura - Sweep machdep.c; mostly imported from a development branch. Little
exposure of TC device any more. Correct comments which are no longer
feasible. Reorder declarations and definitions. Introduce 'clkread'
pointer to pull up model dependent high resolution timer value. Have
prom_systype() call.
- Place routines for model dependent high resolution timer.
- Program IOASIC registers inside os_init() call and nuke ioasic_init().
 1.138 25-Apr-1999  simonb Shut 'gcc -Wuninitialized' up (including a real case I missed with ddb
symbol initialisation).
 1.137 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.136 21-Apr-1999  simonb In cpu_startup():
+ Initialise minaddr to the start of the file I/O buffers.
+ Check for overallocation of RAM for these buffers.
+ Change function name in panic message to match reality.

Code taken from almost every other port, and fixes the:
uvm_km_suballoc: unable to allocate space in parent map
panic that some people have been experiencing.
 1.135 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.134 01-Apr-1999  thorpej branches: 1.134.2;
Don't call configure() from cpu_startup().
 1.133 28-Mar-1999  simonb Protect the variables used during the DDB symbol calculations with
an "#ifdef DDB".
 1.132 26-Mar-1999  mycroft Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.131 26-Mar-1999  thorpej Don't bother allocating mb_map on these systems. Mbuf clusters are
allocated from a pool, and the MIPS and Alpha use KSEG to map pool
pages. So, mb_map wasn't actually being used. Saves around 4MB of
kernel virtual address space in a typical configuration.

Garbage-collect the related VM_MBUF_SIZE constant.
 1.130 25-Mar-1999  simonb Remove trailing whitespace.
 1.129 24-Mar-1999  simonb Initiailise to bootinfo pointer to NULL. In lookup_bootinfo(), if the
bootinfo pointer is NULL, just return instead of trying to make use of it.
 1.128 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.127 24-Mar-1999  simonb o Add bootinfo support by checking the fifth and sixth arguments for a
magic number and a pointer to the bootinfo data.
XXX: A bootinfo_magic record is not checked for at the moment, even
though test bootblocks initialise the bootinfo data with one.

o Use the bootinfo symtab information in preference to searching for a
valid a.out exec header after _end for initialising DDB.
XXX: Should retire a.out exec header support altogether. Loosing the
ability to load symbols from old bootblocks isn't much of a loss.
After 1.4?

o Add "booted kernel" machdep sysctl.
 1.126 15-Mar-1999  jonathan Eliminate a divide by 40 from the microtime() path on 50Mhz decstatinos
by approximation using 41/2048. Gains one bit in NTP precision.
 1.125 01-Feb-1999  nisimura - Nuke USPACE for now-defunct 'nullproc' pcb (8KB saving).
 1.124 29-Jan-1999  simonb Include dec_{boot,exec,prom}.h from <machine/...>, not <stand/libsa/...>
Remove unused include files.
 1.123 27-Jan-1999  simonb Change location of pmax/stand/*.h include files to pmax/stand/libsa/*.h
My bad - wasn't expecting the kernel proper to pull stuff in from stand...
 1.122 09-Jan-1999  thorpej Garbage-collect `mbutl'.
 1.121 06-Jan-1999  nisimura - Complete vm_offset_t purge for DECstation.
 1.120 02-Sep-1998  nisimura branches: 1.120.2;
- kernel boot flag 'd' now means "enter DDB asap" like as other ports.
- bump cpu_model[] length as the longest name occupies over 30 characters.
- place machine_arch[] beside machine[] for clearity.
- nuke useless #include directives.
- small scale cleanup in vm_machdep.c
 1.119 08-Jul-1998  thorpej Define one page free list, and put all pages on it.
 1.118 04-Jul-1998  jonathan defopt DDB.
 1.117 22-Jun-1998  jonathan * Garbage-collect ancient 4.4bsd model-specific aliases for
ioctl asic interrupt masks.
* include sys/dev/tc/ioasicreg.h, not pmax asic.h (as prep for merge).
 1.116 19-Jun-1998  jonathan * Update pmax db_init() to match db_aout.c rev 1.19 (tv's Shark changes).
Add headers to get prototype of db_init().
* Copy i386 logic for entering Debugger() if RB_KDB set on entry.
 1.115 19-Apr-1998  jonathan Define delay() for pmax asc driver, mips_mcclock.
 1.114 19-Apr-1998  jonathan Add locore assembler functions to read mips3 cycle counter, and
read and write compare register (controls cycle-driven periodic interrupt).

Use cycle counter for microsecond time on mips3, but for now only on
3min motherboards (5000/150). the MAXINE baseboard microsecond
counter is more stable and I don't ave no 5000/260 to test.

XXX clkread() is a mess, it should be rewritten.
XXX should add nanotime() to give inkernel nanosecond resolution,
and then microtime() reworked to use nanotime().
 1.113 31-Mar-1998  jonathan Garbage-collect pmax_boardtype. Remoe pmaxtype.h includes from TC
framebuffer code. Elsewhere, use systype.
 1.112 26-Mar-1998  jonathan * Create /sys/arch/mips/include/intr.h, with extern declaration of
interrupt-callout vector from mips locore dispatch code to port code.
* Move branch-emulation declaration to mips/include/trap.h.
* Garbage-collect pmax/pmax/trap.h.
Not needed now pmax/pmax_trap.c is gone, and after above tidy-up.
 1.111 26-Mar-1998  thorpej Set cpu_model in the dec_foo_init() functions, make them consistent and
descriptive, and print the model before reporting physical memory size.
 1.110 26-Mar-1998  thorpej make this compile
 1.109 25-Mar-1998  jonathan * Use new defopt model-specific options and opt files.
Replace all DS5000_* and DS3100 ifdefs with ifdefs on DEC_ options.
* Use MI declarations, not pmax-specific, in model-specific init
that uses baseboard (ioasic) registers.
* Further cleanup of machdep.c. Clock-tick still needs more thought.
* Use 'ibus' names for 3100 baseboard devices in MI code.
 1.108 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.107 24-Mar-1998  jonathan Rewrite pmax console-probing code from scratch
as pmax/dev/findcons.c:
* Follow the same logic: look for the device the PROM is using.
* If it's a framebuffer and we don't have a driver for it, try other
* framebuffers in PROM search order.
* If no match found, warn user and fall over to serial console.
* if no serial console found, go back to PROM.

Rework tc/scc.c attach routine to give cleaner initialization semantics.
Prune out old 'braindamage' code.
 1.106 12-Mar-1998  thorpej Add support for UVM.
 1.105 25-Feb-1998  thorpej Use allocsys(), mips_init_msgbuf(), and mips_init_proc0(), plus small
changes for MACHINE_NEW_NONCONTIG.
 1.104 23-Feb-1998  thorpej Set the VM page size after clearing the BSS segment.
 1.103 19-Feb-1998  thorpej Use the generic NetBSD/mips crash dump code.
 1.102 19-Feb-1998  thorpej Include the MFS option header.
 1.101 24-Jan-1998  mycroft When dumping, print out the device number as major,minor.
 1.100 29-Oct-1997  jonathan Remove unused old-config static variables describing TurboChannel slots.
From nisimura@itc.aist-nara.ac.jp in PR pmrt-pmax/4343.
 1.99 18-Oct-1997  mhitch branches: 1.99.2;
If DDB and the boot loader has loaded the kernel symbol tables, save the
symbols and let ddb know about them.
 1.98 17-Oct-1997  jonathan Add explicit #include <vm/vm.h> before mips/pte.h is included.
 1.97 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.96 17-Aug-1997  mhitch Use the free-running microsecond counter on the Maxine for high-resolution
clock.
 1.95 12-Aug-1997  jonathan Fix 3MIN model-string braino from PR# 3965.
 1.94 09-Aug-1997  jonathan MIPS cpu-speed detection using mc146818 clock.

Compute CPU speed(MHz) and loop multiplier for DELAY() based on
counting empty loop between mcclock ticks. New global: cpu_mhz.
Change pmax/pmax/machdep.c to build baseboard model names from cpu_mhz.
Set 'cpuspeed' for more realistic DELAY() on mips3 models.

Mips CPU constants, testing, and calibration from D. Sean Davidson
<davidson@zk3.dec.com> and Simon Burge <simonb@telstra.com.au>.
 1.93 06-Aug-1997  jonathan Garbage-collect Mach_clock_addr outside of machdep.c.
Use as mcclock_addr inside machdep.c, to disable clock interrupts
until the clock is autoconfigured.
 1.92 28-Jul-1997  mhitch branches: 1.92.2;
If the IOASIC ASC SCSI driver is not doing buffered DMA, don't allocate
the buffer memory (recovers 112K of memory!).
 1.91 07-Jul-1997  jonathan DDB for mips.
Add DDB interface to /sys/arch/mips/mips..
Rework heuristic stack traceback to work with DDB.
Add hooks to print exception log from DDB.
Add hooks from pmax console drivers: call Debugger()
after break from serial console, or 'DO' key from LK-xxx.
 1.90 01-Jul-1997  jonathan Move generic mips functions setregs(), sendsig(), sys_signal()
to sys/arch/mips/mips/mips_machdep.c. Delete from pica, pmax machdep.c.

Delint pica machdep.c.
 1.89 01-Jul-1997  jonathan branches: 1.89.2;
Remove "untested" comments and messages.
 1.88 23-Jun-1997  jonathan Change NetBSD/mips setregs() to pass explicit arguments to a
newly-exec()ed user-land process for the new dl*-capable crt0:

a0 stack pointer (points to onstack argc)
a1 rtld cleanup (filled in by dynamic loader)
a2 rtld object (filled in by dynamic loader)
a3 ps_strings

From Jason Thorpe (thorpej@nas.nasa.gov).
 1.87 22-Jun-1997  jonathan * Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).
 1.86 22-Jun-1997  jonathan Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.
 1.85 21-Jun-1997  jonathan More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.
 1.84 18-Jun-1997  jonathan MachHitFlushDCache() -> mips3_HitFlushDCache() outside pmap.c.
 1.83 16-Jun-1997  jonathan Changes for configuring both MIPS1 and MIPS3, from a merge of
similar design and code by Jason Thorpe and Jonathan Stone.

NOTE: the kernel-stack-switching code and cacheflush() calls in
locore.S still use #ifdef MIPS3 and need more work.

mips/include/cpu.h:
Add CPUISMIPS3 for run-time tests of what CPU architecture level
we're running on.

mips/include/locore.h:
Add declarations of locore cache-size variables for ref/def toolchain.

mips/include/mips1_pte.h:
mips1 TLB bit definitions.

mips/include/mips3_pte.h:
mips3 TLB bit definitions.

mips/include/pte.h:
define accesor macros for TLB bits (e.g., mips_pg_m_bit(),
that expand to CPU constants if only one CPU arch is configured,
or to inline functions if both MIPS1 and MIPS3 are configured.

mips/mips/locore_r2000.S:
Use MIPS1_PG_xxx constants inside mips1-specific code.

mips/mips/locore_r4000.S:
Use MIPS3_PG_xxx constants inside mips3-specific code.

mips/mips/locore.S:
Use MIPS1_PG_xxx constants inside mips3-specific code.
Use MIPS1_PG_xxx constants inside mips1-specific code.
(Needs more work!)

mips/mips/{pmap.c,vm_machdep.c,trap.c}, pmax/pmax/machdep.c:
Use MIPS3_PG_xxx constants inside mips3-specific functions,
and MIPS1_PG_XXX inside mips1-specific code.
Otherwise, use mips_pg_XXX_bit() macros where they apply,
and use "if (CPUISMIPS3) { ... } else {... }" where they don't.

mips/mips/mips_machdep.c:
Import Michael Hitch's fixes from the pmax locore-init code
into mips_vector_init().

pmax/pmax/machdep.c:
Use generic mips_vector_init() locore vector-init function.
 1.82 16-Jun-1997  jonathan Garbage-collect redundant declarations:
mips/include/locore.h:
Add prototypes for HitFlushDCache() functions. Moe cpu_prid definition here.
mips/include/cpu.h:
remove cpu_prid definition.
pmax/pmax/machdep.c:
remove local protoypes of HitFlushDCache() functions.
mips/mips/vm_machdep.c, mips/mips/vm_machdep.c::
remove local protoypes of HitFlushDCache() functions.
 1.81 16-Jun-1997  jonathan Set model string for 5000/150 (kmin with r4000 daughterboard).
 1.80 16-Jun-1997  jonathan GC more old header files:
<machine/locore.h> -> <mips/locore.h>
<machine/mips_opcode.h> -> <mips/mips_opcode..h>
 1.79 15-Jun-1997  mhitch More merged MIPS1/MIPS3 support for DECstations.
From Toru Nishimura: separate out FP registers in user pcb.
 1.78 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.77 08-Jun-1997  veego Initialize machine from MACHINE.
 1.76 31-May-1997  mhitch -Wall cleanup when compiling without all DECstation models defined.
 1.75 26-May-1997  jonathan lint: #ifdef DEBUG code: use %p for pointers, %ld for vm_offset_t's.
 1.74 26-May-1997  jonathan lint:#ifdef DEBUG code. Add parens where requested, Prototype stacktrace().
 1.73 25-May-1997  jonathan Lint: use new headers with prototypes. Add local prototypes for
locore spl functions; they should only be lint used directly here.
Delete unused variables, etc.
 1.72 24-May-1997  jonathan Add 'needs-flag' to pmax, 3max dc (DZ-11 clone) front-ends (dc_ds, dc_ioasic
respectively), so console setup code can test forconfiguration of the
correct front-end (via NDC_DC and NDC_IOASIC, respectively).

Delete 'needs-flags' from dc.c. GC obsolete uses of NDC, "dc.h".
 1.71 19-May-1997  jonathan Use cpu_splXXX() functions to enforce the required ordering of spl()s.
 1.70 27-Mar-1997  thorpej branches: 1.70.2;
Don't allocate mclrefcnt[]; it's dead and gone.
 1.69 26-Mar-1997  gwr Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/
 1.68 04-Feb-1997  thorpej branches: 1.68.2;
Don't default to RB_ASKNAME _ever_. (Besides, GENERIC is long gone.)
 1.67 23-Oct-1996  mhitch Fix typo: #endeif
 1.66 14-Oct-1996  jonathan Back out previous revision's change to use mips family-independent locore
initialization.
Locore doesn't (yet) set up cpu_id early enough for mach_init() to use it.
 1.65 13-Oct-1996  jonathan Rename mips CPU-family locore prefixes for case-consistency:
mips_r2000_, mips_R2000_ -> mips1_
mips_r4000_, mips_R4000_ -> mips3_
(which are also, for mnemonic reasons, consistent with gcc flag usage,
rather than using mipsI_ and mipsIII_).
 1.64 13-Oct-1996  jonathan Add initializers for System V ipc, semaphores, and shared-memory,
for options SYSVMSG, SYSVSEM, and SYSVSHM, respectively.
Fixes pr #2823.
 1.63 13-Oct-1996  jonathan Change boot() to honour "always halt" flags in boothowto,
other boot() changes modelled on arch/alpha/alpha/machdep.c.
 1.62 13-Oct-1996  christos backout previous kprintf change
 1.61 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.60 07-Oct-1996  jonathan Use "MIPS1" and "MIPS3" as preprocessor tokens to select {config,compile}-time
support for mips-1 (r2000 family) and mips-3 (r4000 family) CPUs.
Avoids inconsistent use of CPU_R2000 and CPU_R3000.
 1.59 30-Sep-1996  jonathan Fix for PR #2739: change reference to ioasic interrupt mask in a
DEBUG printf() in kmin_intr() from "kn03_tc3_imask" (3max+ ioasic mask)
to "kmin_tc3_imask" (3min ioasic mask)
 1.58 08-Sep-1996  jonathan * Call doshutdownhooks() before rebooting.
* Split the machine-dependent part of rebooting out into a separate
function, prom_halt(), making boot() a candidate for moving into
mips/mips.
 1.57 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.56 25-Jun-1996  jonathan Fix 4.4bsd/pmax memory-sizing bug:

physical memory is sized by a loop that writes data to the first
word in a page, (writes something else to settle the bus) and then reads
back the word it wrote. If the read succeeds, the amount of physical
memory is increased by one page.

This fails on a 5000/1xx with a memory subsystem filled with 8 low-density
(4Mbyte) SIMMs. The memory-decoding hardware aliases the 32Mbytes of
physical memory at physical addresses 0, and at 32M (and presumably
at 64 and 96Mbytes.) The contiguous aliasing causes the memory-sizing
loop to continue at 32 MBytes, testing the memory that's really
at address 0, overwriting and crashing the kernel.

Fixed (for 1.2) by reading the SIMM-decoder stride size from the
motherboard, and reducing the loop bound to 32Mbytes on a 5000/1xx
with low-density SIMMs. (Other models have a non-power-of-2 maximum
memory and so are not subject to _contigous_ aliasing of physical memory).
 1.55 23-Jun-1996  jonathan Fix 4.4bsd/pmax bug in memory-sizing loop:

The physical memory-sizer claims to preserve memory contents
(specifically the contents of msgbuf). The loop writes different
values into two adjacent locations and reads the contents of the
first, to ensure that whatever is read back from the first location is
from memory and isn't just the first write persisting on the bus.

The loop preserved the value of the first location, but not the second,
resulting in the second test value ('ZZZZ') over-writing a word in msgbuf.
 1.54 17-Jun-1996  jonathan Before calling a signal handler, set $t9 to the user-level signal
handler address. May be needed by sysv ABI for shared libs.
 1.53 15-Jun-1996  jonathan Fix for PR #1828 and partial fix for PR #2548:
* Eliminate the #ifdef DS5000 and kernel config option DS5000 altogether.
option DS5000 was a hangover from 4.4bsd/pmax; it's never been clear
if it means "support for DS5000/200" or "support for any TC machine".
This implictly fixes pr 1828.

* Use the "tc.h" and NTC generated by config for a "tc? at mainbus"
where appropriate, intsead of #ifdef DS5000.


* Canonicalize the spelling of kernel options that enable support
for particular models. Use
DS5000_25 for the Personal Decstation aka MAXINE aka KN02-ca
DS5000_100 for the 5000/1xx series aka KMIN aka KN02-ba
DS5000_200 for the 5000/200 aka 3MAX aka KN02
DS500_240 for the 5000/240 aka 3MAXPLUS aka KN03

and change DS_5000_xxx to DS5000_xxx everywhere.

* Wrap the interrupt handlers for each model in the appropriate #ifdef,
instead of wrapping all of them with "#ifdef DS5000".
 1.52 29-May-1996  mhitch Fix autoconfig stuff to more closely match the alpha. The DS3100 will now
configure properly. Also fix devices with TurboChannel and mainbus
attachments so they will work if no TurboChannel was configured.
Fix clock.c for a missing variable if not including NTP support.
Also remove some extraneous includes files or use the right ones.
 1.51 20-May-1996  jonathan branches: 1.51.2;
Change MachEmptyWriteBuffer() to wbflush().
Add missing "void" and "int" return types on functions.
Move boot() after dumpsys()/doadump(), so the latter don't need forward decls.
 1.50 19-May-1996  jonathan Update the DECstation stack-traceback pretty-printer, KN01 interrupt handler,
and IOCTL ASIC dma-buffer-reservation code to use the reorganized am7990
preprocessor tokens and function names.
 1.49 19-May-1996  jonathan Include <machine/locore.h>, to force all MIPS cpu-model specific
locore calls to go via a locore-entry jumptable.

Use the mips/mips/mips_machdep.c code to initialize locore state,
exception vectors, and the locore entry vector, instead of doing
it all in mach_init().

Update dumpsys() to use new-style signatures for dump routines,
even though the pmax SCSI drivers don't actually support dumping kernel
memory.
 1.48 31-Mar-1996  jonathan merge mips and pica locore.S, pass 0:
* cut-and-paste all the code for both r2000 (MIPS-I) and r4000 (MIPS-III)
into both the pica and pmax locore.S.

* Change the names of the small segments of vector code that are
bcopied to the machine vector locations, to avoid clashing.
Get rid of the Sprite MachXXX names for the vector code, and
use use mips_r2000_xxx and mips_r4000_xxx instead.

Update the names used in the vector-copying code and trap handlers
to match.

* Most of the rest of the pica locore.S was copied from the pmax
locore.S, and then edited to work on an r4000. The names of
functions and of manifest constants stayed the same, although
both assmbler code and constant values changed.
cut-and-paste such code into contiguous blocks protected by
#if / #endif. Much of the cache and trap-handling code
needs r3000-only register fields, on the r3000, and r4000-only
insns and registers on the r4000.

* change the pmax r2000 exception-handling code to extract a trap
code with the user/kernel bit at 0x20 rather than 0x10.
(r2000s have 4-bit execption codes, r4000s have 5-bit.)
Use the a 16 from-user-space + 16-from-kernel space jump table,
just like on the r4000 pica port.

* add NOPs to the common code where required by the r4000 pipeline
constraints.
* add _C_LABEL() macros to the r4000 locore.

Comitted to provide a snapshot for others to test, and work on a cleaner merge.
 1.47 25-Mar-1996  jonathan Split trap handler into mips-generic and port-specific functions:

* Delete pmax-specific functions and declarations from trap.c

* Delete mips-geeneric functions and declaratinos from pmax_trap.c

* Rename the function pointer used to handle hardware interrupts to
"mips_hardware_intr". Define it in trap.c. Change references elsewhere,
including machdep.c.

Verified to boot on a 5000/200.
 1.46 23-Mar-1996  jonathan * Change setregs() to copy the initial entry point to $t9, to support PIC
code following the MIPS ELF abi.
* Move the kn01 interrupt handler outside of #ifdef DS5000, to support
3100-only kernels.
* Add #ifdef DS3100 around kn01_enable_intr() to allow configuring
turbochannel-only kernels.

Configuration-time support for specific models of DECstation still needs
more thought/work.
 1.45 06-Feb-1996  jonathan Fix braino in (partial) 5100 support: the 5100 is a DS_MIPSMATE, not a
DS_MIPSFAIR.
 1.44 02-Feb-1996  mycroft Fix #includes.
 1.43 31-Jan-1996  jonathan Resolve pmax and alpha IOCTL asic driver differences, pass 1:

Rename the ioctl asic register and slot macros from ASIC_<xxx> to
IOASIC_<xxx>, to be compatible with the machine-indpendent names in
sys/dev/tc/ioasicvar.h. The pmax code still uses
sys/arch/pmax/pmax/asic.h, as some of the registers and offsets
defined there are not yet defined in sys/dev/tc/ioasicvar.h.

Rename the ioctl asic base-address pointer from `asic_base' to `ioasic_base'.
 1.42 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.41 04-Jan-1996  jtc Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.
 1.40 28-Dec-1995  jonathan Add untested, partial support for Decsystem 5100 (mipsfair).
 1.39 07-Oct-1995  mycroft Prefix names of system call implementation functions with `sys_'.
 1.38 25-Sep-1995  jonathan Add fine-grain clock code which uses the 25 MHz TURBOChannel bus-cycle
counter on 5k/240s to interpolate to microsecond-resolution clock
in microtime(). Only the "rev B" ASIC in 5k/240s is known to have
this counter; other models may or may not. This gives microsecond
resolution at user-level, and up to 40ns resolution (modulo the
nominal 5(?) 40MHz cpu cycles for reads to complete) in the kernel.


Change the IOASIC reset function to set up the DMA mapping for the
53c94. Allocate 16 Kbytes of DMA buffer for 53c94 ASCs under an IOASIC,
as the 3MAX baseboard and TC options have 128 Kbytes of static
bounce buffer, and the drivers really _should_ support 16Kbyte
I/O requests. (They don't always.)

Give the LANCE a hard reset on 5k/240s, just to be on the safe side.
(the 5k/240 I use sometimes reported errors at boot time.)
 1.37 19-Sep-1995  thorpej Make system calls conform to a standard prototype and bring those
prototypes into scope.
 1.36 11-Sep-1995  jonathan Rename the Decstation 2100/3100 interrupt functions from "pmax_<func>"
to "kn01_<func>", to avoid confounding a model name (PMAX) with the name of the
entire port (pmax).

Change the signature of interrupt-handlers to take a void *
(a pointer to the softc) and return an int (indicating spurious
interrupts or other conditions.)

Move consinit() from here to cpu_cons.c.

Eliminate the old old pmax-specific console driver, whcih didn't
know about vnodes. Use sys/dev/cons.c instead.

Delete the old 4.4BSD/pmax TURBOChannel probe routines and ROM-to-driver
name-mapping functions.
 1.35 01-Sep-1995  mycroft SA_ONSTACK --> SS_ONSTACK
 1.34 17-Aug-1995  jonathan Remove turbochannel slot_hand_fill functions and all references
to them.
 1.33 13-Aug-1995  mycroft Make splimp() > spltty().
 1.32 10-Aug-1995  jonathan Change DEcstation autoconfiguration to use new-style config.
All devices except SCSI disks and tapes are found using new config only.
SCSI disks and tapes are configured using a table edited from an ioconf.c
produced by config.old.

Boots multi-user on PMAX, 3MAX and 3MAXPLUS. The old-style "slot hand fill"
functions for those machines, and the old TurboChannel configuration
main loop, have been removed.

Since new-style config runs later in boot than the old pmax turbochannel
probing, we no longer know what devices will be configured when consinit()
is called. Use PROM output until autoconfig is finished.
 1.31 02-Aug-1995  jonathan Commit old changes from my source tree in preparation for newconfig:
only print diagnostic messages about interrrupt enabling when DIAGNOSTIC
is defined.
Remove old buggy 4.4BSD turbochannel interrupt kludge for ioasic machines
inside "#if 0"/"#endif" as the NetBSD code has been working fine for months.
 1.30 12-May-1995  jonathan Redo 3MAX+ (5k/240) interrupt enable code.

Instead of being a no-op, kn03_intr_enable() sets the sw copy of the
interrupt-enable mask *and* writes it into the IO asic intr-enable
register. Boot code sets the sw copy (kn03_tc_imask) to something
sane (KN03_IM0, with tc option slots turned off). Tested and works.
Interrupt code for other IOASIC machines should be redone so that
interrupts for devices are enabled by drivers, rather than by
cpu-specific boot code. Functions common to all IOASIC machines
(PSWARN?) should be done by asic_init().

Checked in without the above changes so that 3MAX+, MAXINE and 3MIN
interrupt-(enable,handle) can converge.
 1.29 05-May-1995  mellon Fix MAXine interrupt mask routine
 1.28 04-May-1995  jonathan Fix long-standing bug in NetBSD/pmax interrupt initalization on
Turbochannel machines with an IOASIC.

After an interrupt is taken, the IOASIC interrupt enable mask is
and'ed with the kernel's interrupt-mask variable. This masks
off any interrupts that were enabled after the hardware interrupt-enable
mask was set. Due to this bug all iynterrupts must be enabled before
the first interrupt is taken. (Interrupts enabled later aren't on in the
ioasic intr-mask register, so they aren't on in (sirm & kernelmask),
which is what used to get written back to the ioasic interrupt-mask
register. Fixed, and tested on on 3MAX+ but not xine/3min.

If this patch perchance breaks on Xines or 3mins, the old code can be
re-enabled by changing the #if 0 in machdep.c to #if 1.
 1.27 01-May-1995  mellon Oops, took out a bit too much
 1.26 01-May-1995  mellon Oops. Undo some console code checkins that didn't belong.
 1.25 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.24 21-Apr-1995  mellon Oops, still need to set waittime...
 1.23 21-Apr-1995  mellon Use vfs_shutdown to sync disks...
 1.22 21-Apr-1995  mellon Add support for clean flag
 1.21 03-Apr-1995  mellon Move cpu-specific exec support to cpu_exec.c; Support 4.4BSD a.out
 1.20 01-Feb-1995  mellon Added DECwrl networking TC options
 1.19 18-Jan-1995  mellon Add partial sfb support, ELF and 4.4BSD a.out support, Ultrix-compatible pcb_regs, fix sigcontext, probably more
 1.18 03-Jan-1995  hpeyerl microtime() returns void.
 1.17 28-Nov-1994  dean some fixes and Ultrix compat stuff from Jonathan Stone.
 1.16 22-Nov-1994  dean catching up with other changes
 1.15 26-Oct-1994  cgd new RCS ID format.
 1.14 20-Oct-1994  cgd update for new syscall args description mechanism
 1.13 18-Aug-1994  cgd can't do ptr math on void *
 1.12 05-Jul-1994  glass branches: 1.12.2;
fix cpu architecture.
 1.11 05-Jul-1994  glass another bad include
 1.10 15-Jun-1994  glass much works but untested w/new fs. expect more tomorrow
 1.9 14-Jun-1994  glass remove temporary hacks now that the new filesystem stuff is in
 1.8 02-Jun-1994  glass fix a few integration bugs, add vmfault debugging, more ultrix stuff
 1.7 01-Jun-1994  glass cpu_exec_ecoff_hook() returns a errno
 1.6 30-May-1994  glass new filesystem stuff isn't in yet
 1.5 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.4 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.3 16-Jan-1994  deraadt prototyped callvec (ripped from stand/libsa/callvec.c)
#ifdef RB_MINIROOT support
our setregs() takes a stack pointer argument
netbsd-ify sendsig/sigreturn code, ie. alternate stacks
add dummy stubs for ptrace
 1.2 15-Oct-1993  deraadt default is to have nbuf = 0 and bufpages = 0
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.12.2.1 18-Aug-1994  mycroft update from trunk
 1.51.2.7 05-Dec-1996  rat Fix a typo in #ifdef DEBUG, by request from
Jonathan Stone <jonathan@DSG.Stanford.EDU>. Fixes pr #2739.
 1.51.2.6 05-Dec-1996  rat Pullup 1.57 -> 1.58 and tweaks to make it work with 1.2. By request of
Jonathan Stone <jonathan@DSG.Stanford.EDU>

>adds call to doshutdownhooks(), which was formerly missing from netbsd/pmax.
 1.51.2.5 05-Dec-1996  rat Pullup 1.63 -> 1.64 by request of Jonathan Stone <jonathan@DSG.Stanford.EDU>

>adds initialization of System V IPC/shm/semaphores,
>which was formerly missing from NetBSD/pmax
 1.51.2.4 25-Jun-1996  jtc Pulled up rev 1.56 by request from Jonathan Stone
 1.51.2.3 17-Jun-1996  jonathan Before calling a signal handler, set $t9 to the user-level signal
handler address. May be needed by sysv ABI for shared libs.
 1.51.2.2 15-Jun-1996  jonathan Pull up mainbranch fix for kernels configured for a sigle model of DECstation
 1.51.2.1 30-May-1996  mhitch Pulled autoconfig fixes up from the trunk
 1.68.2.1 12-Feb-1997  mrg don't allocate swap map in allocsys.
 1.70.2.2 01-Jun-1997  mrg update to trunk.
 1.70.2.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.89.2.2 01-Jul-1997  jonathan Remove "untested" comments and messages.
 1.89.2.1 01-Jul-1997  jonathan file machdep.c was added on branch bouyer-scsipi on 1997-07-01 07:21:15 +0000
 1.92.2.2 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.92.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.99.2.1 04-Feb-1999  cgd pull up rev 1.123 from trunk (simonb)
 1.120.2.21 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.120.2.20 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.120.2.19 09-Dec-1999  drochner catch up with "struct platform" change and CL* removal
 1.120.2.18 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.120.2.17 26-Oct-1999  nisimura Catchup to changes in main trunk. Remove debug message which is now
harmful due to SCSI device probe change. Enable WSSCREEN_REVERSE for
pm.c
 1.120.2.16 09-Sep-1999  nisimura Follow changes made in main trunk.
 1.120.2.15 11-Jun-1999  nisimura - Track main trunk changes and cleanup accumulated bozos I made so far.
 1.120.2.14 26-May-1999  nisimura - Track changes in main trunk.
 1.120.2.13 21-May-1999  nisimura - Track main trunk changes.
 1.120.2.12 12-May-1999  nisimura - Nuke unused 'umimpl_platform' extern declaration. 'os_init' call is not
used anymore.
- Fix careless mistakes.
 1.120.2.11 11-May-1999  nisimura - Correct the case analysis error in ibus_pmax.c
- Now about to remove #if NTC > 0 in mainbus.c
 1.120.2.10 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.120.2.9 26-Apr-1999  nisimura - Arrange interrupt handler vectors initialized inside configure().
- Sweep jobs in machdep.c, and other model dependent files.
 1.120.2.8 12-Apr-1999  drochner adapt to uvm_pagealloc() changes
 1.120.2.7 05-Apr-1999  nisimura - Reorganize #include's.
- Introduce prom_systype() and rearrange prom_halt().
 1.120.2.6 30-Mar-1999  nisimura - Nuke sketch unimpl_model_name(), unimpl_errintr(). Changes on other
three, _intr(), _iointr(), _clockintr(), are withheld.
 1.120.2.5 29-Mar-1999  nisimura - Catch up to recent changes in main trunk.
- Reorganize various #include's.
- Yield memcpy to Mach derivated one.
- pm_cnattach() now checks the existense of framebuffer card.
 1.120.2.4 18-Jan-1999  drochner sync with trunc rev 1.122: g/c "mbutl"
 1.120.2.3 16-Nov-1998  nisimura - Replace vm_offset_t with vaddr_t/paddr_t.
Note that NetBSD/newsmips has purged vm_offset_t too. Main trunk mips/
and pmax/ directories is left untouched.
 1.120.2.2 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.120.2.1 15-Oct-1998  nisimura - NWSCONS cnattach() hooks at platform.cons_init for various DECstations.
- iplmask[] accumulation in autoconf.c.
- codes to identify booting disk looking at ULTRIX rz name.
- MI SCSI entries at cdevsw[]/bdevsw[].
- revised readdisklabel() with ULTRIX disklabel support.
 1.134.2.2 21-Apr-1999  perry branches: 1.134.2.2.2;
pullup 1.135->1.136 (simonb)
 1.134.2.1 16-Apr-1999  chs pull up 1.134 -> 1.135:
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.134.2.2.2.2 01-Jul-1999  thorpej Sync w/ -current.
 1.134.2.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.150.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.150.4.1 15-Nov-1999  fvdl Sync with -current
 1.150.2.5 23-Apr-2001  bouyer Sync with HEAD.
 1.150.2.4 27-Mar-2001  bouyer Sync with HEAD.
 1.150.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.150.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.150.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.172.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.173.2.3 13-Aug-2000  jdolecek pullup from trunk (approved by thorpej):
retire RB_DFLTROOT, it's no longer used

revisions pulled up:
arch/i386/stand/lib/netbsd_opts.c 1.3
arch/i386/stand/biosboot/main.c 1.23
arch/i386/stand/dosboot/main.c 1.15
arch/i386/stand/netboot/main.c 1.6
arch/arc/arc/machdep.c 1.42
arch/bebox/stand/boot/boot.c 1.11
arch/hpcmips/hpcmips/machdep.c 1.32
arch/newsmips/newsmips/machdep.c 1.45
arch/pc532/stand/boot/boot.c 1.2
arch/pmax/pmax/machdep.c 1.178
arch/prep/stand/boot/boot.c 1.2
arch/sparc/sparc/autoconf.c 1.141
arch/sparc64/sparc64/autoconf.c 1.38
arch/x68k/stand/loadbsd/loadbsd.c 1.5
arch/mvme68k/stand/libsa/parse_args.c 1.6
compat/osf1/osf1_cvt.c 1.9
sys/reboot.h 1.17
 1.173.2.2 19-Jul-2000  jeffs Pull up cpu_intr() prototype + platform dependent machdeps.
(approved by thorepj).
 1.173.2.1 29-Jun-2000  ad Pull up revision 1.175 from trunk: fix console output on PMAG-D.

Approved by releng.
 1.186.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.186.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.192.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.192.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.192.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.192.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.192.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.195.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.196.2.1 24-Oct-2001  thorpej Update for the new cache code. There are now two optimized
bus_dmamap_sync routines: one for a physically-indexed write-through
cache, and one for a virtually-indexed write-back cache.
 1.197.2.7 27-Aug-2002  nathanw Catch up to -current.
 1.197.2.6 13-Aug-2002  nathanw Catch up to -current.
 1.197.2.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.197.2.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.197.2.3 08-Jan-2002  nathanw Catch up to -current.
 1.197.2.2 15-Dec-2001  gmcgarry lwp'ify
 1.197.2.1 14-Nov-2001  gmcgarry file machdep.c was added on branch nathanw_sa on 2001-12-15 07:11:00 +0000
 1.199.8.1 31-Aug-2002  gehenna catch up with -current.
 1.204.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.204.2.4 17-Jan-2005  skrll Sync with HEAD.
 1.204.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.204.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.204.2.1 03-Aug-2004  skrll Sync with HEAD
 1.209.2.1 29-Apr-2005  kent sync with -current
 1.211.2.5 21-Jan-2008  yamt sync with head
 1.211.2.4 03-Sep-2007  yamt sync with head.
 1.211.2.3 26-Feb-2007  yamt sync with head.
 1.211.2.2 30-Dec-2006  yamt sync with head.
 1.211.2.1 21-Jun-2006  yamt sync with head.
 1.212.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.212.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.212.8.2 24-May-2006  yamt sync with head.
 1.212.8.1 11-Apr-2006  yamt sync with head
 1.212.6.1 22-Apr-2006  simonb Sync with head.
 1.212.4.1 09-Sep-2006  rpaulo sync with head
 1.214.12.1 18-Aug-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1348):
sys/arch/pmax/pmax/machdep.c: revision 1.233
Fix an #ifdef botch in rev 1.214 that causes
[ Kernel symbol table invalid! ] message at boot,
which means no ksyms(4) support even on GENERIC kernel.
Should be pulled up to netbsd-4 and netbsd-5.
 1.214.10.1 23-Sep-2006  yamt implement splraiseipl for pmax.
 1.214.8.1 12-Jan-2007  ad Sync with head.
 1.215.2.3 18-Apr-2007  ad - Further adaptations to MIPS for the yamt-idlelwp branch.
- Make curlwp a register variable on MIPS.
 1.215.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.215.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.218.10.2 03-Oct-2007  garbled Sync with HEAD
 1.218.10.1 22-May-2007  matt Update to HEAD.
 1.218.4.1 11-Jul-2007  mjf Sync with head.
 1.218.2.2 15-Jul-2007  ad Get pmax working.
 1.218.2.1 27-May-2007  ad Sync with head.
 1.219.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.219.2.1 07-Aug-2007  matt Sync with HEAD.
 1.220.6.2 09-Jan-2008  matt sync with HEAD
 1.220.6.1 06-Nov-2007  matt sync with HEAD
 1.221.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.221.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.222.14.1 03-Jul-2008  simonb Sync with head.
 1.222.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.222.10.3 11-Mar-2010  yamt sync with head
 1.222.10.2 19-Aug-2009  yamt sync with head.
 1.222.10.1 04-May-2009  yamt sync with head.
 1.222.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.222.6.1 02-Jul-2008  mjf Sync with HEAD.
 1.223.8.1 26-Jul-2009  snj branches: 1.223.8.1.2;
Pull up following revision(s) (requested by tsutsui in ticket #869):
sys/arch/pmax/pmax/machdep.c: revision 1.233
Fix an #ifdef botch in rev 1.214 that causes
[ Kernel symbol table invalid! ] message at boot,
which means no ksyms(4) support even on GENERIC kernel.
Should be pulled up to netbsd-4 and netbsd-5.
 1.223.8.1.2.11 14-Feb-2012  matt mem_cluster_cnt on mips is now a u_int.
 1.223.8.1.2.10 23-Dec-2011  matt Update to new world order. GENERIC boots on gxemul 3max emulation.
 1.223.8.1.2.9 29-Dec-2010  matt Remove malingering code which causes LP64 not to work.
 1.223.8.1.2.8 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.223.8.1.2.7 21-Mar-2010  cliff mips_vector_init now takes an argument to specify splsw.
NULL specifies use the default 'std_splsw'
 1.223.8.1.2.6 01-Feb-2010  matt Move init of lwp0 uarea earlier so that badaddr has a stack and pcb.
 1.223.8.1.2.5 01-Feb-2010  matt Update to reflect mips tree changes.
 1.223.8.1.2.4 31-Dec-2009  matt Use mips_page_physload and mips_init_lwp0_uarea.
 1.223.8.1.2.3 16-Sep-2009  matt Deal with some LP64 issues with only O32 console.
Make bootloader invoke kernel compatible with both O32 and N32
 1.223.8.1.2.2 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.223.8.1.2.1 07-Sep-2009  matt Deal with pcb_context being a label_t
 1.223.6.1 26-Jul-2009  snj Pull up following revision(s) (requested by tsutsui in ticket #869):
sys/arch/pmax/pmax/machdep.c: revision 1.233
Fix an #ifdef botch in rev 1.214 that causes
[ Kernel symbol table invalid! ] message at boot,
which means no ksyms(4) support even on GENERIC kernel.
Should be pulled up to netbsd-4 and netbsd-5.
 1.223.4.3 28-Apr-2009  skrll Sync with HEAD.
 1.223.4.2 03-Mar-2009  skrll Sync with HEAD.
 1.223.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.223.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.226.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.238.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.240.6.2 05-Mar-2011  bouyer Sync with HEAD
 1.240.6.1 17-Feb-2011  bouyer Sync with HEAD
 1.240.4.1 06-Jun-2011  jruoho Sync with HEAD.
 1.240.2.2 21-Apr-2011  rmind sync with head
 1.240.2.1 05-Mar-2011  rmind sync with head
 1.244.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.244.2.1 30-Oct-2012  yamt sync with head
 1.245.4.1 18-May-2014  rmind sync with head
 1.245.2.2 03-Dec-2017  jdolecek update from HEAD
 1.245.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.248.6.3 05-Feb-2017  skrll Sync with HEAD
 1.248.6.2 19-Mar-2016  skrll Sync with HEAD
 1.248.6.1 22-Sep-2015  skrll Sync with HEAD
 1.250.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.2 15-Jan-1994  mycroft Clean up deleted files.
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.2 15-Jan-1994  mycroft Clean up deleted files.
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.13 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.12 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.11 11-Dec-2005  christos branches: 1.11.78; 1.11.86; 1.11.92; 1.11.96;
merge ktrace-lwp.
 1.10 01-Jun-2005  drochner make the argument to prom getenv() cnd the printf() format const
remove variable names from prototypes
 1.9 24-Aug-2001  mhitch branches: 1.9.6; 1.9.24;
Use the PROM bitmap, if available, to determine available memory. Also
add support of multiple memory segments so machines that allow mixed
memory sizes can utilize all available memory.
 1.8 28-Mar-2000  simonb branches: 1.8.8;
Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.
 1.7 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.6 01-Dec-1999  nisimura Remove a file obsoluted and arrange global extern declarations.
 1.5 09-Jun-1999  nisimura branches: 1.5.2; 1.5.8;
- Nuke declarations for now obsolete implementations of spl()s.
 1.4 08-Jun-1999  simonb + Add prototypes from the prom_*() callback routines.
+ Remove leading "extern" from function declarations.
+ CG unused latched_cycle_cnt.
 1.3 26-Apr-1999  nisimura - Sweep machdep.c; mostly imported from a development branch. Little
exposure of TC device any more. Correct comments which are no longer
feasible. Reorder declarations and definitions. Introduce 'clkread'
pointer to pull up model dependent high resolution timer value. Have
prom_systype() call.
- Place routines for model dependent high resolution timer.
- Program IOASIC registers inside os_init() call and nuke ioasic_init().
 1.2 25-Mar-1998  jonathan branches: 1.2.4; 1.2.12;
* Use new defopt model-specific options and opt files.
Replace all DS5000_* and DS3100 ifdefs with ifdefs on DEC_ options.
* Use MI declarations, not pmax-specific, in model-specific init
that uses baseboard (ioasic) registers.
* Further cleanup of machdep.c. Clock-tick still needs more thought.
* Use 'ibus' names for 3100 baseboard devices in MI code.
 1.1 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.2.12.1 21-Jun-1999  thorpej Sync w/ -current.
 1.2.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.5.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.8.8.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.9.24.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.6.2 24-Aug-2001  mhitch Use the PROM bitmap, if available, to determine available memory. Also
add support of multiple memory segments so machines that allow mixed
memory sizes can utilize all available memory.
 1.9.6.1 24-Aug-2001  mhitch file machdep.h was added on branch nathanw_sa on 2001-08-24 15:33:18 +0000
 1.11.96.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.11.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.11.78.2 11-Mar-2010  yamt sync with head
 1.11.78.1 04-May-2009  yamt sync with head.
 1.44 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.43 24-Apr-2021  thorpej branches: 1.43.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.42 09-Jul-2011  matt branches: 1.42.68;
Cleanu <machine/*> includes
 1.41 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.40 20-Jul-2009  tsutsui branches: 1.40.6;
Use CFATTACH_DECL_NEW(). (no softc)
 1.39 20-Jul-2009  tsutsui KNF, ANSIfy, and misc cosmetics.
 1.38 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.37 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.36 11-Dec-2005  christos branches: 1.36.78; 1.36.86; 1.36.92; 1.36.96;
merge ktrace-lwp.
 1.35 15-Jul-2003  lukem __KERNEL_RCSID()
 1.34 02-Oct-2002  thorpej branches: 1.34.6;
Use CFATTACH_DECL().
 1.33 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.32 15-Nov-1999  nisimura branches: 1.32.8; 1.32.12;
Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.31 26-May-1999  nisimura branches: 1.31.2; 1.31.8;
- Continue on branch merge, incrementally.
- Catch up filename changes escaped to be fixed.
 1.30 25-Mar-1999  simonb branches: 1.30.4;
Remove trailing whitespace.
 1.29 15-Mar-1999  nisimura - Remove a verbose local variable.
 1.28 15-Mar-1999  nisimura - Decouple "ibus" from TURBOchannel.
- Nuke mainbus_softc definition (it's empty).
 1.27 15-Mar-1999  nisimura - Nuke old leftover; round three. Remove never-used functions.
XXX Needs to eliminate TURBOchannel exposure here.
 1.26 05-Sep-1998  nisimura branches: 1.26.2;
- Remove lines make not effects from mainbus.c
- Remove direct device driver calls from dec_3100.c. Close PR#5522.
 1.25 29-Aug-1998  mrg remove unnecessary "extern int ncpus" (was also causing egcs warning)
 1.24 19-Apr-1998  jonathan Attach ibus to mainbus.
Commit updated dec_3100.c with interrupt-enable code for ibus.
 1.23 25-Mar-1998  jonathan * Use new defopt model-specific options and opt files.
Replace all DS5000_* and DS3100 ifdefs with ifdefs on DEC_ options.
* Use MI declarations, not pmax-specific, in model-specific init
that uses baseboard (ioasic) registers.
* Further cleanup of machdep.c. Clock-tick still needs more thought.
* Use 'ibus' names for 3100 baseboard devices in MI code.
 1.22 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.21 12-Jan-1998  thorpej Update for changes to config.
 1.20 21-Jul-1997  jonathan Kill __BROKEN_INDIRECT_CONFIG on pmax.
Based on a patch from Chris G. Demetriou, December 1996.
 1.19 16-Jun-1997  jonathan Remove the machConst.h (wrapper for Sprite-derived source), and all
#includes <machine/machConst.h> uses.
Other header files now include <mips/cpuregs.h> where necessary.
 1.18 13-Oct-1996  christos backout previous kprintf change
 1.17 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.16 06-Oct-1996  jonathan Update pmax drivers to use "const" on 2nd arg to cfprint_t:
turbocnhannel: include/tc_machdep.h, tc/tc_subr.c, tc/asic.c
kn01 baseboard: pmax/mainbus.c
 1.15 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.14 16-Jun-1996  mhitch Fix to compile if DS3100 is not defined when building without DS3100 support.
Now that autoconf parameter passing is cleaned up, configure the cpu.
 1.13 15-Jun-1996  jonathan Fix for PR #1828 and partial fix for PR #2548:
* Eliminate the #ifdef DS5000 and kernel config option DS5000 altogether.
option DS5000 was a hangover from 4.4bsd/pmax; it's never been clear
if it means "support for DS5000/200" or "support for any TC machine".
This implictly fixes pr 1828.

* Use the "tc.h" and NTC generated by config for a "tc? at mainbus"
where appropriate, intsead of #ifdef DS5000.


* Canonicalize the spelling of kernel options that enable support
for particular models. Use
DS5000_25 for the Personal Decstation aka MAXINE aka KN02-ca
DS5000_100 for the 5000/1xx series aka KMIN aka KN02-ba
DS5000_200 for the 5000/200 aka 3MAX aka KN02
DS500_240 for the 5000/240 aka 3MAXPLUS aka KN03

and change DS_5000_xxx to DS5000_xxx everywhere.

* Wrap the interrupt handlers for each model in the appropriate #ifdef,
instead of wrapping all of them with "#ifdef DS5000".
 1.12 29-May-1996  mhitch Fix autoconfig stuff to more closely match the alpha. The DS3100 will now
configure properly. Also fix devices with TurboChannel and mainbus
attachments so they will work if no TurboChannel was configured.
Fix clock.c for a missing variable if not including NTP support.
Also remove some extraneous includes files or use the right ones.
 1.11 19-May-1996  jonathan branches: 1.11.4;
Avoid calling autoconfigure() to configure the CPU.
It just causes a kernel panic, and will until the rest of the pmax
autoconfiguration is redone to use a bus-specific probe and attach
argument, or until KN01 devices are no longer attached to the mainbus.
 1.10 10-Apr-1996  jonathan Fixes for -Wall -Wmissing-prototypes:

Add prototypes to (most of) src/sys/arch/pmax/pmax. (The un-protytyped
parts still have pending merges with the Pica port.)
Fix splx() glitches in pmax/clock.c.
Delete old cpu/fpu identification from pmax/autoconf.c, use r4400/r4600/idt
aware code from Pica port, now in mips/mips/mips_machdep.c.
Delete unused multi-CPU autoconfiguration code; NetBSD/pmax does not
support decsystem 5800s anyway.
 1.9 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.8 18-Mar-1996  jonathan Change kn01 (pmax,3100) interrupt-enable signature to match
the NetBSD-1.1 convention. Change the mainbus `struct confargs'
and the "generic" interrupt-establish method, used by devices that
appear on both a kn01 and TC decstations, to match.

Change the macros in autconf.h accordingly.
 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 02-Feb-1996  mycroft Fix #includes.
 1.5 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.4 28-Dec-1995  jonathan Add untested, partial support for Decsystem 5100 (mipsfair).
 1.3 12-Sep-1995  jonathan Change the signature of interrupt-handlers to take a void *
(a pointer to the softc) and return an int (indicating spurious
interrupts or other conditions.)
 1.2 10-Aug-1995  jonathan Use "lance" as the name of the PMAX (kn01) Lance device, not "le", since
"lance" is what the Alpha drivers use.
 1.1 10-Aug-1995  jonathan Change DEcstation autoconfiguration to use new-style config.
All devices except SCSI disks and tapes are found using new config only.
SCSI disks and tapes are configured using a table edited from an ioconf.c
produced by config.old.

Boots multi-user on PMAX, 3MAX and 3MAXPLUS. The old-style "slot hand fill"
functions for those machines, and the old TurboChannel configuration
main loop, have been removed.

Since new-style config runs later in boot than the old pmax turbochannel
probing, we no longer know what devices will be configured when consinit()
is called. Use PROM output until autoconfig is finished.
 1.11.4.3 16-Jun-1996  mhitch Pull up from trunk:
> Fix to compile if DS3100 is not defined when building without DS3100
> support.
> Now that autoconfig parameter passing is cleaned up, configure the cpu.
 1.11.4.2 15-Jun-1996  jonathan Pull up mainbranch fix for kernels configured for a sigle model of DECstation
 1.11.4.1 30-May-1996  mhitch Pulled autoconfig fixes up from the trunk
 1.26.2.7 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.26.2.6 12-May-1999  nisimura - Nuke unused 'umimpl_platform' extern declaration. 'os_init' call is not
used anymore.
- Fix careless mistakes.
 1.26.2.5 11-May-1999  nisimura - Correct the case analysis error in ibus_pmax.c
- Now about to remove #if NTC > 0 in mainbus.c
 1.26.2.4 15-Mar-1999  nisimura - Sync. w/ main trunk.
- Remove unnecessary includes.
 1.26.2.3 15-Mar-1999  nisimura - Decouple "ibus" from TC device implementation.
- Move IOASIC initialization to platform.os_init().
 1.26.2.2 15-Mar-1999  nisimura - Decouple "ibus" from TURBOchannel implementation.
- Sync. with main trunk.
 1.26.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.30.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.31.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.31.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.32.12.1 18-Oct-2002  nathanw Catch up to -current.
 1.32.8.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.34.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.34.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.34.6.1 03-Aug-2004  skrll Sync with HEAD
 1.36.96.1 14-Jan-2010  matt device_t, CFATTACH_DECL_NEW, ansify, ...
 1.36.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.36.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.36.78.2 19-Aug-2009  yamt sync with head.
 1.36.78.1 04-May-2009  yamt sync with head.
 1.40.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.42.68.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.43.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.8 29-Feb-2000  nisimura branches: 1.8.30;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.7 25-Mar-1999  simonb branches: 1.7.8;
Remove trailing whitespace.
 1.6 22-Jun-1998  jonathan branches: 1.6.4;
* Garbage-collect ancient 4.4bsd model-specific aliases for
ioctl asic interrupt masks.
* include sys/dev/tc/ioasicreg.h, not pmax asic.h (as prep for merge).
 1.5 31-Jan-1996  jonathan Resolve pmax and alpha IOCTL asic driver differences, pass 1:

Rename the ioctl asic register and slot macros from ASIC_<xxx> to
IOASIC_<xxx>, to be compatible with the machine-indpendent names in
sys/dev/tc/ioasicvar.h. The pmax code still uses
sys/arch/pmax/pmax/asic.h, as some of the registers and offsets
defined there are not yet defined in sys/dev/tc/ioasicvar.h.

Rename the ioctl asic base-address pointer from `asic_base' to `ioasic_base'.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.6.4.3 14-Mar-2000  nisimura Synchronize with the recent changes in main trunk. Main trunk is closing
gaps toward this, indeed.
 1.6.4.2 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.6.4.1 07-May-1999  nisimura - Synchronize with main trunk changes.
- Minor formatting nits in *.h files.
 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.8.30.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.30.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.30.1 03-Aug-2004  skrll Sync with HEAD
 1.5 19-Apr-1998  jonathan Copy alpha/tc/mcclock_ioasic.c (duplicated in pmax/tc/mcclock_ioasic.c)
into sys/dev/dec and split into a clockfns layer and a "middle" layer
for other DEC systems which use mcclocks with each onchip byte
register padded out to a 32-bit word.

Clone alpha/alpha/mcclock (also duplicated in pmax port) into
sys/dev/dec, and ifdef for default clockrates on pmax and alpha.

Use new machinery on pmax for ibus,ioasic attached mcclocks.
 1.4 12-Jan-1998  thorpej Update for changes to config.
 1.3 22-Jul-1997  jonathan Move sys/dev/tc/mcclockvar.h -> sys/dev/dec/mcclockvar.h.
Update pmax clock code.
 1.2 22-Jul-1997  jonathan Include /sys/dev/dec/clockvar.h. Garbage-collect tc/clockvar.h.
 1.1 22-Jun-1997  jonathan Import mcclock from NetBSD/Alpha, mostly replacing the Sprite clock code.
interface. From Toru Nishimura <nisimura@itc.aist-nara.ac.jp>.

Partly merged back with Alpha code by Jonathan Stone. Needs more merging.
 1.4 10-Oct-2000  ad Switch to sys/dev/md_root.c.
 1.3 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.2 17-Mar-1999  sommerfe branches: 1.2.8;
defopt MINIROOTSIZE
 1.1 17-Nov-1998  jonathan Add md (memory disk) hooks for pmax. ecoff kernel with 2MB ramdisk
tftp-boots on new PROMs. (3MB is too large).
 1.2.8.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.8 26-Mar-1996  jonathan Remove src/sys/arch{pmax/pmax,pica/pica}cpu_exec.c; no significant differences,
or for which the Pica port is an older revision of the pmax branch.

A merged version with the NetBSD/pmax revision history is in mips/mips/.
cpu_exec.c
elf.c
mem.c
process_machdep.c
 1.7 29-Sep-1995  jonathan Fix btoc()/ctob() typo in reading physical memory that stopped ps
from reading process argument lists.
Allow kernel-virtual memory reads to read the message buffer, since
dmesg needs it.
 1.6 10-Apr-1995  mycroft Add mmopen(), mmclose(), and mmmmap() where appropriate. Lock vmmap when
needed. Make types consistent.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.3 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.2 16-Jan-1994  deraadt pullin vm_statistics.h
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.6 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.5 20-Jul-2009  tsutsui KNF, ANSIfy, and misc cosmetics.
 1.4 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.3 08-Jan-2000  simonb branches: 1.3.136; 1.3.144; 1.3.150; 1.3.154;
Function prototype cleanup.
 1.2 16-Aug-1999  simonb branches: 1.2.2;
Print out the module number that causes the ECC error.
 1.1 21-May-1999  nisimura branches: 1.1.2; 1.1.4;
- Rename file names;
dec_3max_subr.c -> memc_3max.c, dec_kn02_subr.c -> memc_3min.c
 1.1.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.1.2.3 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.1.2.2 21-May-1999  nisimura - Sync w/ main trunk change.
 1.1.2.1 21-May-1999  nisimura file memc.h was added on branch nisimura-pmax-wscons on 1999-05-21 01:17:31 +0000
 1.2.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.154.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.3.150.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.144.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.136.3 11-Mar-2010  yamt sync with head
 1.3.136.2 19-Aug-2009  yamt sync with head.
 1.3.136.1 04-May-2009  yamt sync with head.
 1.17 09-Jul-2011  matt Cleanu <machine/*> includes
 1.16 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.15 20-Jul-2009  tsutsui KNF, ANSIfy, and misc cosmetics.
 1.14 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.13 29-Sep-2002  wiz branches: 1.13.112; 1.13.120; 1.13.126; 1.13.130;
Fix strangeness introduced in v1.4:
- panic("panic(\"Mem error interrupt\");");
+ panic("Mem error interrupt");
 1.12 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.11 10-Jan-2000  simonb branches: 1.11.8; 1.11.12;
Remove unneeded include files (up to 16 in two files!).
 1.10 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.9 16-Aug-1999  simonb branches: 1.9.2;
Print out the module number that causes the ECC error.
 1.8 26-May-1999  nisimura branches: 1.8.2;
- Continue on branch merge, incrementally.
- Catch up filename changes escaped to be fixed.
 1.7 20-May-1999  nisimura branches: 1.7.2;
Moved from dec_3max_subr.c
 1.6 27-Mar-1999  mhitch The ECC handling was broken when the common handling was split out of dec_3max.c
and dec_3maxplus.c. The ERRSYN/CHKSYN register contains data, not an address.
Pass the address of the register rather than the contents to dec_mtasic_err()
instead of the register contents so it can read/write the register.
Correctable memory errors won't trap in dec_mtasic_err() anymore.
 1.5 25-Mar-1999  simonb Remove trailing whitespace.
 1.4 29-Mar-1998  jonathan Split 3max (kn02) and 3maxplus (kn03, kn05) memory-error handling out
dec_3max.c into a shared file. These models have compatible memory
subsystems, the same memory slots, and (apparently) the same error reporting.

Add markers for where MNN probes for configurations with a mixture of
RAM sizes and for Prestoserve NVRAM (in normal RAM slots) should go.
 1.3 26-Mar-1998  jonathan * Create /sys/arch/mips/include/intr.h, with extern declaration of
interrupt-callout vector from mips locore dispatch code to port code.
* Move branch-emulation declaration to mips/include/trap.h.
* Garbage-collect pmax/pmax/trap.h.
Not needed now pmax/pmax_trap.c is gone, and after above tidy-up.
 1.2 26-Mar-1998  thorpej Set cpu_model in the dec_foo_init() functions, make them consistent and
descriptive, and print the model before reporting physical memory size.
 1.1 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.7.2.3 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.7.2.2 21-May-1999  nisimura - Sync w/ main trunk change.
 1.7.2.1 20-May-1999  nisimura file memc_3max.c was added on branch nisimura-pmax-wscons on 1999-05-21 01:17:31 +0000
 1.8.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.9.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.11.12.1 18-Oct-2002  nathanw Catch up to -current.
 1.11.8.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.13.130.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.13.126.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.120.1 28-Apr-2009  skrll Sync with HEAD.
 1.13.112.3 11-Mar-2010  yamt sync with head
 1.13.112.2 19-Aug-2009  yamt sync with head.
 1.13.112.1 04-May-2009  yamt sync with head.
 1.15 21-Aug-2019  msaitoh Fix typo (s/contoller/controller/).
 1.14 08-Feb-2011  rmind branches: 1.14.56;
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.13 14-Dec-2009  matt branches: 1.13.4; 1.13.6; 1.13.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.12 20-Jul-2009  tsutsui KNF, ANSIfy, and misc cosmetics.
 1.11 20-Jul-2009  tsutsui Sprinkle keyword volatile around device register accesses.
 1.10 11-Dec-2005  christos branches: 1.10.78; 1.10.96;
merge ktrace-lwp.
 1.9 27-Oct-2003  simonb Fix bogus uninitialised warnings.
 1.8 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.7 09-Jul-2000  nisimura branches: 1.7.26;
Simplify address decode logic for memory parity error condition.
XXX Need to have a better reporting message here.
 1.6 08-Jan-2000  simonb Function prototype cleanup.
 1.5 26-May-1999  nisimura branches: 1.5.2; 1.5.4;
- Continue on branch merge, incrementally.
- Catch up filename changes escaped to be fixed.
 1.4 20-May-1999  nisimura branches: 1.4.2;
Moved from dec_kn02_subr.c
 1.3 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.2 25-Mar-1999  simonb Remove trailing whitespace.
 1.1 25-Mar-1998  jonathan branches: 1.1.4;
Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.1.4.2 20-Oct-1998  nisimura - Add cleaner supports for model specific sub-milliseconds high resolution
timer circuit. 3MAX+ has IOASIC bus cycle counter and MAXINE has its own
circuit. R4000 3MIN ultilizes onchip counter (but I'm not sure how
acculately current codes measure on runtime).
- Add write buffer flush routines for each model. Most DECstations have
their own logics for write buffer flushing different from each other.
It's not good to assume R3000 computers have write buffer drain logic
tied with processor's CU0 bits. Some of modern R3000 CPUs have write
buffer 4 deep FIFO circuit builtin.
- A bit cleanup in conf/files.pmax.
- Add missing kn02ba_memerr() call in pmax/dec_3min.c
- Nuke old remainings in include/autoconf.h
 1.1.4.1 15-Oct-1998  nisimura - Reflect new internals.
 1.4.2.3 12-Nov-1999  nisimura Synchronize various changes made in main trunk.
 1.4.2.2 21-May-1999  nisimura - Sync w/ main trunk change.
 1.4.2.1 20-May-1999  nisimura file memc_3min.c was added on branch nisimura-pmax-wscons on 1999-05-21 01:17:30 +0000
 1.5.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.5.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.7.26.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.26.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.26.1 03-Aug-2004  skrll Sync with HEAD
 1.10.96.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.10.78.2 11-Mar-2010  yamt sync with head
 1.10.78.1 19-Aug-2009  yamt sync with head.
 1.13.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.13.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.4.1 05-Mar-2011  rmind sync with head
 1.14.56.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file memcpy.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.2 18-Jan-1999  drochner remove void * arithmetics
 1.1.2.1 15-Oct-1998  nisimura - unrolled/reordered memcpy() routine taking advantage of 4 word cache line
size.
- unrolled memset().
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file memset.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.1 15-Oct-1998  nisimura - unrolled/reordered memcpy() routine taking advantage of 4 word cache line
size.
- unrolled memset().
 1.6 01-Dec-1999  nisimura Remove a file obsoluted and arrange global extern declarations.
 1.5 25-Mar-1999  simonb branches: 1.5.8; 1.5.14;
Remove trailing whitespace.
 1.4 22-Jun-1997  jonathan * Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).
 1.3 13-Oct-1996  christos backout previous kprintf change
 1.2 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.1 10-Aug-1995  jonathan Map from NetBSD/Alpha names for machine-dependent functions (e.g.,
"force this pending write to complete") to the names used in NetBSD/pmax.
 1.5.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.8.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.20 16-Jun-1997  jonathan Moved to arch/mips/mips/ with CVS revsion history.
 1.19 16-Jun-1997  jonathan Generic mips pmap/vm code: move the merged pmax mips1/mips3 vm_machdep
and pmap code to arch/mips/mips.
Use <mips/XXX.h> header files, not <machine/XXX.h>.
 1.18 15-Jun-1997  mhitch More merged MIPS1/MIPS3 support - from pica pmap.c
 1.17 26-May-1997  jonathan Lint: printf formats inside #ifdef DEBUG (long vs int, %x vs pointer).
Add XXX to inconsistency: sometimes pmap.c calls blkclr(), sometimes it uses
an inline C loop tuned for 4-entry writebuffer. Why?
 1.16 25-May-1997  jonathan Lint: move forward declarations to beginning of file and protoize.
delete unused variables and add redundant parens where suggested.
 1.15 18-May-1997  mhitch Eliminate vm_pmap.
 1.14 14-Jan-1997  jonathan pmaxpagesperpage -> mipspagesperpage
 1.13 13-Oct-1996  christos branches: 1.13.2;
backout previous kprintf change
 1.12 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.11 07-Oct-1996  jonathan Use "MIPS1" and "MIPS3" as preprocessor tokens to select {config,compile}-time
support for mips-1 (r2000 family) and mips-3 (r4000 family) CPUs.
Avoids inconsistent use of CPU_R2000 and CPU_R3000.
 1.10 19-May-1996  jonathan Include <machine/locore.h>, to force all MIPS cpu-model specific
locore calls to go via a locore-entry jumptable.

Use mips_btop(), mips_round_page, mips_trunc_seg() instead
of pmax_btop(), pmax_round_page, pmax_trunc_seg().

Add Per's software-readonly-bit mechanism, since the r2000 and r4000
hardware TLB entries are very different, and the r4k has no space for
software bits in TLB entries. That is, this pmap code still won't work
on r4000 machines. Some other solution, like another jump table for
clients of the pmap code, is necessary.
 1.9 10-Apr-1995  mycroft Oops; finish that last change.
 1.8 10-Apr-1995  mycroft Bring back pmap_kernel(), for now always inlined as a pointer to
kernel_pmap_store.
 1.7 23-Nov-1994  dean thread_wakeup wants (void *) not (int)
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.4 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.3 16-Jan-1994  deraadt add a pmap_kernel() function
 1.2 15-Oct-1993  deraadt update from rick, tarfile of Oct 11 10:46
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.13.2.1 18-Jan-1997  thorpej Update from trunk.
 1.53 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.52 12-Jan-1998  thorpej Update for changes to config.
 1.51 17-Oct-1997  jonathan branches: 1.51.2;
Add explicit #include <vm/vm.h> before mips/pte.h is included.
 1.50 17-Aug-1997  mhitch Use the free-running microsecond counter on the Maxine for high-resolution
clock.
 1.49 06-Aug-1997  jonathan Garbage-collect Mach_clock_addr outside of machdep.c.
Use as mcclock_addr inside machdep.c, to disable clock interrupts
until the clock is autoconfigured.
 1.48 01-Jul-1997  jonathan branches: 1.48.2; 1.48.4;
Remove "untested" comments and messages.
 1.47 22-Jun-1997  jonathan * Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).
 1.46 16-Jun-1997  jonathan GC more old header files:
<machine/locore.h> -> <mips/locore.h>
<machine/mips_opcode.h> -> <mips/mips_opcode..h>
 1.45 15-Jun-1997  mhitch DECstation MIPS3 support: wbflush() is cpu-dependent, need declaration from
machine/locore.h.
 1.44 31-May-1997  mhitch -Wall cleanup when compiling without all DECstation models defined.
 1.43 24-May-1997  jonathan Add 'needs-flag' to pmax, 3max dc (DZ-11 clone) front-ends (dc_ds, dc_ioasic
respectively), so console setup code can test forconfiguration of the
correct front-end (via NDC_DC and NDC_IOASIC, respectively).

Delete 'needs-flags' from dc.c. GC obsolete uses of NDC, "dc.h".
 1.42 15-May-1997  jonathan The pmax interrupt handlers were re-enabling clock interrupts ASAP after
hardclock() is called. Now, only do so if clock intrs were enabled beforehand.
 1.41 25-Mar-1997  jonathan Add <if_media.h>, am7990var.h requires it.
 1.40 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.39 13-Oct-1996  christos branches: 1.39.6;
backout previous kprintf change
 1.38 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.37 16-Jun-1996  mhitch Fix to compile if DS3100 is not defined when building without DS3100 support.
 1.36 15-Jun-1996  jonathan Update kn01_intr() to allow configuration of the kn01 (ds3100) baseboard
lance device at any unit number, not just le0. Other unit numbers
(and interrupt handlers) are still hardcoded.
 1.35 19-May-1996  jonathan branches: 1.35.4;
Update the DECstation stack-traceback pretty-printer, KN01 interrupt handler,
and IOCTL ASIC dma-buffer-reservation code to use the reorganized am7990
preprocessor tokens and function names.
 1.34 10-Apr-1996  jonathan Fixes for -Wall -Wmissing-prototypes:

Add prototypes to (most of) src/sys/arch/pmax/pmax. (The un-protytyped
parts still have pending merges with the Pica port.)
Fix splx() glitches in pmax/clock.c.
Delete old cpu/fpu identification from pmax/autoconf.c, use r4400/r4600/idt
aware code from Pica port, now in mips/mips/mips_machdep.c.
Delete unused multi-CPU autoconfiguration code; NetBSD/pmax does not
support decsystem 5800s anyway.
 1.33 25-Mar-1996  jonathan Split trap handler into mips-generic and port-specific functions:

* Delete pmax-specific functions and declarations from trap.c

* Delete mips-geeneric functions and declaratinos from pmax_trap.c

* Rename the function pointer used to handle hardware interrupts to
"mips_hardware_intr". Define it in trap.c. Change references elsewhere,
including machdep.c.

Verified to boot on a 5000/200.
 1.32 25-Mar-1996  jonathan Copy src/sys/arch/pmax/pmax/trap.c to pmax_trap.c.
trap.c will contain the port-independent mips trap-handling functions.
pmax_trap.h will contain the pmax-specific interrupt handlers.
 1.31 25-Mar-1996  jonathan Force reporting of memory errors for the 3MAX (aka kn02 aka 5000/200) to
always be eight digits.
Copy the kn02 memory-interrupt reporting function to the kn03 (5k/240)
memory-error handler, since the 3MAXPLUS seems to use the same ECC hardware
as the 3MAX.
 1.30 17-Mar-1996  jonathan Additional fixes to complete the NetBSD/1.1B config changes:

Update the kn01 (3100 aka pmax) interrupt handler to use XXX_cd instead
of XXXcd.
 1.29 06-Feb-1996  jonathan Change last argument of ktrsysret() call: pass rval[0], not rval, as
ktrsysret() expects. Tracing of rval[1] remains an open problem.
 1.28 04-Feb-1996  jonathan Redo the locore interrupt counters reported by vmstat -i:
* add a new enum decstation_intr_t to trap.c, naming each instrumented
interrupt symbolically, and used to index into intrcnt[]. Change the
model-specific interrupt handlers to use the decstation_intr_t when
updating interrupt counters.
* add instrumentation to the kmin and maxine interrupt handlers.
* fix a bug that counted each hardclock interrupts on the kn02 twice.

The hardcoded mapping from locore names to units is gross; but these
counters will hopefully be useful in identifying interrupt hot-spots
and PPP problems on the 3MIN.
 1.27 02-Feb-1996  mycroft Fix #includes.
 1.26 31-Jan-1996  jonathan Resolve pmax and alpha IOCTL asic driver differences, pass 1:

Rename the ioctl asic register and slot macros from ASIC_<xxx> to
IOASIC_<xxx>, to be compatible with the machine-indpendent names in
sys/dev/tc/ioasicvar.h. The pmax code still uses
sys/arch/pmax/pmax/asic.h, as some of the registers and offsets
defined there are not yet defined in sys/dev/tc/ioasicvar.h.

Rename the ioctl asic base-address pointer from `asic_base' to `ioasic_base'.
 1.25 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.24 28-Dec-1995  jonathan Change MachEmulateBranch() to be able to read an insn from user space.
Kernel-debugger breakpoints in user space, or FP insns that cause
underflow in a delay slot, should now work properly. Single-stepping
of arbitrary user processes, from user level, should be added.
 1.23 11-Sep-1995  jonathan Rename the Decstation 2100/3100 interrupt functions from "pmax_<func>"
to "kn01_<func>", to avoid confounding a model name (PMAX) with the name of the
entire port (pmax).


Change the signature of interrupt-handlers to take a void *
(a pointer to the softc) and return an int (indicating spurious
interrupts or other conditions.)

Pass softc pointers to the scsi and ethernet kn01 (DS_PMAX) drivers,
rather than having unit numbers wired into the base-level interrupt
handler.
 1.22 01-Aug-1995  jonathan Add prototypes for most functions. Fix typo where statements
intended to increment interrupt counters for vmstat -i (i.e., "ctr++")
on 3100s had just a single "+", and hence had no effect.
 1.21 23-Jul-1995  jonathan Add diagnostics for 5k/240 turbochannel interrupts, and clean up IOASIC clock
declarations.
 1.20 04-Jul-1995  paulus Add code to interrupt to call pppintr.
 1.19 12-May-1995  jonathan Redo 3MAX+ (5k/240) interrupt enable code.

Instead of being a no-op, kn03_intr_enable() sets the sw copy of the
interrupt-enable mask *and* writes it into the IO asic intr-enable
register. Boot code sets the sw copy (kn03_tc_imask) to something
sane (KN03_IM0, with tc option slots turned off). Tested and works.
Interrupt code for other IOASIC machines should be redone so that
interrupts for devices are enabled by drivers, rather than by
cpu-specific boot code. Functions common to all IOASIC machines
(PSWARN?) should be done by asic_init().

Checked in without the above changes so that 3MAX+, MAXINE and 3MIN
interrupt-(enable,handle) can converge.
 1.18 05-May-1995  mellon Fix MAXine interrupt mask routine
 1.17 02-May-1995  jonathan If we panic inside trap(), Do a stack traceback before printing the trap log.
Also change the stack-traceback code to avoid having multiple returns
(and thus multiple stack pops) because with gcc -O2 that breaks the
heuristic that a "jr ra" preceding the PC precedes code to push the
current stack frame. Which breaks stacktrace() before it even
traces past itself :-(. Use a goto instead.
 1.16 29-Apr-1995  jonathan Update MIPS stack backtrace code to trace through locore functions,
traps, and interrupts The earlier (4.4bsd) code didn't do the first two, and
got the last one wrong. Also print some functions (e.g., trap handlers)
by name. Add hook to use something other than printf() as the output
function, e.g,. for kernel debugging.
Tested with the `native' toolset, but not ELF format kernels.
(i.e., unwinding the $GP register is not tested.)

The stack backtrace code that interprets and unwinds stackframes is still
opaque and stylistically awkward.
 1.15 28-Apr-1995  jonathan Check in source code actually containing changes in previous log message--
fixes to turbochannel-based DECstation interrupt enabling.
(I hate network firewalls that break rsh and remote CVS.)
 1.14 28-Apr-1995  jonathan Fix hardware interrupt-mask setup in the 5k/240 (3max)+ interrupt handler.
(A similar fix needs to be applied to the 3min and xine handlers.
This fixes a long-standing problem when booting with a card that
wants to interrupt (e.g., a network interface) would have interrupts
enabled before a handler was set up.

Add interrupt-counting code to model-independent interrupt handler,
and 3max (5k/200) and 3max+ (5k/240) md handlers, for vmstat -i.
Similar changes for 3min and xine are obvious but not done.

Add code for 5k/240 to read, and latch, the current value of the
IOASIC bus-cycle counter at each timer interrupt. The latched
counter is needed to accurately interpolate the bus-cycle counter value
as a high-resolution clock.
 1.13 25-Apr-1995  mellon Fix a few compat code casualties
 1.12 25-Apr-1995  mellon Fix up args to scdebug_{call,ret}
 1.11 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.10 26-Mar-1995  cgd invoke ktrsyscall with (vp, code, argsize, args) as args.
 1.9 18-Jan-1995  mellon Ultrix pcb_regs compatibility, reorder interrupt handlers (probably futile), use new callv naming
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 20-Oct-1994  cgd update for new syscall args description mechanism
 1.6 15-Jun-1994  glass much works but untested w/new fs. expect more tomorrow
 1.5 02-Jun-1994  glass fix a few integration bugs, add vmfault debugging, more ultrix stuff
 1.4 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.3 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.2 16-Jan-1994  deraadt use SYS_syscall instead of SYS_indir
and turn off the 64 bit syscall interface
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.35.4.2 16-Jun-1996  mhitch Pull up from trunk:
> Fix to compile when DS3100 is not defined when building without DS3100
> support.
 1.35.4.1 15-Jun-1996  jonathan Pull up mainbranch fix for autoconfiging kn01 lance at le1.
 1.39.6.2 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.39.6.1 04-Mar-1997  is Adapt to the new arp code.
 1.48.4.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.48.2.2 01-Jul-1997  jonathan Remove "untested" comments and messages.
 1.48.2.1 01-Jul-1997  jonathan file pmax_trap.c was added on branch bouyer-scsipi on 1997-07-01 07:21:16 +0000
 1.51.2.1 04-Feb-1999  cgd Fix path for relocated sys/arch/pmax/stand include files. Done as a
patch since these files don't exist any longer in -current. (simonb)
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.8 11-Sep-1998  nisimura branches: 1.8.2; 1.8.50;
A minor error. kn5800, a MIPS SMP machine, was codenamed "ISIS."
 1.7 31-Mar-1998  jonathan Garbage-collect pmax_boardtype. Remoe pmaxtype.h includes from TC
framebuffer code. Elsewhere, use systype.
 1.6 26-Mar-1998  jonathan Add extern declaration of old "systype" global variable holding model type,
until all pmax code uses platform support.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 02-Jun-1994  glass fix a guess...someone tried to boot it on a 240.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.8.50.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.50.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.50.1 03-Aug-2004  skrll Sync with HEAD
 1.8.2.1 15-Oct-1998  nisimura - Reflect new internals.
 1.6 26-Mar-1996  jonathan Remove src/sys/arch{pmax/pmax,pica/pica}cpu_exec.c; no significant differences,
or for which the Pica port is an older revision of the pmax branch.

A merged version with the NetBSD/pmax revision history is in mips/mips/.
cpu_exec.c
elf.c
mem.c
process_machdep.c
 1.5 20-Mar-1996  jonathan Merge in changes from the Pica port.
Still needs more thought for single-stepping and process_write_regs().
 1.4 20-Dec-1995  jonathan Add support for ptrace PT_GETREGS and PT_SETREGS for NetBSD/pmax:
* define PT_GETREGS and PT_SETREGS in pmax/include/ptrace.h
* Flesh out the stubs in pmax/pmax/process_machdep.c to handle
those requests.
* Now that "struct reg" is actually used, remove the bogus
#ifdef LANGUAGE_C around its definition, and redo pmax/include/reg.h
so that the definitions needed by locore.S are in a separate file,
pmax/include/regnum.h.
* update locore.S to match.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 15-Aug-1994  cgd changes for the new sys_process.c, and some cleanup
 1.1 27-May-1994  glass branches: 1.1.2;
bsd 4.4-lite pmax port as ported to NetBSD
 1.1.2.1 15-Aug-1994  mycroft update from trunk
 1.3 13-Mar-2002  simonb All the mips ports had an identical procfs_machdep.c, so use a common
file under arch/mips/mips.
 1.2 18-Jan-2001  tv branches: 1.2.4; 1.2.8;
No-op commit to force update to a non-"-kk" revision.
 1.1 17-Jan-2001  fvdl branches: 1.1.2;
Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
 1.1.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.1.2.1 17-Jan-2001  bouyer file procfs_machdep.c was added on branch thorpej_scsipi on 2001-01-18 09:22:56 +0000
 1.2.8.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.21 09-Jul-2011  matt Cleanu <machine/*> includes
 1.20 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.19 08-Feb-2011  rmind Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.18 14-Dec-2009  matt branches: 1.18.4; 1.18.6; 1.18.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.17 20-Jul-2009  tsutsui KNF, ANSIfy, and misc cosmetics.
 1.16 18-Mar-2009  cegger bcopy -> memcpy
 1.15 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.14 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.13 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.12 09-Sep-2006  tsutsui branches: 1.12.58; 1.12.66; 1.12.72; 1.12.76;
volatile void -> void __attribute__((__noreturn__)) to appease gcc4.
 1.11 11-Dec-2005  christos branches: 1.11.8; 1.11.20;
merge ktrace-lwp.
 1.10 01-Jun-2005  drochner branches: 1.10.2;
make the argument to prom getenv() cnd the printf() format const
remove variable names from prototypes
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.8 24-Aug-2001  mhitch branches: 1.8.6; 1.8.24;
Use the PROM bitmap, if available, to determine available memory. Also
add support of multiple memory segments so machines that allow mixed
memory sizes can utilize all available memory.
 1.7 30-Mar-2000  simonb branches: 1.7.8;
Nuke register.
 1.6 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.5 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.4 30-Nov-1999  simonb Remove our own atoi() and use libkern's strtoul().
 1.3 08-Jun-1999  simonb branches: 1.3.2; 1.3.4; 1.3.10;
+ Add prom_getenv(), and use it instead off calling callv->_getenv.
+ Add prom_scsiid() to read and decode the prom scsiidN environment
variable that says what the host SCSI id should be.
+ Include <pmax/pmax/machdep.h> instead of declaring our own
prom_*() prototypes.
 1.2 25-May-1999  nisimura - Continue to import a development branch.
- Minor formatting fix.
 1.1 11-May-1999  nisimura branches: 1.1.2;
- Have 'promcall.c' for various utilities by PROM calls.
- Adjust files.pmax.
 1.1.2.2 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.1.2.1 11-May-1999  nisimura file promcall.c was added on branch nisimura-pmax-wscons on 1999-05-11 06:43:16 +0000
 1.3.10.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.4.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.2.2 21-Jun-1999  thorpej Sync w/ -current.
 1.3.2.1 08-Jun-1999  thorpej file promcall.c was added on branch chs-ubc2 on 1999-06-21 00:59:08 +0000
 1.7.8.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.8.24.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.24.1 03-Aug-2004  skrll Sync with HEAD
 1.8.6.2 24-Aug-2001  mhitch Use the PROM bitmap, if available, to determine available memory. Also
add support of multiple memory segments so machines that allow mixed
memory sizes can utilize all available memory.
 1.8.6.1 24-Aug-2001  mhitch file promcall.c was added on branch nathanw_sa on 2001-08-24 15:33:18 +0000
 1.10.2.1 30-Dec-2006  yamt sync with head.
 1.11.20.1 18-Nov-2006  ad Sync with head.
 1.11.8.1 14-Sep-2006  yamt sync with head.
 1.12.76.3 29-Dec-2010  matt Use a promcall wrapper function to call the prom. For non O32 systems
this will save and restore the callee saved registers since the 32-bit
prom probably won't be saving all 64bits.
 1.12.76.2 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.12.76.1 16-Sep-2009  matt Deal with some LP64 issues with only O32 console.
Make bootloader invoke kernel compatible with both O32 and N32
 1.12.72.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.12.66.1 28-Apr-2009  skrll Sync with HEAD.
 1.12.58.2 19-Aug-2009  yamt sync with head.
 1.12.58.1 04-May-2009  yamt sync with head.
 1.18.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.18.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.18.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.18.4.1 05-Mar-2011  rmind sync with head
 1.10 31-Jan-1997  thorpej This file is obsolete; this information is now generated by config(8).
 1.9 13-Oct-1996  christos backout previous kprintf change
 1.8 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.7 13-Sep-1995  jonathan Rename the old pmax SCSI driver's "struct scsi_device" to
"struct pmax_scsi_device", to avoid name conflicts with the sys/dev/scsi
SCSI driver.
 1.6 24-Nov-1994  dean more patches from Jonathan Stone
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 16-Jun-1994  glass ufs --> ffs...basically back out a pre-fs change
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.3 16-Apr-1994  mycroft Clean up deleted files.
 1.2 15-Apr-1994  cgd convert vm system to use new queues. I'll never write code w/queues again.
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.11 09-Jun-1997  jonathan Move the mips sys_machdep.c from pmax/pmax to mips/mips, to enforce a
common sysarch on all mips ports.
 1.10 10-Apr-1996  jonathan Fixes for -Wall -Wmissing-prototypes:

Add prototypes to (most of) src/sys/arch/pmax/pmax. (The un-protytyped
parts still have pending merges with the Pica port.)
Fix splx() glitches in pmax/clock.c.
Delete old cpu/fpu identification from pmax/autoconf.c, use r4400/r4600/idt
aware code from Pica port, now in mips/mips/mips_machdep.c.
Delete unused multi-CPU autoconfiguration code; NetBSD/pmax does not
support decsystem 5800s anyway.
 1.9 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.8 20-Sep-1995  jonathan branches: 1.8.2;
Include <sys/mount.h>, as the new <sys/syscallargs.h> won't compile without it.
 1.7 19-Sep-1995  thorpej Make system calls conform to a standard prototype and bring those
prototypes into scope.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 20-Oct-1994  cgd update for new syscall args description mechanism
 1.4 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.3 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.2 16-Jan-1994  deraadt add sysarch() stub
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.8.2.1 13-Oct-1995  jonathan Add "sys_" prefix to the function implementing the sysarch() system call.
 1.14 09-Jul-2011  matt Cleanu <machine/*> includes
 1.13 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.12 18-Mar-2009  cegger branches: 1.12.4; 1.12.6; 1.12.8;
Ansify function definitions w/o arguments. Generated with sed.
 1.11 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.10 11-Dec-2005  christos branches: 1.10.78; 1.10.86; 1.10.92; 1.10.96;
merge ktrace-lwp.
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 27-Sep-2002  provos branches: 1.8.6;
remove trailing \n in panic(). approved perry.
 1.7 10-Jan-2000  simonb branches: 1.7.8; 1.7.12;
Remove unneeded include files (up to 16 in two files!).
 1.6 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.5 08-Jan-2000  simonb Function prototype cleanup.
 1.4 25-Mar-1999  simonb branches: 1.4.8;
Remove trailing whitespace.
 1.3 15-Mar-1999  nisimura - Fix config option name for 3MAX+.
 1.2 31-Mar-1998  jonathan branches: 1.2.4;
Add emtpy entries for unused systypes between 5400 (0x6) and 5500 (0xb)
 1.1 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.2.4.1 15-Mar-1999  nisimura - Sync. w/ main trunk.
- Remove unnecessary includes.
 1.4.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.12.1 18-Oct-2002  nathanw Catch up to -current.
 1.7.8.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.8.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.6.1 03-Aug-2004  skrll Sync with HEAD
 1.10.96.1 24-Dec-2010  matt Adapt to the new spl/interrupt framework.
Include <mips/locore.h> when needed.
 1.10.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.10.78.1 04-May-2009  yamt sync with head.
 1.12.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.12.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.12.4.1 05-Mar-2011  rmind sync with head
 1.46 13-Oct-1996  jonathan Remove sys/arch/pmax/pmax/{locore.S,trap.c}.
Use versions from sys/arch/mips/mips instead.
 1.45 13-Oct-1996  christos backout previous kprintf change
 1.44 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.43 07-Oct-1996  jonathan Merge back MIPS3 locore stack-traceback code.
 1.42 07-Oct-1996  jonathan Use "MIPS1" and "MIPS3" as preprocessor tokens to select {config,compile}-time
support for mips-1 (r2000 family) and mips-3 (r4000 family) CPUs.
Avoids inconsistent use of CPU_R2000 and CPU_R3000.
 1.41 18-Sep-1996  jonathan Fix for problem report port-pmax/2173: the local variable "inst"
in the branch-emulation code was uninitialized, due to a misplaced #endif.

Remove the relevant #ifdef (macro version of GetBranchDest), and move the
XXX note about r4000 branch targets to the function definition.
 1.40 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.39 09-Aug-1996  mhitch Add missing #include of "ppp.h" to get definition of NPPP so that the
pppintr() call is actually included. This fixes ppp so that it actually
works again.
 1.38 17-Jun-1996  jonathan Move cpu_singlestep outside of #ifdef DEBUG/#endif; the process-tracing code
in mips/mips/process_machdep.c (erroneously) calls cpu_singlestep().
 1.37 20-May-1996  jonathan branches: 1.37.2;
Check that either CPU_R3000 or CPU_R4000 is defined. Fix the r3k/r2k
symbolic lookup of the CPU-level specific locore entry points to use the
r2k, not the r4k, labels.

Include header files to get prototyped declarations of ipintr() and arpintr().
Remove unused variables and parenthesize assignments in if () expressions.

Gcc warns of a possible && vs || operator-precedence bug in the network
softint dispatch code, which needs more thought.
 1.36 19-May-1996  jonathan Update the DECstation stack-traceback pretty-printer, KN01 interrupt handler,
and IOCTL ASIC dma-buffer-reservation code to use the reorganized am7990
preprocessor tokens and function names.
 1.35 19-May-1996  jonathan Include <machine/locore.h>, to force all MIPS cpu-model specific
locore calls to go via a locore-entry jumptable.

Declare r2000- and r4000-specific exception-handler functions, to which
trap() and interrupt() dispatch exceptions. Initialize r2000- and r4000-
specific exception-handler vectors, when CPU_R4000 and CPU_R2000 are
defined.

Update the stack-traceback code (partially) to understand and print
the new low-level exception-handler code, via which machine exception-vectors
send exceptions to call trap() or interrupt(). This needs more work.
 1.34 31-Mar-1996  jonathan merge mips and pica locore.S, pass 0:
* cut-and-paste all the code for both r2000 (MIPS-I) and r4000 (MIPS-III)
into both the pica and pmax locore.S.

* Change the names of the small segments of vector code that are
bcopied to the machine vector locations, to avoid clashing.
Get rid of the Sprite MachXXX names for the vector code, and
use use mips_r2000_xxx and mips_r4000_xxx instead.

Update the names used in the vector-copying code and trap handlers
to match.

* Most of the rest of the pica locore.S was copied from the pmax
locore.S, and then edited to work on an r4000. The names of
functions and of manifest constants stayed the same, although
both assmbler code and constant values changed.
cut-and-paste such code into contiguous blocks protected by
#if / #endif. Much of the cache and trap-handling code
needs r3000-only register fields, on the r3000, and r4000-only
insns and registers on the r4000.

* change the pmax r2000 exception-handling code to extract a trap
code with the user/kernel bit at 0x20 rather than 0x10.
(r2000s have 4-bit execption codes, r4000s have 5-bit.)
Use the a 16 from-user-space + 16-from-kernel space jump table,
just like on the r4000 pica port.

* add NOPs to the common code where required by the r4000 pipeline
constraints.
* add _C_LABEL() macros to the r4000 locore.

Comitted to provide a snapshot for others to test, and work on a cleaner merge.
 1.33 25-Mar-1996  jonathan Split trap handler into mips-generic and port-specific functions:

* Delete pmax-specific functions and declarations from trap.c

* Delete mips-geeneric functions and declaratinos from pmax_trap.c

* Rename the function pointer used to handle hardware interrupts to
"mips_hardware_intr". Define it in trap.c. Change references elsewhere,
including machdep.c.

Verified to boot on a 5000/200.
 1.32 25-Mar-1996  jonathan Copy src/sys/arch/pmax/pmax/trap.c to pmax_trap.c.
trap.c will contain the port-independent mips trap-handling functions.
pmax_trap.h will contain the pmax-specific interrupt handlers.
 1.31 25-Mar-1996  jonathan Force reporting of memory errors for the 3MAX (aka kn02 aka 5000/200) to
always be eight digits.
Copy the kn02 memory-interrupt reporting function to the kn03 (5k/240)
memory-error handler, since the 3MAXPLUS seems to use the same ECC hardware
as the 3MAX.
 1.30 17-Mar-1996  jonathan Additional fixes to complete the NetBSD/1.1B config changes:

Update the kn01 (3100 aka pmax) interrupt handler to use XXX_cd instead
of XXXcd.
 1.29 06-Feb-1996  jonathan Change last argument of ktrsysret() call: pass rval[0], not rval, as
ktrsysret() expects. Tracing of rval[1] remains an open problem.
 1.28 04-Feb-1996  jonathan Redo the locore interrupt counters reported by vmstat -i:
* add a new enum decstation_intr_t to trap.c, naming each instrumented
interrupt symbolically, and used to index into intrcnt[]. Change the
model-specific interrupt handlers to use the decstation_intr_t when
updating interrupt counters.
* add instrumentation to the kmin and maxine interrupt handlers.
* fix a bug that counted each hardclock interrupts on the kn02 twice.

The hardcoded mapping from locore names to units is gross; but these
counters will hopefully be useful in identifying interrupt hot-spots
and PPP problems on the 3MIN.
 1.27 02-Feb-1996  mycroft Fix #includes.
 1.26 31-Jan-1996  jonathan Resolve pmax and alpha IOCTL asic driver differences, pass 1:

Rename the ioctl asic register and slot macros from ASIC_<xxx> to
IOASIC_<xxx>, to be compatible with the machine-indpendent names in
sys/dev/tc/ioasicvar.h. The pmax code still uses
sys/arch/pmax/pmax/asic.h, as some of the registers and offsets
defined there are not yet defined in sys/dev/tc/ioasicvar.h.

Rename the ioctl asic base-address pointer from `asic_base' to `ioasic_base'.
 1.25 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.24 28-Dec-1995  jonathan Change MachEmulateBranch() to be able to read an insn from user space.
Kernel-debugger breakpoints in user space, or FP insns that cause
underflow in a delay slot, should now work properly. Single-stepping
of arbitrary user processes, from user level, should be added.
 1.23 11-Sep-1995  jonathan Rename the Decstation 2100/3100 interrupt functions from "pmax_<func>"
to "kn01_<func>", to avoid confounding a model name (PMAX) with the name of the
entire port (pmax).


Change the signature of interrupt-handlers to take a void *
(a pointer to the softc) and return an int (indicating spurious
interrupts or other conditions.)

Pass softc pointers to the scsi and ethernet kn01 (DS_PMAX) drivers,
rather than having unit numbers wired into the base-level interrupt
handler.
 1.22 01-Aug-1995  jonathan Add prototypes for most functions. Fix typo where statements
intended to increment interrupt counters for vmstat -i (i.e., "ctr++")
on 3100s had just a single "+", and hence had no effect.
 1.21 23-Jul-1995  jonathan Add diagnostics for 5k/240 turbochannel interrupts, and clean up IOASIC clock
declarations.
 1.20 04-Jul-1995  paulus Add code to interrupt to call pppintr.
 1.19 12-May-1995  jonathan Redo 3MAX+ (5k/240) interrupt enable code.

Instead of being a no-op, kn03_intr_enable() sets the sw copy of the
interrupt-enable mask *and* writes it into the IO asic intr-enable
register. Boot code sets the sw copy (kn03_tc_imask) to something
sane (KN03_IM0, with tc option slots turned off). Tested and works.
Interrupt code for other IOASIC machines should be redone so that
interrupts for devices are enabled by drivers, rather than by
cpu-specific boot code. Functions common to all IOASIC machines
(PSWARN?) should be done by asic_init().

Checked in without the above changes so that 3MAX+, MAXINE and 3MIN
interrupt-(enable,handle) can converge.
 1.18 05-May-1995  mellon Fix MAXine interrupt mask routine
 1.17 02-May-1995  jonathan If we panic inside trap(), Do a stack traceback before printing the trap log.
Also change the stack-traceback code to avoid having multiple returns
(and thus multiple stack pops) because with gcc -O2 that breaks the
heuristic that a "jr ra" preceding the PC precedes code to push the
current stack frame. Which breaks stacktrace() before it even
traces past itself :-(. Use a goto instead.
 1.16 29-Apr-1995  jonathan Update MIPS stack backtrace code to trace through locore functions,
traps, and interrupts The earlier (4.4bsd) code didn't do the first two, and
got the last one wrong. Also print some functions (e.g., trap handlers)
by name. Add hook to use something other than printf() as the output
function, e.g,. for kernel debugging.
Tested with the `native' toolset, but not ELF format kernels.
(i.e., unwinding the $GP register is not tested.)

The stack backtrace code that interprets and unwinds stackframes is still
opaque and stylistically awkward.
 1.15 28-Apr-1995  jonathan Check in source code actually containing changes in previous log message--
fixes to turbochannel-based DECstation interrupt enabling.
(I hate network firewalls that break rsh and remote CVS.)
 1.14 28-Apr-1995  jonathan Fix hardware interrupt-mask setup in the 5k/240 (3max)+ interrupt handler.
(A similar fix needs to be applied to the 3min and xine handlers.
This fixes a long-standing problem when booting with a card that
wants to interrupt (e.g., a network interface) would have interrupts
enabled before a handler was set up.

Add interrupt-counting code to model-independent interrupt handler,
and 3max (5k/200) and 3max+ (5k/240) md handlers, for vmstat -i.
Similar changes for 3min and xine are obvious but not done.

Add code for 5k/240 to read, and latch, the current value of the
IOASIC bus-cycle counter at each timer interrupt. The latched
counter is needed to accurately interpolate the bus-cycle counter value
as a high-resolution clock.
 1.13 25-Apr-1995  mellon Fix a few compat code casualties
 1.12 25-Apr-1995  mellon Fix up args to scdebug_{call,ret}
 1.11 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.10 26-Mar-1995  cgd invoke ktrsyscall with (vp, code, argsize, args) as args.
 1.9 18-Jan-1995  mellon Ultrix pcb_regs compatibility, reorder interrupt handlers (probably futile), use new callv naming
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 20-Oct-1994  cgd update for new syscall args description mechanism
 1.6 15-Jun-1994  glass much works but untested w/new fs. expect more tomorrow
 1.5 02-Jun-1994  glass fix a few integration bugs, add vmfault debugging, more ultrix stuff
 1.4 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.3 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.2 16-Jan-1994  deraadt use SYS_syscall instead of SYS_indir
and turn off the 64 bit syscall interface
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.37.2.4 05-Dec-1996  rat Pullup 1.39 -> 1.40 from Jonathan Stone <jonathan@DSG.Stanford.EDU>

>Fixes a semantic confusion between SIGBUS and SIGSEGV
 1.37.2.3 19-Sep-1996  thorpej Pull up changes between revs 1.40 and 1.41 (a critical bug fix) by
request from Jonathan Stone. Log message:

>revision 1.41
>date: 1996/09/18 11:16:20; author: jonathan; state: Exp; lines: +11 -14
>Fix for problem report port-pmax/2173: the local variable "inst"
>in the branch-emulation code was uninitialized, due to a misplaced #endif.
>
>Remove the relevant #ifdef (macro version of GetBranchDest), and move the
>XXX note about r4000 branch targets to the function definition.
 1.37.2.2 09-Sep-1996  thorpej Pullup diffs between revs 1.38 and 1.39, by request from Jonathan Stone.
Log message:

revision 1.39
date: 1996/08/09 05:11:02; author: mhitch; state: Exp; lines: +3 -1
Add missing #include of "ppp.h" to get definition of NPPP so that the
pppintr() call is actually included. This fixes ppp so that it actually
works again.
 1.37.2.1 17-Jun-1996  jonathan Move cpu_singlestep outside of #ifdef DEBUG/#endif; the process-tracing code
in mips/mips/process_machdep.c (erroneous) calls cpu_singlestep().
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.2 01-Mar-1995  mycroft Clean up deleted files.
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.2 01-Mar-1995  mycroft Clean up deleted files.
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.3 26-Mar-1998  jonathan * Create /sys/arch/mips/include/intr.h, with extern declaration of
interrupt-callout vector from mips locore dispatch code to port code.
* Move branch-emulation declaration to mips/include/trap.h.
* Garbage-collect pmax/pmax/trap.h.
Not needed now pmax/pmax_trap.c is gone, and after above tidy-up.
 1.2 25-May-1997  jonathan Apply NetBSD-1.2 name changes to pmax board-specific trap handler declarations.
 1.1 28-Aug-1995  jonathan External declarations for Decstation model-specific interrupt handers.
 1.12 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.11 08-Jan-2000  simonb Function prototype cleanup.
 1.10 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.9 25-Mar-1999  simonb branches: 1.9.8; 1.9.14;
Remove trailing whitespace.
 1.8 19-May-1996  jonathan branches: 1.8.20;
Change block comment where each line began with "/*", to use the KNF
block comment style. Also passes gcc -Wall.
 1.7 12-Sep-1995  jonathan Change the signature of interrupt-handlers to take a void *
(a pointer to the softc) and return an int (indicating spurious
interrupts or other conditions.)
 1.6 04-Aug-1995  jonathan Add a prototype for (tc_enable_interrupt)().
 1.5 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.8.20.1 06-Dec-1999  nisimura Remove obsoluted files in this branch.
 1.9.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.8.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.18 16-Jun-1997  jonathan Moved to arch/mips/mips/ with CVS revsion history.
 1.17 16-Jun-1997  jonathan Generic mips pmap/vm code: move the merged pmax mips1/mips3 vm_machdep
and pmap code to arch/mips/mips.
Use <mips/XXX.h> header files, not <machine/XXX.h>.
 1.16 15-Jun-1997  mhitch From Toru Nishimura: _FORKBRAINDAMAGE is gone, user process entered through
proc_trampoline().
More merged MIPS1/MIPS3 support.
 1.15 25-May-1997  jonathan lint: add prototype for kvtophys().
 1.14 18-May-1997  mhitch Eliminate vm_pmap.
 1.13 13-Oct-1996  christos backout previous kprintf change
 1.12 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.11 19-May-1996  jonathan Add local declarations for locore functions. Fix pagemove() return
type to be void. Add explicit "int" return types.
Fix format/argument mismatches for vm_offset_t's in diagnostic messages.
 1.10 19-May-1996  jonathan Include <machine/locore.h>, to force all MIPS cpu-model specific
locore calls to go via a locore-entry jumptable.

Cast the (int) arguments to MachTLBUpdateEntry() to avoid
warnings. Variables TLB entries are still type-punned as either structs
or ints, without any regard, when the pmax-specific VM code passes
them as arguments to functions.
 1.9 06-Feb-1996  jonathan The prototyping `fixes' broke vmapbuf() and vunmapbuf(), due to a "sz"
parameter parameters shadowing locals. Replace vmapbuf() and vunmapbuf()
with the Alpha-port versions, which are cleaner (use round_page(),
trunc_page(), etc.)
 1.8 05-Feb-1996  christos vm prototype changes
 1.7 25-Sep-1995  jonathan Add "kvtophys()", which maps MIPS R2000 kernel-virtual addresses to physical addresses,
so they can (e.g.) be written to DMA mapping registers.
 1.6 18-Jan-1995  mellon Write out new-style core files
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.3 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.2 16-Jan-1994  deraadt cpu_exit returns void
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.19 21-Apr-2009  tsutsui Add UFS2 boot support. Tested on gxemul.
 1.18 04-Apr-2002  lukem branches: 1.18.116; 1.18.124; 1.18.130;
Decommission pmax MD installboot in favour of MI installboot.
(Woo! pmax first again - hi Simon! :-)
 1.17 23-Feb-2002  gmcgarry Support two-stage netboot. Is known to work on maxine, but problems
have been reported on 3min.
 1.16 28-Nov-1999  simonb branches: 1.16.8; 1.16.12;
Enable new pmax bootblocks.
 1.15 27-Nov-1999  simonb Use new pmax stand structure for multi-filesystem bootblocks. All
entries are commented out for now until everything else is updated.
 1.14 27-Mar-1999  simonb branches: 1.14.8; 1.14.14;
Enable now that "make depend" works properly.
 1.13 24-Mar-1999  simonb New bootblock directory structure.
 1.12 23-Mar-1999  simonb Don't build anything while bootblocks are being updated.
 1.11 21-Jan-1999  simonb Almost working bootblocks for the pmax. This compiles fine with gcc
2.7.2.2-myc2 (and produces _identical_ bootblocks with the 1.3.3
bootblocks which weren't in the tree), but egcs 1.1.1 builds a ufs.o
that's about a 100 bytes too big, and it busts the 7.5k we've got for
bootrz.

Still needs cleanup - the Makefiles could be better/cleaner, and doesn't
install yet (because of above problem). At least there's something to
work with now.

Note that we have our own versions of a lot of the sys/lib/libsa
routines which are less functional/smaller.
 1.10 18-Oct-1997  jonathan branches: 1.10.2;
Note non-inclusion of up-to-date bootblock source for 1.3, as
suggested by release engineers.
 1.9 25-May-1997  jonathan Create standard Makefile for arch/pmax/stand.
Copy old Makefile with bootblock rules to Makefile.booters.
 1.8 18-Oct-1996  thorpej Use ${INSTALL}.
 1.7 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.6 15-Jan-1996  thorpej Use ${BINOWN} and ${BINGRP} per Arne H. Juul <arnej@ikke.idt.unit.no>
in PR #705.
 1.5 18-Jan-1995  mellon Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.10.2.1 02-Feb-1999  cgd pull up rev 1.11 from trunk (simonb)
 1.14.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.14.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.16.12.2 17-Apr-2002  nathanw Catch up to -current.
 1.16.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.16.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.16.8.1 16-Mar-2002  jdolecek Catch up with -current.
 1.18.130.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.124.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.116.1 04-May-2009  yamt sync with head.
 1.65 25-Apr-2021  christos Handle mipsn64
 1.64 01-Jan-2019  christos branches: 1.64.16;
ELF2ECOFF -> MIPS_ELF2ECOFF
 1.63 08-Apr-2017  christos branches: 1.63.12; 1.63.14;
centralize vers.c building for standalone programs.
 1.62 03-Sep-2016  christos branches: 1.62.2;
Add NOPIE
 1.61 22-Mar-2016  mrg branches: 1.61.2;
remove a bunch of "@echo done" from the tail of rules. these messages
were vaguely useful back when we didn't run make -j, but now you end
up with a single line "done" every so often, with no idea what it is
for. very few other targets claim they're done so just remove these.
 1.60 16-Jan-2014  christos branches: 1.60.6;
eliminate use of bsd.sys.mk from Makefiles
 1.59 12-Jan-2014  tsutsui Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

XXX: probabry we should have bsd.saprog.mk or something.
 1.58 12-Aug-2013  joerg Build boot loaders without unwind tables.
 1.57 10-Jul-2011  mrg branches: 1.57.2; 1.57.12; 1.57.16;
don't set MACHINE_ARCH. the CPUFLAGS/etc. is enough, and otherwise this
doesn't work with an isolated $TOOLDIR from the mipse[lb] toolchain.
 1.56 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.55 28-Jan-2011  tsutsui typo
 1.54 23-Jan-2011  joerg Define NOMAN earlier
 1.53 22-Jan-2011  joerg Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
 1.52 27-May-2010  dholland branches: 1.52.2; 1.52.4;
Introduce .WAIT into the cleandir rule for blasting the libsa/libkern/etc.
trees, because it can race with the libsa/libkern/etc. makefiles' own
cleandir rules. I think I've found all of the uses of the offending idiom...
Closes PR 43360.
 1.51 23-Apr-2009  tsutsui branches: 1.51.2; 1.51.4;
Make sure to remove all generated files on cleandir.
 1.50 23-Apr-2009  tsutsui Use <bsd.klinks.mk> to create machine and ${MACHINE_ARCH} symlinks.
 1.49 03-Apr-2009  tsutsui Remove obsolete LIBSA_USE_MEMCPY and LIBSA_USE_MEMSET.
They were removed from <lib/libsa/stand.h> on December 2007.
 1.48 17-Mar-2009  he Introduce LIBSA_NO_DEV_IOCTL, and don't declare ioctl() if it's defined.
Also, don't declare the close() function if LIBSA_NO_DEV_CLOSE is defined.
 1.47 12-Jan-2009  tsutsui branches: 1.47.2;
WARNSfy
 1.46 11-Dec-2005  christos branches: 1.46.74; 1.46.78; 1.46.86;
merge ktrace-lwp.
 1.45 01-Jan-2005  simonb Don't specify the object format to pick the right endianness - the
linker already knows if it is big- or little-endian.
 1.44 21-Jun-2004  jmc Ignore errors on some rm -rf's for platforms that aren't quite
POSIX compliant
and return errors on r/o source (FreeBSD) for -rf. Fixes PR#25022
 1.43 24-Nov-2003  he branches: 1.43.2;
I've been informed that any dependent targets on .BEGIN are
ignored. Fix the symlink creation for machine, mips, and pmax
accordingly.

Also, there's nothing .PHONY about the vers.c target, as far as I
can see, so I've removed that.
 1.42 26-Oct-2003  lukem Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
 1.41 08-Oct-2003  simonb Define LIB{CRT0,C,CRTBEGIN,CRTEND} as nothing, we don't need to link
against them.
 1.40 09-Dec-2002  jdolecek branches: 1.40.6;
need -mno-abicalls in AFLAGS as well, so that .S would be compiled as
non-PIC same way as .c
 1.39 09-Dec-2002  jdolecek build with -ffreestanding
 1.38 07-May-2002  simonb Use "NOMAN=" instead of "MKMAN=no"; per lukem.
 1.37 05-May-2002  jdolecek no manpages here
 1.36 04-May-2002  gmcgarry Pull in <bsd.own.mk> for definition of ELF2ECOFF.
 1.35 12-Apr-2002  lukem use ${ELF2ECOFF} from <bsd.{own,sys}.mk>
 1.34 20-Mar-2002  gmcgarry Test for USETOOLS properly.
cVS: ----------------------------------------------------------------------
 1.33 23-Feb-2002  gmcgarry Support two-stage netboot. Is known to work on maxine, but problems
have been reported on 3min.
 1.32 05-Oct-2001  simonb branches: 1.32.4;
Use a single ldscript instead of separate scripts for either endianness;
use command line parameters to ld(1) instead to set the endian format.
Clean up some endian decisions in mips/conf/Makefile.mips.
Wrap some long lines.
 1.31 22-Sep-2001  tsutsui Fix errors on make cleandir in stand/boot* dirs.
Patch from misc/14012 by kwellsch@tampabay.rr.com.
 1.30 13-Jul-2000  jdolecek branches: 1.30.2; 1.30.4;
switch to sys/conf/newvers_stand.sh for generating vers.c
sync comments in */version with i386
add a hack to ${PROG} target so that symlinks machine, pmax, mips are
created properly even when building on NetBSD/pmax 1.4.1
 1.29 21-May-2000  soren Also share BE ldscripts.
 1.28 23-Jan-2000  mycroft Clean up the machine symlink stuff ever so slightly. Needs to be
standardized between files.
 1.27 27-Nov-1999  simonb Update for new alpha-style bootblocks - a good deal of this is based on
the alpha stand/Makefile.bootprogs and stand/Makefile.bootxx.
 1.26 13-Nov-1999  thorpej Backout my libsa changes.
 1.25 12-Nov-1999  simonb Remove references to libkern after Jason's recent work to libsa.
 1.24 21-Jul-1999  mrg branches: 1.24.2; 1.24.4; 1.24.8;
do not "quote" SAMISCMAKEFLAGS values, it causes pain and suffering.
 1.23 28-Apr-1999  christos use new loadfile
 1.22 11-Apr-1999  simonb Move BINDIR, BINMODE to Makefile.inc.
Remove -DSMALL.
Define an empty LIBZ if building first stage bootblocks since LIBZ
defaults to /usr/lib/libz.a.
 1.21 01-Apr-1999  simonb branches: 1.21.4;
Build the full MI libsa for the first stage bootblocks rather than
picking the bits we wanted explicitly, taking advantage of some of the
recent code-size trimming from cgd. There's now no duplication if libsa
code in sys/arch/pmax/stand.

As a bonus, we now have 416 bytes free in stage one (up from 80), and
will all of Chris' space saving options enabled (these are commented out
in scsiboot/Makefile), theres over a 1kB free.
 1.20 31-Mar-1999  simonb Create/build vers.c/vers.o inside the final link stage so that the build
datestamp get's updated each build.
 1.19 31-Mar-1999  simonb Reorder ${LIBS} so that we don't need to explicitly pull in bcmp.c
and bzero.c from libkern.
 1.18 27-Mar-1999  simonb Go back to a Makefile.booters scheme, like most other ports do. No
more problems for "make depend" - tested with and without obj dirs.
 1.17 25-Mar-1999  simonb Not needed at the moment - may be resurrected when netboot comes along.
 1.16 22-Feb-1999  simonb Load the bootblocks at 0x8070000 so that ramdisk kernels don't
overwrite the beginning of the bootblocks.
 1.15 30-Jan-1999  simonb Actually depend on libsa now.
 1.14 22-Jan-1999  simonb More Makefile cleanups:
+ Don't use our own "clean" and "depend" targets
+ "make depend" works
+ Only include each include path once on compile lines
+ Clean up include file names
+ Don't build a separate libdrive.a, just specify driver source files
+ Use "make print-objdir" instead of old "printf ... | make -f-"
+ Remove more unnecessary targets, variables and other cruft

Still builds identical bootblocks to 1.3.3 with gcc, still too large
with egcs.

dec_boot.h, dec_exec.h & dec_prom.h were copied via respository
copy to sys/arch/pmax/stand/libsa.
 1.13 21-Jan-1999  simonb Round one of the Makefile clean up:
+ dependency on libsa works
+ set and use BINDIR/BINMODE
+ don't pull in sys/lib/lib{sa,kern}/Makefile.inc (``make clean''
doesn't make empty lib/{sa,kern} directories in each
directory/obj dir).
+ remove unnecessary targets, variables and other cruft
+ wrap lines at 80 chars

Re-ordering SRCS line in libsa/Makefile to a more logical sequence
(alphabetical by source dir) results in a libsa.a with archive members
in a different order, and a resultant bootrz that differs from the 1.3.3
bootrz. Untested as yet, so left in but commented out.

Also, _don't_ install the bootblocks (as per intent of previous commit)
or our own small libsa(!).
 1.12 21-Jan-1999  simonb Almost working bootblocks for the pmax. This compiles fine with gcc
2.7.2.2-myc2 (and produces _identical_ bootblocks with the 1.3.3
bootblocks which weren't in the tree), but egcs 1.1.1 builds a ufs.o
that's about a 100 bytes too big, and it busts the 7.5k we've got for
bootrz.

Still needs cleanup - the Makefiles could be better/cleaner, and doesn't
install yet (because of above problem). At least there's something to
work with now.

Note that we have our own versions of a lot of the sys/lib/libsa
routines which are less functional/smaller.
 1.11 22-May-1998  drochner STANDALONE->_STANDALONE (cpp definition)
closes PR kern/5481 (Erik Bertelsen <erik@q610.ebe.uni-c.dk>)
 1.10 15-Jun-1997  jonathan branches: 1.10.8;
Remove old 4.4bsd/pmax rules and targets.
 1.9 25-May-1997  jonathan Create standard Makefile for arch/pmax/stand.
Copy old Makefile with bootblock rules to Makefile.booters.
 1.8 18-Oct-1996  thorpej Use ${INSTALL}.
 1.7 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.6 15-Jan-1996  thorpej Use ${BINOWN} and ${BINGRP} per Arne H. Juul <arnej@ikke.idt.unit.no>
in PR #705.
 1.5 18-Jan-1995  mellon Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.10.8.1 02-Feb-1999  cgd pull up revs 1.11-1.14 from trunk (simonb)
 1.21.4.2 02-Aug-1999  thorpej Update from trunk.
 1.21.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.24.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.24.4.1 15-Nov-1999  fvdl Sync with -current
 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.30.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.30.4.2 16-Mar-2002  jdolecek Catch up with -current.
 1.30.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.30.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.30.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.32.4.6 11-Dec-2002  thorpej Sync with HEAD.
 1.32.4.5 20-Jun-2002  nathanw Catch up to -current.
 1.32.4.4 17-Apr-2002  nathanw Catch up to -current.
 1.32.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.32.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.32.4.1 05-Oct-2001  nathanw file Makefile.booters was added on branch nathanw_sa on 2002-02-28 04:11:23 +0000
 1.40.6.4 17-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.43.2.1 22-Jun-2004  tron Pull up revision 1.44 (requested by jmc in ticket #531):
Ignore errors on some rm -rf's for platforms that aren't quite
POSIX compliant
and return errors on r/o source (FreeBSD) for -rf. Fixes PR#25022
 1.46.86.2 28-Apr-2009  skrll Sync with HEAD.
 1.46.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.46.78.2 11-Aug-2010  yamt sync with head.
 1.46.78.1 04-May-2009  yamt sync with head.
 1.46.74.1 17-Jan-2009  mjf 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.51.4.2 05-Mar-2011  rmind sync with head
 1.51.4.1 30-May-2010  rmind sync with head
 1.51.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.52.4.2 05-Mar-2011  bouyer Sync with HEAD
 1.52.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.52.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.57.16.2 18-May-2014  rmind sync with head
 1.57.16.1 28-Aug-2013  rmind sync with head
 1.57.12.2 03-Dec-2017  jdolecek update from HEAD
 1.57.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.57.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.60.6.3 28-Aug-2017  skrll Sync with HEAD
 1.60.6.2 05-Oct-2016  skrll Sync with HEAD
 1.60.6.1 22-Apr-2016  skrll Sync with HEAD
 1.61.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.62.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.63.14.1 10-Jun-2019  christos Sync with HEAD
 1.63.12.1 18-Jan-2019  pgoyette Synch with HEAD
 1.64.16.1 13-May-2021  thorpej Sync with HEAD.
 1.17 27-Aug-2002  lukem arch/*/stand stuff should be LDSTATIC=-static and not LDSTATIC?=-static.
It doesn't make sense to have standalone stuff dynamically linked just
because an end-user uses LDSTATIC="".
 1.16 07-May-2002  simonb branches: 1.16.2;
Remove a "NOMAN="; Makefile.booters now has MKMAN=no.
 1.15 12-Dec-2001  lukem Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly).
Otherwise the appropriate MKxxx=no won't be defined .
 1.14 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.13 28-Nov-1999  simonb branches: 1.13.8; 1.13.12;
Add CPPFLAGS and set LDSTATIC to -static.
 1.12 11-Apr-1999  simonb branches: 1.12.2; 1.12.4; 1.12.10;
Add "WARNS?= 1" - woohoo!
 1.11 11-Apr-1999  simonb Define BINDIR, BINMODE and MKMAN in the "standard" place.
 1.10 27-Mar-1999  simonb Go back to a Makefile.booters scheme, like most other ports do. No
more problems for "make depend" - tested with and without obj dirs.
 1.9 26-Mar-1999  simonb Conditionally set BINMODE and BINDIR so lower level Makefiles can override
the location or modes.

Fix up the machine and mips symlink creation.
 1.8 25-Mar-1999  simonb Updates for new bootblocks.
 1.7 23-Feb-1999  simonb Use -Os to reduce code size (from Krister Walfridsson).
 1.6 22-Feb-1999  simonb Update cpp defines to current reality.
 1.5 30-Jan-1999  simonb branches: 1.5.2;
Add -mmemcpy (from Jonathan Stone) and bump -G to 128. Bootblocks now
fit! Still needs more testing, so we don't actually install them yet...
 1.4 29-Jan-1999  simonb Make a `machine' symlink to ..../pmax/include to locate new location of
the dec_????.h files. Gleaned from other ports' stand/Makefile.inc's.
 1.3 22-Jan-1999  simonb More Makefile cleanups:
+ Don't use our own "clean" and "depend" targets
+ "make depend" works
+ Only include each include path once on compile lines
+ Clean up include file names
+ Don't build a separate libdrive.a, just specify driver source files
+ Use "make print-objdir" instead of old "printf ... | make -f-"
+ Remove more unnecessary targets, variables and other cruft

Still builds identical bootblocks to 1.3.3 with gcc, still too large
with egcs.

dec_boot.h, dec_exec.h & dec_prom.h were copied via respository
copy to sys/arch/pmax/stand/libsa.
 1.2 21-Jan-1999  simonb Round one of the Makefile clean up:
+ dependency on libsa works
+ set and use BINDIR/BINMODE
+ don't pull in sys/lib/lib{sa,kern}/Makefile.inc (``make clean''
doesn't make empty lib/{sa,kern} directories in each
directory/obj dir).
+ remove unnecessary targets, variables and other cruft
+ wrap lines at 80 chars

Re-ordering SRCS line in libsa/Makefile to a more logical sequence
(alphabetical by source dir) results in a libsa.a with archive members
in a different order, and a resultant bootrz that differs from the 1.3.3
bootrz. Untested as yet, so left in but commented out.

Also, _don't_ install the bootblocks (as per intent of previous commit)
or our own small libsa(!).
 1.1 21-Jan-1999  simonb Almost working bootblocks for the pmax. This compiles fine with gcc
2.7.2.2-myc2 (and produces _identical_ bootblocks with the 1.3.3
bootblocks which weren't in the tree), but egcs 1.1.1 builds a ufs.o
that's about a 100 bytes too big, and it busts the 7.5k we've got for
bootrz.

Still needs cleanup - the Makefiles could be better/cleaner, and doesn't
install yet (because of above problem). At least there's something to
work with now.

Note that we have our own versions of a lot of the sys/lib/libsa
routines which are less functional/smaller.
 1.5.2.2 02-Feb-1999  cgd pull up revs 1.1-1.3 from trunk (simonb)
 1.5.2.1 30-Jan-1999  cgd file Makefile.inc was added on branch netbsd-1-3 on 1999-02-02 06:00:40 +0000
 1.12.10.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.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.12.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.13.12.3 27-Aug-2002  nathanw Catch up to -current.
 1.13.12.2 20-Jun-2002  nathanw Catch up to -current.
 1.13.12.1 08-Jan-2002  nathanw Catch up to -current.
 1.13.8.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.13.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.13.8.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.16.2.1 31-Aug-2002  gehenna catch up with -current.
 1.3 20-Jan-1999  simonb Remove obsolete README and dec_label program
 1.2 05-Jan-1998  perry RCSID Police.
 1.1 18-Oct-1997  jonathan branches: 1.1.2;
Note non-inclusion of up-to-date bootblock source for 1.3, as
suggested by release engineers.
 1.1.2.1 02-Feb-1999  cgd pull up rev 1.3 from trunk (deleted). (simonb)
 1.7 20-Jan-1999  simonb Move via repository copy to sys/arch/pmax/stand/scsiboot
 1.6 28-Jun-1995  jonathan branches: 1.6.18;
Change bootblock load code to work with old DECstation proms (2100, 3100)
that lack the REX callback introduced with 5k/200.
 1.5 18-Jan-1995  mellon Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.6.18.1 02-Feb-1999  cgd pull up rev 1.7 from trunk (deleted). (simonb)
 1.3 20-Jan-1999  simonb Move via repository copy to sys/arch/pmax/stand/scsiboot
 1.2 05-Jan-1998  perry RCSID Police.
 1.1 26-Oct-1995  jonathan branches: 1.1.16;
Macro definitions of ntohs() and ntohl() for pmax bootblocks.
 1.1.16.1 02-Feb-1999  cgd pull up rev 1.3 from trunk (deleted). (simonb)
 1.6 20-Jan-1999  simonb Move via repository copy to sys/arch/pmax/stand/scsiboot
 1.5 18-Jan-1995  mellon branches: 1.5.18;
Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.5.18.1 02-Feb-1999  cgd pull up rev 1.6 from trunk (deleted). (simonb)
 1.5 22-Jan-1999  simonb More Makefile cleanups:
+ Don't use our own "clean" and "depend" targets
+ "make depend" works
+ Only include each include path once on compile lines
+ Clean up include file names
+ Don't build a separate libdrive.a, just specify driver source files
+ Use "make print-objdir" instead of old "printf ... | make -f-"
+ Remove more unnecessary targets, variables and other cruft

Still builds identical bootblocks to 1.3.3 with gcc, still too large
with egcs.

dec_boot.h, dec_exec.h & dec_prom.h were copied via respository
copy to sys/arch/pmax/stand/libsa.
 1.4 26-Oct-1994  cgd branches: 1.4.18;
new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.4.18.1 02-Feb-1999  cgd pull up rev 1.5 from trunk (deleted). (simonb)
 1.5 22-Jan-1999  simonb More Makefile cleanups:
+ Don't use our own "clean" and "depend" targets
+ "make depend" works
+ Only include each include path once on compile lines
+ Clean up include file names
+ Don't build a separate libdrive.a, just specify driver source files
+ Use "make print-objdir" instead of old "printf ... | make -f-"
+ Remove more unnecessary targets, variables and other cruft

Still builds identical bootblocks to 1.3.3 with gcc, still too large
with egcs.

dec_boot.h, dec_exec.h & dec_prom.h were copied via respository
copy to sys/arch/pmax/stand/libsa.
 1.4 26-Oct-1994  cgd branches: 1.4.18;
new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.4.18.1 02-Feb-1999  cgd pull up rev 1.5 from trunk (deleted). (simonb)
 1.4 25-May-1997  jonathan Move dec_label into a subdir.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.1 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.10 22-Jan-1999  simonb More Makefile cleanups:
+ Don't use our own "clean" and "depend" targets
+ "make depend" works
+ Only include each include path once on compile lines
+ Clean up include file names
+ Don't build a separate libdrive.a, just specify driver source files
+ Use "make print-objdir" instead of old "printf ... | make -f-"
+ Remove more unnecessary targets, variables and other cruft

Still builds identical bootblocks to 1.3.3 with gcc, still too large
with egcs.

dec_boot.h, dec_exec.h & dec_prom.h were copied via respository
copy to sys/arch/pmax/stand/libsa.
 1.9 21-Sep-1996  jonathan branches: 1.9.14;
Add fake, bogus prototype for gettcinfo(), with "void" arglist.
(Not having a prototype breaks -Wstrict-prototypes, this callback
isn't used, and we don't know what the prototype should be.)
 1.8 08-Apr-1996  jonathan Fix hanging open comment.
 1.7 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.6 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.5 18-Jan-1995  mellon Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.9.14.1 02-Feb-1999  cgd pull up rev 1.10 from trunk (deleted). (simonb)
 1.3 20-Jan-1999  simonb Move via repository copy to sys/arch/pmax/stand/scsiboot
 1.2 13-Oct-1997  lukem branches: 1.2.2;
rcsid fascism
 1.1 26-Oct-1995  jonathan branches: 1.1.12;
Commit missing modified copy of (old) sparc filesystem.c, that has
a comple-time option to support a subset of UFS operations, to build
small bootblocks.
 1.1.12.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.2.2.1 02-Feb-1999  cgd pull up rev 1.3 from trunk (deleted). (simonb)
 1.6 20-Jan-1999  simonb Move via repository copy to sys/arch/pmax/stand/scsiboot
 1.5 18-Jan-1995  mellon branches: 1.5.18;
Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.5.18.1 02-Feb-1999  cgd pull up rev 1.6 from trunk (deleted). (simonb)
 1.8 20-Jan-1999  simonb Move via repository copy to sys/arch/pmax/stand/scsiboot
 1.7 01-Nov-1997  lukem getopt returns -1 not EOF
 1.6 18-Jan-1995  mellon branches: 1.6.18;
Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 17-Sep-1994  mycroft vmunix --> netbsd
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.6.18.1 02-Feb-1999  cgd pull up rev 1.8 from trunk (deleted). (simonb)
 1.7 20-Jan-1999  simonb Move via repository copy to sys/arch/pmax/stand/scsiboot
 1.6 28-Jun-1995  jonathan branches: 1.6.18;
Change bootblock load code to work with old DECstation proms (2100, 3100)
that lack the REX callback introduced with 5k/200.
 1.5 18-Jan-1995  mellon Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.6.18.1 02-Feb-1999  cgd pull up rev 1.7 from trunk (deleted). (simonb)
 1.3 20-Jan-1999  simonb Move via repository copy to sys/arch/pmax/stand/scsiboot
 1.2 16-Jun-1997  jonathan branches: 1.2.8;
Remove all references to <machine/machAsmDefs.h>.
Use #include <mips/asm.h> instead.
 1.1 18-Jan-1995  mellon Start code for boot loader (under new name with some changes)
 1.2.8.1 02-Feb-1999  cgd pull up rev 1.3 from trunk (deleted). (simonb)
 1.7 18-Jan-1995  mycroft Clean up deleted files.
 1.6 15-Dec-1994  mycroft More underscores...
 1.5 14-Nov-1994  dean Prepended underscores
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.8 18-Jun-2002  jdolecek update comment
 1.7 31-Jan-2002  lukem branches: 1.7.10;
use ${INSTALL_FILE} instead of "cp -p"
 1.6 27-Nov-1999  simonb branches: 1.6.8; 1.6.12;
Updated for new Makefile.booters and stand/ layout.
 1.5 11-Apr-1999  simonb branches: 1.5.2; 1.5.8;
Move MKMAN to ../Makefile.inc.
 1.4 31-Mar-1999  simonb branches: 1.4.4;
Reorder ${LIBS} so that we don't need to explicitly pull in bcmp.c
and bzero.c from libkern.
 1.3 27-Mar-1999  simonb Go back to a Makefile.booters scheme, like most other ports do. No
more problems for "make depend" - tested with and without obj dirs.
 1.2 26-Mar-1999  simonb Explictly set BINMODE to 555 so that ../Makefile.inc doesn't override it.
 1.1 25-Mar-1999  simonb Makefile for /boot.
 1.4.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.5.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.12.2 01-Aug-2002  nathanw Catch up to -current.
 1.6.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.6.8.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.6.8.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.7.10.1 16-Jul-2002  gehenna catch up with -current.
 1.10 27-Nov-1999  simonb Moved to common/boot.c,v
 1.9 13-Nov-1999  thorpej Backout my libsa changes.
 1.8 12-Nov-1999  simonb Remove references to libkern after Jason's recent work to libsa.
 1.7 28-Apr-1999  christos branches: 1.7.2; 1.7.4; 1.7.8;
use new loadfile
 1.6 12-Apr-1999  simonb If only a device name is specified with no kernel name, try to load a
kernel from a default list of names. This list is netbsd, netbsd.bak,
netbsd.old, onetbsd and gennetbsd - all without and with a .gz
extension.
 1.5 11-Apr-1999  simonb Clean up prototypes.
Print a message on failure to load or execute kernel.
 1.4 31-Mar-1999  simonb branches: 1.4.4;
Don't define errno expliticly, use libsa/errno.c in first stage and
${LIBSA} in the second stage.
 1.3 26-Mar-1999  simonb Update copyrights.
 1.2 25-Mar-1999  simonb Remove old (not-enabled) local support for loading kernels.
 1.1 25-Mar-1999  simonb Second stage bootblocks based on original single stage blocks.
 1.4.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.7.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.7.4.1 15-Nov-1999  fvdl Sync with -current
 1.7.2.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.7 09-Nov-2001  scw branches: 1.7.2;
Bump the version numbers of all bootloaders which use loadfile_elfXX() now
that it tries hard to avoid backwards seeks.
 1.6 02-Aug-2001  bjh21 branches: 1.6.4;
Bump version numbers of all bootloaders that use loadfile/ELF, to account for
my changes to symbol loading. I should probably have done this at the time,
but it's better late than never.
 1.5 13-Sep-2000  simonb branches: 1.5.4;
Add support for booting off RAIDframe RAID1 mirrors.
If the first partition is of type FS_RAID, then add 64 to the block
number for each I/O in rzstrategy().
 1.4 13-Jul-2000  jdolecek switch to sys/conf/newvers_stand.sh for generating vers.c
sync comments in */version with i386
 1.3 28-Nov-1999  simonb branches: 1.3.4;
Bump bootblock version number to 1.2.
 1.2 12-Apr-1999  simonb branches: 1.2.2; 1.2.8;
Bump version number to 1.1 for default kernel names.
 1.1 25-Mar-1999  simonb branches: 1.1.4;
Version info for bootblocks.
 1.1.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.2.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.4.1 13-Sep-2000  simonb Pull up rev 1.5 from trunk (with patch), approved by thorpej:
Add support for booting off RAIDframe RAID1 mirrors.
If the first partition is of type FS_RAID, then add 64 to the block
number for each I/O in rzstrategy().
 1.5.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.4.1 03-Aug-2001  lukem update to -current
 1.6.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.7.2.2 09-Nov-2001  scw Bump the version numbers of all bootloaders which use loadfile_elfXX() now
that it tries hard to avoid backwards seeks.
 1.7.2.1 09-Nov-2001  scw file version was added on branch nathanw_sa on 2001-11-09 19:53:15 +0000
 1.1 27-Nov-1999  simonb branches: 1.1.2; 1.1.8;
New alpha-style first stage bootblock Makefiles.
 1.1.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.8.1 27-Nov-1999  bouyer file Makefile was added on branch thorpej_scsipi on 2000-11-20 20:20:40 +0000
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3 21-Apr-2009  tsutsui Add UFS2 boot support. Tested on gxemul.
 1.2 01-Feb-2003  simonb branches: 1.2.108; 1.2.116; 1.2.122;
Use a 32-bit daddr_t so that lib/libsa/{ufs,lfs}.c don't pull in 64
bit divide and modulus library routines that break the tight space
constraints on bootblocks on these platforms.

May not be the final solution, but gets bootblocks building again.
 1.1 27-Nov-1999  simonb branches: 1.1.2; 1.1.8;
New alpha-style first stage bootblock Makefiles.
 1.1.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.8.1 27-Nov-1999  bouyer file Makefile was added on branch thorpej_scsipi on 2000-11-20 20:20:41 +0000
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.122.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.116.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.108.1 04-May-2009  yamt sync with head.
 1.1 21-Apr-2009  tsutsui branches: 1.1.2; 1.1.4; 1.1.6;
Add UFS2 boot support. Tested on gxemul.
 1.1.6.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.6.1 21-Apr-2009  jym file Makefile was added on branch jym-xensuspend on 2009-05-13 17:18:13 +0000
 1.1.4.2 04-May-2009  yamt sync with head.
 1.1.4.1 21-Apr-2009  yamt file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:11:42 +0000
 1.1.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.1.2.1 21-Apr-2009  skrll file Makefile was added on branch nick-hppapmap on 2009-04-28 07:34:33 +0000
 1.3 23-Feb-2003  simonb Update for LFSv2 support. Ports that have "bootxx_lfs"-style
bootblocks currently only support LFSv2, but the second level
"boot" program supports both LFS versions.
 1.2 01-Feb-2003  simonb Use a 32-bit daddr_t so that lib/libsa/{ufs,lfs}.c don't pull in 64
bit divide and modulus library routines that break the tight space
constraints on bootblocks on these platforms.

May not be the final solution, but gets bootblocks building again.
 1.1 27-Nov-1999  simonb branches: 1.1.2; 1.1.8;
New alpha-style first stage bootblock Makefiles.
 1.1.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.8.1 27-Nov-1999  bouyer file Makefile was added on branch thorpej_scsipi on 2000-11-20 20:20:41 +0000
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.20 06-Mar-2024  andvar s/lader/loader/ in comments.
 1.19 22-Jan-2011  joerg Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
 1.18 14-Mar-2009  dsl branches: 1.18.4; 1.18.6; 1.18.8;
Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.17 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.16 28-Apr-2008  martin branches: 1.16.8; 1.16.14;
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 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.13 11-Jul-2000  soren branches: 1.13.2; 1.13.28;
Update comment.
 1.12 08-Dec-1999  simonb branches: 1.12.2;
Store only the kernel name itself in the bootinfo BOOTPATH record, and
not the full boot device specification.

With this change, /etc/rc doesn't spew garbage when kvm_mkdb can't
find a kernel called "3/rz0/netbsd" or some such...
 1.11 27-Nov-1999  simonb Use alpha-style banner display and bootprog_* variables.
Look for default kernels in order of: netbsd.pmax netbsd netbsd.gz
netbsd.bak netbsd.old onetbsd gennetbsd.
 1.10 27-Nov-1999  simonb Moved from boot/boot.c,v
 1.9 13-Nov-1999  thorpej Backout my libsa changes.
 1.8 12-Nov-1999  simonb Remove references to libkern after Jason's recent work to libsa.
 1.7 28-Apr-1999  christos branches: 1.7.4;
use new loadfile
 1.6 12-Apr-1999  simonb If only a device name is specified with no kernel name, try to load a
kernel from a default list of names. This list is netbsd, netbsd.bak,
netbsd.old, onetbsd and gennetbsd - all without and with a .gz
extension.
 1.5 11-Apr-1999  simonb Clean up prototypes.
Print a message on failure to load or execute kernel.
 1.4 31-Mar-1999  simonb branches: 1.4.4;
Don't define errno expliticly, use libsa/errno.c in first stage and
${LIBSA} in the second stage.
 1.3 26-Mar-1999  simonb Update copyrights.
 1.2 25-Mar-1999  simonb Remove old (not-enabled) local support for loading kernels.
 1.1 25-Mar-1999  simonb Second stage bootblocks based on original single stage blocks.
 1.4.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.7.4.1 15-Nov-1999  fvdl Sync with -current
 1.12.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.28.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.28.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.28.1 03-Aug-2004  skrll Sync with HEAD
 1.13.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.13.2.1 11-Jul-2000  bouyer file boot.c was added on branch thorpej_scsipi on 2000-11-20 20:20:42 +0000
 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.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.16.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.18.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.18.4.1 05-Mar-2011  rmind sync with head
 1.9 11-Jan-2011  tsutsui ANSIfy.
 1.8 28-Apr-2008  martin branches: 1.8.22;
Remove clause 3 and 4 from TNF licenses
 1.7 31-Jan-2008  tsutsui branches: 1.7.6; 1.7.8; 1.7.10;
Account bi_size properly.
 1.6 07-Jul-2001  simonb branches: 1.6.8; 1.6.42; 1.6.104; 1.6.110;
b{cmp,copy,zero} -> mem{cmp,cpy,set}
Also remove some unnecessary argument casts.
 1.5 27-Nov-1999  simonb branches: 1.5.2; 1.5.8;
Moved from lib/bootinfo.c,v
 1.4 13-Nov-1999  thorpej Backout my libsa changes.
 1.3 12-Nov-1999  simonb Remove references to libkern after Jason's recent work to libsa.
 1.2 25-Mar-1999  simonb branches: 1.2.10;
s/BOOTINFO_MAXSIZE/BOOTINFO_SIZE/
 1.1 24-Mar-1999  simonb Code to initialise and add bootinfo records.
 1.2.10.1 15-Nov-1999  fvdl Sync with -current
 1.5.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.8.1 27-Nov-1999  bouyer file bootinfo.c was added on branch thorpej_scsipi on 2000-11-20 20:20:42 +0000
 1.5.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.110.1 18-Feb-2008  mjf Sync with HEAD.
 1.6.104.1 23-Mar-2008  matt sync with HEAD
 1.6.42.1 04-Feb-2008  yamt sync with head.
 1.6.8.2 07-Jul-2001  simonb b{cmp,copy,zero} -> mem{cmp,cpy,set}
Also remove some unnecessary argument casts.
 1.6.8.1 07-Jul-2001  simonb file bootinfo.c was added on branch nathanw_sa on 2001-07-07 14:21:02 +0000
 1.7.10.1 16-May-2008  yamt sync with head.
 1.7.8.1 18-May-2008  yamt sync with head.
 1.7.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.22.1 05-Mar-2011  rmind sync with head
 1.4 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.3 28-Apr-2008  martin branches: 1.3.8; 1.3.14;
Remove clause 3 and 4 from TNF licenses
 1.2 27-Nov-1999  simonb branches: 1.2.2; 1.2.8; 1.2.136; 1.2.138; 1.2.140;
Moved from lib/bootinfo.h,v
 1.1 24-Mar-1999  simonb Code to initialise and add bootinfo records.
 1.2.140.2 04-May-2009  yamt sync with head.
 1.2.140.1 16-May-2008  yamt sync with head.
 1.2.138.1 18-May-2008  yamt sync with head.
 1.2.136.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.8.1 27-Nov-1999  bouyer file bootinfo.h was added on branch thorpej_scsipi on 2000-11-20 20:20:42 +0000
 1.2.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.8 26-Mar-2011  tsutsui Use .set reorder to entrust compiler hazards and BDslots to avoid future botch
since there is no critical instructions in these sources.

Tested on 3MIN.
 1.7 10-Jan-2011  tsutsui branches: 1.7.2;
Add hazard nops required by MIPS1 in noreorder case.
(Umm, is it easier to remove noreorder and all BDslot insns?)
 1.6 10-Jan-2011  tsutsui - specify .set noreorder to fill BDslots properly
- indent instructions in BDslots
 1.5 28-Apr-2008  martin branches: 1.5.22;
Remove clause 3 and 4 from TNF licenses
 1.4 27-Nov-1999  simonb branches: 1.4.2; 1.4.8; 1.4.136; 1.4.138; 1.4.140;
Moved from lib/bootinit.S,v
 1.3 26-Mar-1999  simonb Update copyrights.
 1.2 13-Mar-1999  drochner Remove unneeded <mips/regdef.h>. Its contents went into asm.h while ago.
 1.1 22-Feb-1999  simonb Assembly stubs to PROM callback routines.
 1.4.140.1 16-May-2008  yamt sync with head.
 1.4.138.1 18-May-2008  yamt sync with head.
 1.4.136.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.8.1 27-Nov-1999  bouyer file bootinit.S was added on branch thorpej_scsipi on 2000-11-20 20:20:42 +0000
 1.4.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.22.2 21-Apr-2011  rmind sync with head
 1.5.22.1 05-Mar-2011  rmind sync with head
 1.7.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8 26-Mar-2011  tsutsui Use .set reorder to entrust compiler hazards and BDslots to avoid future botch
since there is no critical instructions in these sources.

Tested on 3MIN.
 1.7 10-Jan-2011  tsutsui branches: 1.7.2;
Add hazard nops required by MIPS1 in noreorder case.
(Umm, is it easier to remove noreorder and all BDslot insns?)
 1.6 10-Jan-2011  tsutsui - specify .set noreorder to fill BDslots properly
- indent instructions in BDslots
 1.5 28-Apr-2008  martin branches: 1.5.22;
Remove clause 3 and 4 from TNF licenses
 1.4 27-Nov-1999  simonb branches: 1.4.2; 1.4.8; 1.4.136; 1.4.138; 1.4.140;
Moved from lib/bootread.S,v
 1.3 26-Mar-1999  simonb Update copyrights.
 1.2 13-Mar-1999  drochner Remove unneeded <mips/regdef.h>. Its contents went into asm.h while ago.
 1.1 22-Feb-1999  simonb Assembly stubs to PROM callback routines.
 1.4.140.1 16-May-2008  yamt sync with head.
 1.4.138.1 18-May-2008  yamt sync with head.
 1.4.136.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.8.1 27-Nov-1999  bouyer file bootread.S was added on branch thorpej_scsipi on 2000-11-20 20:20:42 +0000
 1.4.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.22.2 21-Apr-2011  rmind sync with head
 1.5.22.1 05-Mar-2011  rmind sync with head
 1.7.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.33 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.32 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.31 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.30 28-Apr-2008  martin branches: 1.30.8; 1.30.14;
Remove clause 3 and 4 from TNF licenses
 1.29 30-Mar-2008  he branches: 1.29.2; 1.29.4;
Use memcmp() instead of bcmp() so that this builds again.
 1.28 11-Dec-2005  christos branches: 1.28.74;
merge ktrace-lwp.
 1.27 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.26 20-Mar-2003  drochner branches: 1.26.2;
memcmp()->bcmp(), this gives us 32 bytes and makes bootxx_ffs
build again
 1.25 09-Dec-2002  jdolecek add #include <lib/libkern/libkern.h> to pull in prototypes
for couple items which don't have implicit prototypes with -ffreestanding
 1.24 07-Jul-2001  simonb branches: 1.24.8;
b{cmp,copy,zero} -> mem{cmp,cpy,set}
Also remove some unnecessary argument casts.
 1.23 27-Nov-1999  simonb branches: 1.23.2; 1.23.8;
Load second stage bootblocks from "boot.pmax", falling back to "boot"
for backwards compatibility and "boot.pma" after that for people who
make ISO filesystems with 8.3 format file names.
 1.22 27-Nov-1999  simonb Moved from scsiboot/bootxx.c,v
 1.21 27-Oct-1999  simonb Use ELFCLASS32 instead of ELFCLASS.
 1.20 25-Oct-1999  kleink Update to match new SVR4-style definition names in <sys/exec_elf.h>.
 1.19 12-Apr-1999  simonb branches: 1.19.4;
Make the bootpath "N/rzY" with no trailing '/' valid by adding the extra
'/' before appending 'boot' to the path.
 1.18 11-Apr-1999  simonb Clean up prototypes and entry variable usage.
 1.17 31-Mar-1999  simonb branches: 1.17.4;
G/C UFS_NOSYMLINK, UFS_NOCLOSE and UFS_NOWRITE and use new LIBSA_NO_FS_*.
 1.16 31-Mar-1999  simonb Don't define errno expliticly, use libsa/errno.c in first stage and
${LIBSA} in the second stage.
 1.15 26-Mar-1999  simonb Update copyrights.
 1.14 25-Mar-1999  simonb Fix header botch in previous.
 1.13 25-Mar-1999  simonb Change from loading an a.out kernel to an ELF /boot.
 1.12 14-Mar-1999  simonb Merge contents of filesystem.c into conf.c, and remove declaration of
errno from conf.c and put it in boot.c.
 1.11 22-Feb-1999  simonb Break single read and printf of text+data into two separate reads and
printfs. Better aesthetically, especially with a twiddle.
 1.10 01-Feb-1999  jonathan branches: 1.10.2;
use memcpy, not bcopy, for non-overlapping copies.
 1.9 29-Jan-1999  simonb Include dec_{boot,exec,prom}.h from <machine/...>, not <stand/libsa/...>
 1.8 22-Jan-1999  simonb More Makefile cleanups:
+ Don't use our own "clean" and "depend" targets
+ "make depend" works
+ Only include each include path once on compile lines
+ Clean up include file names
+ Don't build a separate libdrive.a, just specify driver source files
+ Use "make print-objdir" instead of old "printf ... | make -f-"
+ Remove more unnecessary targets, variables and other cruft

Still builds identical bootblocks to 1.3.3 with gcc, still too large
with egcs.

dec_boot.h, dec_exec.h & dec_prom.h were copied via respository
copy to sys/arch/pmax/stand/libsa.
 1.7 21-Jan-1999  simonb Almost working bootblocks for the pmax. This compiles fine with gcc
2.7.2.2-myc2 (and produces _identical_ bootblocks with the 1.3.3
bootblocks which weren't in the tree), but egcs 1.1.1 builds a ufs.o
that's about a 100 bytes too big, and it busts the 7.5k we've got for
bootrz.

Still needs cleanup - the Makefiles could be better/cleaner, and doesn't
install yet (because of above problem). At least there's something to
work with now.

Note that we have our own versions of a lot of the sys/lib/libsa
routines which are less functional/smaller.
 1.6 28-Jun-1995  jonathan Change bootblock load code to work with old DECstation proms (2100, 3100)
that lack the REX callback introduced with 5k/200.
 1.5 18-Jan-1995  mellon Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.10.2.1 02-Feb-1999  cgd pull up revs 1.1-1.8 from trunk (new). (simonb)
 1.17.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.19.4.1 15-Nov-1999  fvdl Sync with -current
 1.23.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.23.8.1 27-Nov-1999  bouyer file bootxx.c was added on branch thorpej_scsipi on 2000-11-20 20:20:43 +0000
 1.23.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.24.8.2 11-Dec-2002  thorpej Sync with HEAD.
 1.24.8.1 07-Jul-2001  thorpej file bootxx.c was added on branch nathanw_sa on 2002-12-11 06:11:36 +0000
 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.74.2 02-Jun-2008  mjf Sync with HEAD.
 1.28.74.1 03-Apr-2008  mjf Sync with HEAD.
 1.29.4.2 04-May-2009  yamt sync with head.
 1.29.4.1 16-May-2008  yamt sync with head.
 1.29.2.1 18-May-2008  yamt sync with head.
 1.30.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.30.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.19 11-Jun-2016  dholland Update to match change to dec_prom.h.
 1.18 14-Dec-2009  matt branches: 1.18.22; 1.18.40;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.17 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.16 11-Dec-2005  christos branches: 1.16.78; 1.16.86; 1.16.92; 1.16.96;
merge ktrace-lwp.
 1.15 01-Jun-2005  drochner make the argument to prom getenv() cnd the printf() format const
remove variable names from prototypes
 1.14 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.13 27-Nov-1999  simonb branches: 1.13.2; 1.13.8; 1.13.34;
Move callv variable declaration here from conf.c.
 1.12 27-Nov-1999  simonb Moved from lib/callvec.c,v
 1.11 01-Mar-1999  simonb Add a callback to the PROM routine clear_cache. Not needed now, but
used in two-stage bootblocks.
 1.10 29-Jan-1999  simonb Include dec_{boot,exec,prom}.h from <machine/...>, not <stand/libsa/...>
 1.9 27-Jan-1999  simonb Include dec_prom.h with `full' path if being included by kernel.

XXX: Should these headers used by the kernel be in pmax/include instead
of pmax/stand?
 1.8 22-Jan-1999  simonb More Makefile cleanups:
+ Don't use our own "clean" and "depend" targets
+ "make depend" works
+ Only include each include path once on compile lines
+ Clean up include file names
+ Don't build a separate libdrive.a, just specify driver source files
+ Use "make print-objdir" instead of old "printf ... | make -f-"
+ Remove more unnecessary targets, variables and other cruft

Still builds identical bootblocks to 1.3.3 with gcc, still too large
with egcs.

dec_boot.h, dec_exec.h & dec_prom.h were copied via respository
copy to sys/arch/pmax/stand/libsa.
 1.7 25-May-1997  jonathan branches: 1.7.8;
Add (bogus) prototype for tcinfo() PROM callback until we know what it is.
 1.6 25-Sep-1995  jonathan Update pmax kernel to compile with -Werror:
Fix the initializer of the prom bootinit() function, to take a char* that's
(presumably) the name of the file to boot -- even though it's not used.
 1.5 18-Jan-1995  mellon Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.7.8.2 04-Feb-1999  cgd pull up rev 1.9 from trunk (simonb)
 1.7.8.1 02-Feb-1999  cgd pull up rev 1.8 from trunk (simonb)
 1.13.34.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.13.34.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.34.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.34.1 03-Aug-2004  skrll Sync with HEAD
 1.13.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.13.8.1 27-Nov-1999  bouyer file callvec.c was added on branch thorpej_scsipi on 2000-11-20 20:20:43 +0000
 1.13.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.16.96.1 16-Sep-2009  matt Deal with some LP64 issues with only O32 console.
Make bootloader invoke kernel compatible with both O32 and N32
 1.16.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.16.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.16.78.2 11-Mar-2010  yamt sync with head
 1.16.78.1 04-May-2009  yamt sync with head.
 1.18.40.1 09-Jul-2016  skrll Sync with HEAD
 1.18.22.1 03-Dec-2017  jdolecek update from HEAD
 1.1 27-Nov-1999  simonb branches: 1.1.2; 1.1.8;
Check that a first-stage bootblock fits in a specified size - virtually
a copy of the alpha checksize.sh.
 1.1.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.8.1 27-Nov-1999  bouyer file checksize.sh was added on branch thorpej_scsipi on 2000-11-20 20:20:43 +0000
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9 26-Mar-2011  tsutsui Use .set reorder to entrust compiler hazards and BDslots to avoid future botch
since there is no critical instructions in these sources.

Tested on 3MIN.
 1.8 10-Jan-2011  tsutsui branches: 1.8.2;
Add hazard nops required by MIPS1 in noreorder case.
(Umm, is it easier to remove noreorder and all BDslot insns?)
 1.7 10-Jan-2011  tsutsui - specify .set noreorder to fill BDslots properly
- indent instructions in BDslots
 1.6 28-Apr-2008  martin branches: 1.6.22;
Remove clause 3 and 4 from TNF licenses
 1.5 27-Nov-1999  simonb branches: 1.5.2; 1.5.8; 1.5.136; 1.5.138; 1.5.140;
Moved from scsiboot/clear_cache.S,v
 1.4 28-Sep-1999  simonb Fix incorrect comment.
 1.3 26-Mar-1999  simonb Update copyrights.
 1.2 13-Mar-1999  drochner Remove unneeded <mips/regdef.h>. Its contents went into asm.h while ago.
 1.1 01-Mar-1999  simonb Add a callback to the PROM routine clear_cache. Not needed now, but
used in two-stage bootblocks.
 1.5.140.1 16-May-2008  yamt sync with head.
 1.5.138.1 18-May-2008  yamt sync with head.
 1.5.136.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.8.1 27-Nov-1999  bouyer file clear_cache.S was added on branch thorpej_scsipi on 2000-11-20 20:20:43 +0000
 1.5.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.22.2 21-Apr-2011  rmind sync with head
 1.6.22.1 05-Mar-2011  rmind sync with head
 1.8.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.4 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.3 12-Jan-2009  tsutsui branches: 1.3.2;
Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

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

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

Per discussion on current-users.
 1.2 04-May-2008  martin branches: 1.2.8;
Move to standard TNF 2 clause license
 1.1 23-Feb-2002  gmcgarry branches: 1.1.2; 1.1.10; 1.1.124; 1.1.126; 1.1.128;
Support two-stage netboot. Is known to work on maxine, but problems
have been reported on 3min.
 1.1.128.2 04-May-2009  yamt sync with head.
 1.1.128.1 16-May-2008  yamt sync with head.
 1.1.126.1 18-May-2008  yamt sync with head.
 1.1.124.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.124.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.10.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.10.1 23-Feb-2002  jdolecek file clock.c was added on branch kqueue on 2002-03-16 15:59:14 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 23-Feb-2002  nathanw file clock.c was added on branch nathanw_sa on 2002-02-28 04:11:23 +0000
 1.2.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.2.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.3.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11 22-Jan-2011  joerg Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
 1.10 10-Jan-2011  tsutsui branches: 1.10.2; 1.10.4;
- start.S
add a hazard nop so that prom_restart() works properly on MIPS1
(it seems broken since initial revision and had been restarted by fault?)

- common.h
export prom_restart()

- if_prom.c
use prom_restart() instead of a direct PROM call (that should be equivalent)
 1.9 14-Mar-2009  dsl branches: 1.9.4;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.8 12-Jan-2009  tsutsui branches: 1.8.2;
Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

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

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

Per discussion on current-users.
 1.7 28-Apr-2008  martin branches: 1.7.8;
Remove clause 3 and 4 from TNF licenses
 1.6 15-Mar-2002  simonb branches: 1.6.116; 1.6.118; 1.6.120;
The "debug" variable is only used during network debugging, and then
only if NET_DEBUG is defined. Put it's declaration and initialisation
inside '#ifdef NET_DEBUG' and save another 16 bytes.
 1.5 23-Feb-2002  gmcgarry Support two-stage netboot. Is known to work on maxine, but problems
have been reported on 3min.
 1.4 27-Nov-1999  simonb branches: 1.4.2; 1.4.8; 1.4.12; 1.4.16;
Add prom_write() declaration.
 1.3 27-Nov-1999  simonb Add some PROM function prototypes
Add bootprog* variable declarations (ala alpha/stand/common.h).
 1.2 27-Nov-1999  simonb Moved from lib/common.h,v
 1.1 11-Apr-1999  simonb branches: 1.1.2;
Declare some prototypes for the pmax-specific libsa functions.
 1.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.4.16.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.16.1 28-Feb-2002  nathanw Catch up to -current.
 1.4.12.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.12.1 16-Mar-2002  jdolecek Catch up with -current.
 1.4.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.8.1 27-Nov-1999  bouyer file common.h was added on branch thorpej_scsipi on 2000-11-20 20:20:44 +0000
 1.4.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.120.2 04-May-2009  yamt sync with head.
 1.6.120.1 16-May-2008  yamt sync with head.
 1.6.118.1 18-May-2008  yamt sync with head.
 1.6.116.2 17-Jan-2009  mjf Sync with HEAD.
 1.6.116.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.7.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.8.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.4.1 05-Mar-2011  rmind sync with head
 1.10.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.10.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.25 21-Apr-2009  tsutsui Add UFS2 boot support. Tested on gxemul.
 1.24 11-Dec-2005  christos branches: 1.24.78; 1.24.86; 1.24.92;
merge ktrace-lwp.
 1.23 23-Jun-2005  junyoung Use FS_OPS() macro.
 1.22 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.21 29-May-2003  simonb branches: 1.21.2;
Remove some useless comments.
 1.20 27-Mar-2003  drochner allow loading the bootloader via MOP
 1.19 23-Feb-2003  simonb Update for LFSv2 support. Ports that have "bootxx_lfs"-style
bootblocks currently only support LFSv2, but the second level
"boot" program supports both LFS versions.
 1.18 15-Mar-2002  simonb The "debug" variable is only used during network debugging, and then
only if NET_DEBUG is defined. Put it's declaration and initialisation
inside '#ifdef NET_DEBUG' and save another 16 bytes.
 1.17 23-Feb-2002  gmcgarry Support two-stage netboot. Is known to work on maxine, but problems
have been reported on 3min.
 1.16 27-Nov-1999  simonb branches: 1.16.2; 1.16.8; 1.16.12; 1.16.16;
Add lfs, cd9660, nfs and ustarfs filesystem support.
Remove callv variable declaration.
 1.15 27-Nov-1999  simonb Moved from lib/conf.c,v
 1.14 11-Apr-1999  simonb Use LIBSA_NO_DEV_CLOSE and LIBSA_NO_DEV_IOCTL instead of SMALL.
 1.13 01-Apr-1999  simonb branches: 1.13.4;
Add support for LIBSA_SINGLE_DEVICE and LIBSA_SINGLE_FILESYSTEM.
 1.12 31-Mar-1999  simonb G/C UFS_NOSYMLINK, UFS_NOCLOSE and UFS_NOWRITE and use new LIBSA_NO_FS_*.
 1.11 14-Mar-1999  simonb Merge contents of filesystem.c into conf.c, and remove declaration of
errno from conf.c and put it in boot.c.
 1.10 22-Feb-1999  simonb Remove traces of tape support - we're nowhere near handling it at the
moment.
 1.9 30-Jan-1999  simonb branches: 1.9.2;
Don't define an ioctl routine for the rz driver, nor pull in the empty
routines in libsa/dev.c.
 1.8 29-Jan-1999  simonb Include dec_{boot,exec,prom}.h from <machine/...>, not <stand/libsa/...>
 1.7 22-Jan-1999  simonb More Makefile cleanups:
+ Don't use our own "clean" and "depend" targets
+ "make depend" works
+ Only include each include path once on compile lines
+ Clean up include file names
+ Don't build a separate libdrive.a, just specify driver source files
+ Use "make print-objdir" instead of old "printf ... | make -f-"
+ Remove more unnecessary targets, variables and other cruft

Still builds identical bootblocks to 1.3.3 with gcc, still too large
with egcs.

dec_boot.h, dec_exec.h & dec_prom.h were copied via respository
copy to sys/arch/pmax/stand/libsa.
 1.6 21-Jan-1999  simonb Almost working bootblocks for the pmax. This compiles fine with gcc
2.7.2.2-myc2 (and produces _identical_ bootblocks with the 1.3.3
bootblocks which weren't in the tree), but egcs 1.1.1 builds a ufs.o
that's about a 100 bytes too big, and it busts the 7.5k we've got for
bootrz.

Still needs cleanup - the Makefiles could be better/cleaner, and doesn't
install yet (because of above problem). At least there's something to
work with now.

Note that we have our own versions of a lot of the sys/lib/libsa
routines which are less functional/smaller.
 1.5 18-Jan-1995  mellon Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.9.2.1 02-Feb-1999  cgd pull up revs 1.1-1.7 from trunk (new). (simonb)
 1.13.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.16.16.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.16.16.1 28-Feb-2002  nathanw Catch up to -current.
 1.16.12.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.16.12.1 16-Mar-2002  jdolecek Catch up with -current.
 1.16.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.16.8.1 27-Nov-1999  bouyer file conf.c was added on branch thorpej_scsipi on 2000-11-20 20:20:44 +0000
 1.16.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.21.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.21.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.21.2.1 03-Aug-2004  skrll Sync with HEAD
 1.24.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.24.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.24.78.1 04-May-2009  yamt sync with head.
 1.1 23-Feb-2002  gmcgarry branches: 1.1.2; 1.1.10;
Support two-stage netboot. Is known to work on maxine, but problems
have been reported on 3min.
 1.1.10.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.10.1 23-Feb-2002  jdolecek file dev_net.c was added on branch kqueue on 2002-03-16 15:59:14 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 23-Feb-2002  nathanw file dev_net.c was added on branch nathanw_sa on 2002-02-28 04:11:23 +0000
 1.17 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.16 11-Dec-2005  christos branches: 1.16.78; 1.16.86; 1.16.92;
merge ktrace-lwp.
 1.15 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.14 09-Dec-2002  jdolecek branches: 1.14.6;
add #include <lib/libkern/libkern.h> to pull in prototypes
for couple items which don't have implicit prototypes with -ffreestanding
 1.13 27-Nov-1999  simonb branches: 1.13.2; 1.13.8; 1.13.16;
GC register keyword.
Add LIBSA_SINGLE_DEVICE support.
 1.12 27-Nov-1999  simonb Moved from lib/devopen.c,v
 1.11 11-Apr-1999  simonb s/vmunix/netbsd/
Use BOOTRZ instead of SMALL.
 1.10 01-Apr-1999  simonb branches: 1.10.4;
Add support for LIBSA_SINGLE_DEVICE and LIBSA_SINGLE_FILESYSTEM.
 1.9 22-Feb-1999  simonb Don't implicitly type the devopen() function.
Don't include machine/dec_prom.h.
 1.8 29-Jan-1999  simonb Include dec_{boot,exec,prom}.h from <machine/...>, not <stand/libsa/...>
 1.7 22-Jan-1999  simonb More Makefile cleanups:
+ Don't use our own "clean" and "depend" targets
+ "make depend" works
+ Only include each include path once on compile lines
+ Clean up include file names
+ Don't build a separate libdrive.a, just specify driver source files
+ Use "make print-objdir" instead of old "printf ... | make -f-"
+ Remove more unnecessary targets, variables and other cruft

Still builds identical bootblocks to 1.3.3 with gcc, still too large
with egcs.

dec_boot.h, dec_exec.h & dec_prom.h were copied via respository
copy to sys/arch/pmax/stand/libsa.
 1.6 30-Sep-1996  jonathan branches: 1.6.14;
Add "const" to second argument to devopen.c, to match sys/lib/libsa/stand.h.
 1.5 18-Jan-1995  mellon Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.6.14.1 02-Feb-1999  cgd pull up rev 1.7 from trunk (simonb)
 1.10.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.13.16.1 11-Dec-2002  thorpej Sync with HEAD.
 1.13.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.13.8.1 27-Nov-1999  bouyer file devopen.c was added on branch thorpej_scsipi on 2000-11-20 20:20:44 +0000
 1.13.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.16.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.16.78.1 04-May-2009  yamt sync with head.
 1.5 26-Mar-2011  tsutsui Use .set reorder to entrust compiler hazards and BDslots to avoid future botch
since there is no critical instructions in these sources.

Tested on 3MIN.
 1.4 10-Jan-2011  tsutsui branches: 1.4.2;
Add hazard nops required by MIPS1 in noreorder case.
(Umm, is it easier to remove noreorder and all BDslot insns?)
 1.3 10-Jan-2011  tsutsui - specify .set noreorder to fill BDslots properly
- indent instructions in BDslots
 1.2 28-Apr-2008  martin branches: 1.2.22;
Remove clause 3 and 4 from TNF licenses
 1.1 27-Nov-1999  simonb branches: 1.1.2; 1.1.8; 1.1.136; 1.1.138; 1.1.140;
Add a PROM call stub for getchar.
 1.1.140.1 16-May-2008  yamt sync with head.
 1.1.138.1 18-May-2008  yamt sync with head.
 1.1.136.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.8.1 27-Nov-1999  bouyer file getchar.S was added on branch thorpej_scsipi on 2000-11-20 20:20:44 +0000
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.22.2 21-Apr-2011  rmind sync with head
 1.2.22.1 05-Mar-2011  rmind sync with head
 1.4.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.11 12-Jan-2011  tsutsui Pull a fix from src/sys/net/if_ethersubr.c rev. 1.185:
Fix off by one.
 1.10 10-Jan-2011  tsutsui - start.S
add a hazard nop so that prom_restart() works properly on MIPS1
(it seems broken since initial revision and had been restarted by fault?)

- common.h
export prom_restart()

- if_prom.c
use prom_restart() instead of a direct PROM call (that should be equivalent)
 1.9 09-Jan-2011  tsutsui Misc cleanup:
- use DPRINTF() style debug printf
- KNF and ANSIfy
- fix space/TAB botch
- remove extra newlines
 1.8 09-Jan-2011  tsutsui Check if `enet' environment variable is available before reference to
get MAC address, and exit with appropriate warning messages if it isn't.
My 3MIN doesn't set the variable by default and netboot fails silently.
Also tidy up code that converts strings to enaddr.
 1.7 14-Mar-2009  dsl branches: 1.7.4;
Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.6 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.5 12-Jan-2009  tsutsui branches: 1.5.2;
Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

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

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

Per discussion on current-users.
 1.4 04-May-2008  martin branches: 1.4.8;
Move to standard TNF 2 clause license
 1.3 27-Oct-2007  tsutsui branches: 1.3.16; 1.3.18; 1.3.20;
Include <lib/libsa/dev_net.h> for "extern int try_bootp" decl.
 1.2 13-Mar-2003  drochner branches: 1.2.18; 1.2.60; 1.2.78; 1.2.80; 1.2.84;
cope with changes to libsa/netif.h
(This shouldn't use libsa/netif at all.)
 1.1 23-Feb-2002  gmcgarry branches: 1.1.2; 1.1.10;
Support two-stage netboot. Is known to work on maxine, but problems
have been reported on 3min.
 1.1.10.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.10.1 23-Feb-2002  jdolecek file if_prom.c was added on branch kqueue on 2002-03-16 15:59:14 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 23-Feb-2002  nathanw file if_prom.c was added on branch nathanw_sa on 2002-02-28 04:11:24 +0000
 1.2.84.1 13-Nov-2007  bouyer Sync with HEAD
 1.2.80.1 06-Nov-2007  matt sync with HEAD
 1.2.78.1 28-Oct-2007  joerg Sync with HEAD.
 1.2.60.1 03-Dec-2007  ad Sync with HEAD.
 1.2.18.1 15-Nov-2007  yamt sync with head.
 1.3.20.2 04-May-2009  yamt sync with head.
 1.3.20.1 16-May-2008  yamt sync with head.
 1.3.18.1 18-May-2008  yamt sync with head.
 1.3.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.3.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.4.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.5.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.4.1 05-Mar-2011  rmind sync with head
 1.5 13-Jul-2000  jdolecek switch to sys/conf/newvers_stand.sh for generating vers.c
 1.4 27-Nov-1999  simonb branches: 1.4.2;
Small cleanup based on Alpha newvers.sh.
 1.3 27-Nov-1999  simonb Moved from lib/newvers.sh,v
 1.2 25-Mar-1999  simonb Use "make ... echo ${MACHINE}" to get the machine name so
that this script is MI. Just need to find the right place
for it now - suggestions welcome...
 1.1 25-Mar-1999  simonb Copy of sys/arch/sparc/common/newvers.sh.
 1.4.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9 26-Mar-2011  tsutsui Use .set reorder to entrust compiler hazards and BDslots to avoid future botch
since there is no critical instructions in these sources.

Tested on 3MIN.
 1.8 10-Jan-2011  tsutsui branches: 1.8.2;
Add hazard nops required by MIPS1 in noreorder case.
(Umm, is it easier to remove noreorder and all BDslot insns?)
 1.7 10-Jan-2011  tsutsui - specify .set noreorder to fill BDslots properly
- indent instructions in BDslots
 1.6 14-Dec-2009  matt branches: 1.6.4;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.5 28-Apr-2008  martin branches: 1.5.18;
Remove clause 3 and 4 from TNF licenses
 1.4 27-Nov-1999  simonb branches: 1.4.2; 1.4.8; 1.4.136; 1.4.138; 1.4.140;
Moved from scsiboot/printf.S,v
 1.3 26-Mar-1999  simonb Update copyrights.
 1.2 13-Mar-1999  drochner Remove unneeded <mips/regdef.h>. Its contents went into asm.h while ago.
 1.1 22-Feb-1999  simonb Assembly stubs to PROM callback routines.
 1.4.140.2 11-Mar-2010  yamt sync with head
 1.4.140.1 16-May-2008  yamt sync with head.
 1.4.138.1 18-May-2008  yamt sync with head.
 1.4.136.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.8.1 27-Nov-1999  bouyer file printf.S was added on branch thorpej_scsipi on 2000-11-20 20:20:45 +0000
 1.4.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.18.1 16-Sep-2009  matt Deal with some LP64 issues with only O32 console.
Make bootloader invoke kernel compatible with both O32 and N32
 1.6.4.2 21-Apr-2011  rmind sync with head
 1.6.4.1 05-Mar-2011  rmind sync with head
 1.8.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.5 28-Apr-2008  martin branches: 1.5.8; 1.5.14;
Remove clause 3 and 4 from TNF licenses
 1.4 27-Nov-1999  simonb branches: 1.4.2; 1.4.8; 1.4.136; 1.4.138; 1.4.140;
Header file include cleanup.
 1.3 27-Nov-1999  simonb Moved from lib/putchar.c,v
 1.2 11-Apr-1999  simonb Include <stand.h> so we get a putchar() prototype.
 1.1 25-Mar-1999  simonb branches: 1.1.4;
Basic putchar() implentation in terms of the PROM's printf() callback.
Not really effecient, but there isn't that much printf'ing down by SA
programs and we can use the libsa printf() so things like "%ld" work.
 1.1.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.4.140.2 04-May-2009  yamt sync with head.
 1.4.140.1 16-May-2008  yamt sync with head.
 1.4.138.1 18-May-2008  yamt sync with head.
 1.4.136.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.8.1 27-Nov-1999  bouyer file putchar.c was added on branch thorpej_scsipi on 2000-11-20 20:20:45 +0000
 1.4.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.28 24-Jul-2021  andvar Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.27 22-Jun-2017  flxd branches: 1.27.22;
spelling (DEC called it "TURBOchannel")
 1.26 17-Jul-2011  joerg branches: 1.26.12; 1.26.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.25 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.24 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.23 12-Jan-2009  tsutsui branches: 1.23.2;
WARNSfy
 1.22 25-Jan-2006  christos branches: 1.22.72; 1.22.76; 1.22.84;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.21 11-Dec-2005  christos branches: 1.21.2;
merge ktrace-lwp.
 1.20 07-Aug-2003  agc branches: 1.20.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.19 09-Dec-2002  jdolecek branches: 1.19.6;
add #include <lib/libkern/libkern.h> to pull in prototypes
for couple items which don't have implicit prototypes with -ffreestanding
 1.18 24-Sep-2001  wiz branches: 1.18.4;
va_{start,end} audit:
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).

Improved by comments from enami and christos -- thanks!

Heimdal/krb4/KAME changes already fed back, rest to follow.

Inspired by, but not not based on, OpenBSD.
 1.17 13-Sep-2000  simonb branches: 1.17.2; 1.17.4; 1.17.6;
Add support for booting off RAIDframe RAID1 mirrors.
If the first partition is of type FS_RAID, then add 64 to the block
number for each I/O in rzstrategy().
 1.16 30-Mar-2000  simonb branches: 1.16.4;
Nuke register.
 1.15 27-Nov-1999  simonb branches: 1.15.2;
Don't require a disklabel at the start of a disk - needed for
ISO 9660 f/s support.
 1.14 27-Nov-1999  simonb Moved from lib/rz.c,v
 1.13 11-Apr-1999  simonb Include <common.h> to get prototypes for PROM callbacks.
Use LIBSA_NO_DEV_CLOSE and BOOTRZ instead of SMALL.
In rzclose() call prom_close() on the descriptor if we're on a
pre-REX machine.
 1.12 25-Mar-1999  simonb branches: 1.12.4;
Remove unused debugging code, and clean up an error message.
 1.11 25-Mar-1999  simonb Include <machine/stdarg.h> and not <stdarg.h> - found by adding
-nostdinc to CPPFLAGS.
 1.10 22-Feb-1999  simonb Use memset() instead of bzero().
 1.9 29-Jan-1999  simonb branches: 1.9.2;
Include dec_{boot,exec,prom}.h from <machine/...>, not <stand/libsa/...>
 1.8 22-Jan-1999  simonb More Makefile cleanups:
+ Don't use our own "clean" and "depend" targets
+ "make depend" works
+ Only include each include path once on compile lines
+ Clean up include file names
+ Don't build a separate libdrive.a, just specify driver source files
+ Use "make print-objdir" instead of old "printf ... | make -f-"
+ Remove more unnecessary targets, variables and other cruft

Still builds identical bootblocks to 1.3.3 with gcc, still too large
with egcs.

dec_boot.h, dec_exec.h & dec_prom.h were copied via respository
copy to sys/arch/pmax/stand/libsa.
 1.7 21-Jan-1999  simonb Almost working bootblocks for the pmax. This compiles fine with gcc
2.7.2.2-myc2 (and produces _identical_ bootblocks with the 1.3.3
bootblocks which weren't in the tree), but egcs 1.1.1 builds a ufs.o
that's about a 100 bytes too big, and it busts the 7.5k we've got for
bootrz.

Still needs cleanup - the Makefiles could be better/cleaner, and doesn't
install yet (because of above problem). At least there's something to
work with now.

Note that we have our own versions of a lot of the sys/lib/libsa
routines which are less functional/smaller.
 1.6 28-Jun-1995  jonathan Change bootblock load code to work with old DECstation proms (2100, 3100)
that lack the REX callback introduced with 5k/200.
 1.5 18-Jan-1995  mellon Many changes from Jonathan Stone and a few from me to make small boot blocks and handle NetBSD a.out
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 27-May-1994  glass bsd 4.4-lite pmax port as ported to NetBSD
 1.2 27-May-1994  glass upgrade to bsd 4.4-lite code base. only mod is rcsids
 1.1 12-Oct-1993  deraadt branches: 1.1.1;
Initial revision
 1.1.1.1 12-Oct-1993  deraadt pmax code from <ralphc@pyramid.com> & <rick@snowhite.cis.uoguelph.ca>
 1.9.2.1 02-Feb-1999  cgd pull up revs 1.1-1.8 from trunk (new). (simonb)
 1.12.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.15.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.16.4.1 13-Sep-2000  simonb Pull up rev 1.17 from trunk, approved by thorpej:
Add support for booting off RAIDframe RAID1 mirrors.
If the first partition is of type FS_RAID, then add 64 to the block
number for each I/O in rzstrategy().
 1.17.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.17.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.17.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.17.2.1 13-Sep-2000  bouyer file rz.c was added on branch thorpej_scsipi on 2000-11-20 20:20:45 +0000
 1.18.4.2 11-Dec-2002  thorpej Sync with HEAD.
 1.18.4.1 24-Sep-2001  thorpej file rz.c was added on branch nathanw_sa on 2002-12-11 06:11:36 +0000
 1.19.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.19.6.1 03-Aug-2004  skrll Sync with HEAD
 1.20.16.1 21-Jun-2006  yamt sync with head.
 1.21.2.1 01-Feb-2006  yamt sync with head.
 1.22.84.2 28-Apr-2009  skrll Sync with HEAD.
 1.22.84.1 19-Jan-2009  skrll Sync with HEAD.
 1.22.76.1 04-May-2009  yamt sync with head.
 1.22.72.1 17-Jan-2009  mjf Sync with HEAD.
 1.23.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.26.30.1 28-Aug-2017  skrll Sync with HEAD
 1.26.12.1 03-Dec-2017  jdolecek update from HEAD
 1.27.22.1 01-Aug-2021  thorpej Sync with HEAD.
 1.4 17-Mar-2009  he Introduce LIBSA_NO_DEV_IOCTL, and don't declare ioctl() if it's defined.
Also, don't declare the close() function if LIBSA_NO_DEV_CLOSE is defined.
 1.3 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.2 27-Nov-1999  simonb branches: 1.2.2; 1.2.8; 1.2.140; 1.2.148; 1.2.154;
Moved from lib/rz.h,v
 1.1 21-Jan-1999  simonb branches: 1.1.2;
Almost working bootblocks for the pmax. This compiles fine with gcc
2.7.2.2-myc2 (and produces _identical_ bootblocks with the 1.3.3
bootblocks which weren't in the tree), but egcs 1.1.1 builds a ufs.o
that's about a 100 bytes too big, and it busts the 7.5k we've got for
bootrz.

Still needs cleanup - the Makefiles could be better/cleaner, and doesn't
install yet (because of above problem). At least there's something to
work with now.

Note that we have our own versions of a lot of the sys/lib/libsa
routines which are less functional/smaller.
 1.1.2.1 02-Feb-1999  cgd pull up rev 1.1 from trunk (new). (simonb)
 1.2.154.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.148.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.140.1 04-May-2009  yamt sync with head.
 1.2.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.8.1 27-Nov-1999  bouyer file rz.h was added on branch thorpej_scsipi on 2000-11-20 20:20:45 +0000
 1.2.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.23 26-Mar-2011  tsutsui Use .set reorder to entrust compiler hazards and BDslots to avoid future botch
since there is no critical instructions in these sources.

Tested on 3MIN.
 1.22 10-Jan-2011  tsutsui branches: 1.22.2;
- start.S
add a hazard nop so that prom_restart() works properly on MIPS1
(it seems broken since initial revision and had been restarted by fault?)

- common.h
export prom_restart()

- if_prom.c
use prom_restart() instead of a direct PROM call (that should be equivalent)
 1.21 10-Jan-2011  tsutsui Indent instructions in BDslots.
 1.20 28-Apr-2008  martin branches: 1.20.22;
Remove clause 3 and 4 from TNF licenses
 1.19 07-Feb-2006  simonb branches: 1.19.68; 1.19.70; 1.19.72;
Fix END symbol so that it matches START symbol for prom_write.
 1.18 11-Dec-2005  christos branches: 1.18.2; 1.18.4; 1.18.6;
merge ktrace-lwp.
 1.17 07-Aug-2003  agc branches: 1.17.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.16 27-Nov-1999  simonb branches: 1.16.2; 1.16.8; 1.16.34;
Remove code in sector 0 support - we don't need the space and it allows
for the coexistance for other port's bootblocks in sector 0.
 1.15 27-Nov-1999  simonb Moved from lib/start.S,v
 1.14 12-Apr-1999  simonb Fix an off-by-32 error - space was padded out to the 96th byte for the
DEC disk boot block header, but it's only 64 bytes long. Gives us
another 32 bytes in the first stage.

Don't use a roll-your-own START_FRAME size and offsets for the stack
and ra - use the <mips/asm.h> provided CALLFRAME_SIZ, CALLFRAME_RA and
CALLFRAME_SP
 1.13 11-Apr-1999  simonb Use BOOTRZ instead of BOOTXX.
Add a PROM callback for prom_close if not LIBSA_NO_DEV_CLOSE.
 1.12 29-Mar-1999  simonb branches: 1.12.4;
Remove bogus comment.
 1.11 26-Mar-1999  simonb Update copyrights.
 1.10 25-Mar-1999  simonb Only include the dec disklabel at the start of BOOTXX is defined.
 1.9 25-Mar-1999  simonb Call main instead of _main.
 1.8 13-Mar-1999  drochner Remove unneeded <mips/regdef.h>. Its contents went into asm.h while ago.
 1.7 22-Feb-1999  simonb Allow code in sector zero (from Michael Hitch).
Also in start.S:
+ Removed unused printf routine.
+ Removed unused dummy __main for gcc.
+ s/bzero/memset/.
 1.6 30-Jan-1999  simonb branches: 1.6.2;
Use DEC_REX_MAGIC instead of a undocumented magic number
 1.5 29-Jan-1999  simonb Include dec_{boot,exec,prom}.h from <machine/...>, not <stand/libsa/...>
 1.4 22-Jan-1999  simonb More Makefile cleanups:
+ Don't use our own "clean" and "depend" targets
+ "make depend" works
+ Only include each include path once on compile lines
+ Clean up include file names
+ Don't build a separate libdrive.a, just specify driver source files
+ Use "make print-objdir" instead of old "printf ... | make -f-"
+ Remove more unnecessary targets, variables and other cruft

Still builds identical bootblocks to 1.3.3 with gcc, still too large
with egcs.

dec_boot.h, dec_exec.h & dec_prom.h were copied via respository
copy to sys/arch/pmax/stand/libsa.
 1.3 21-Jan-1999  simonb Almost working bootblocks for the pmax. This compiles fine with gcc
2.7.2.2-myc2 (and produces _identical_ bootblocks with the 1.3.3
bootblocks which weren't in the tree), but egcs 1.1.1 builds a ufs.o
that's about a 100 bytes too big, and it busts the 7.5k we've got for
bootrz.

Still needs cleanup - the Makefiles could be better/cleaner, and doesn't
install yet (because of above problem). At least there's something to
work with now.

Note that we have our own versions of a lot of the sys/lib/libsa
routines which are less functional/smaller.
 1.2 16-Jun-1997  jonathan Remove all references to <machine/machAsmDefs.h>.
Use #include <mips/asm.h> instead.
 1.1 18-Jan-1995  mellon Start code for boot loader (under new name with some changes)
 1.6.2.1 02-Feb-1999  cgd pull up revs 1.1-1.4 from trunk (new). (simonb)
 1.12.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.16.34.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.34.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.34.1 03-Aug-2004  skrll Sync with HEAD
 1.16.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.16.8.1 27-Nov-1999  bouyer file start.S was added on branch thorpej_scsipi on 2000-11-20 20:20:46 +0000
 1.16.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.17.16.1 21-Jun-2006  yamt sync with head.
 1.18.6.1 22-Apr-2006  simonb Sync with head.
 1.18.4.1 09-Sep-2006  rpaulo sync with head
 1.18.2.1 18-Feb-2006  yamt sync with head.
 1.19.72.1 16-May-2008  yamt sync with head.
 1.19.70.1 18-May-2008  yamt sync with head.
 1.19.68.1 02-Jun-2008  mjf Sync with HEAD.
 1.20.22.2 21-Apr-2011  rmind sync with head
 1.20.22.1 05-Mar-2011  rmind sync with head
 1.22.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8 10-Jan-2011  tsutsui Indent instructions in BDslots.
 1.7 07-Jan-2011  tsutsui Put .set noreorder so that BDslots are properly filled.
 1.6 25-Nov-2010  tsutsui Fix botch on mips64 merge:
- use correct offsets to pass args to loaded kernel in __mips_o32 case

Now NetBSD/pmax kernel properly boots, but init(8) still doesn't start
on GXemul emulating R3000 3MAX.
 1.5 14-Dec-2009  matt branches: 1.5.4;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.4 28-Apr-2008  martin branches: 1.4.18;
Remove clause 3 and 4 from TNF licenses
 1.3 27-Nov-1999  simonb branches: 1.3.2; 1.3.8; 1.3.136; 1.3.138; 1.3.140;
Moved from lib/startprog.S,v
 1.2 25-Mar-1999  simonb Oops, forgot RCS header and copyright.
 1.1 25-Mar-1999  simonb Assembly routine that takes an entry point, new stack pointer address
and six extra arguments. Sets up the stack pointer with the arguments
in the right registers/stack positions and calls the entry point.
 1.3.140.2 11-Mar-2010  yamt sync with head
 1.3.140.1 16-May-2008  yamt sync with head.
 1.3.138.1 18-May-2008  yamt sync with head.
 1.3.136.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.8.1 27-Nov-1999  bouyer file startprog.S was added on branch thorpej_scsipi on 2000-11-20 20:20:46 +0000
 1.3.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.4.18.1 16-Sep-2009  matt Deal with some LP64 issues with only O32 console.
Make bootloader invoke kernel compatible with both O32 and N32
 1.5.4.1 05-Mar-2011  rmind sync with head
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 14-Dec-2003  he Stop the install from trying to strip the ECOFF executable.
The MIPS strip program seg-faults if that is attempted.
 1.1 23-Feb-2002  gmcgarry branches: 1.1.2; 1.1.20;
Support two-stage netboot. Is known to work on maxine, but problems
have been reported on 3min.
 1.1.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.20.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 23-Feb-2002  nathanw file Makefile was added on branch nathanw_sa on 2002-02-28 04:11:24 +0000
 1.1 23-Feb-2002  gmcgarry branches: 1.1.2;
Support two-stage netboot. Is known to work on maxine, but problems
have been reported on 3min.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 23-Feb-2002  nathanw file version was added on branch nathanw_sa on 2002-02-28 04:11:24 +0000
 1.2 27-Nov-1999  simonb Updated for new Makefile.booters and stand/ layout.
 1.1 13-May-1999  simonb branches: 1.1.2; 1.1.4; 1.1.10;
Standalone program that contains a compressed kernel image suitable for
netbooting on machines that can't netboot a fullsize kernel.

This is only a stop-gap solution until the pmax gets a working two stage
netboot, and is not enabled by default.
 1.1.10.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.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.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3 13-Mar-2000  soren Fix doubled 'the's in comments.
 1.2 13-May-1999  simonb branches: 1.2.2; 1.2.4;
Add some instructions.
 1.1 13-May-1999  simonb Standalone program that contains a compressed kernel image suitable for
netbooting on machines that can't netboot a fullsize kernel.

This is only a stop-gap solution until the pmax gets a working two stage
netboot, and is not enabled by default.
 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.8 22-Jan-2011  joerg Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
 1.7 14-Mar-2009  dsl branches: 1.7.4; 1.7.6; 1.7.8;
Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.6 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.5 28-Apr-2008  martin branches: 1.5.8; 1.5.14;
Remove clause 3 and 4 from TNF licenses
 1.4 27-Nov-1999  simonb branches: 1.4.132; 1.4.134; 1.4.136;
Clean up headers.
 1.3 13-Nov-1999  thorpej Backout my libsa changes.
 1.2 12-Nov-1999  simonb Remove references to libkern after Jason's recent work to libsa.
 1.1 13-May-1999  simonb branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10;
Standalone program that contains a compressed kernel image suitable for
netbooting on machines that can't netboot a fullsize kernel.

This is only a stop-gap solution until the pmax gets a working two stage
netboot, and is not enabled by default.
 1.1.10.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.6.1 15-Nov-1999  fvdl Sync with -current
 1.1.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.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.4.136.2 04-May-2009  yamt sync with head.
 1.4.136.1 16-May-2008  yamt sync with head.
 1.4.134.1 18-May-2008  yamt sync with head.
 1.4.132.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.7.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.7.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.7.4.1 05-Mar-2011  rmind sync with head
 1.2 13-Jul-2000  jdolecek switch to sys/conf/newvers_stand.sh for generating vers.c
sync comments in */version with i386
 1.1 13-May-1999  simonb branches: 1.1.2; 1.1.4;
Standalone program that contains a compressed kernel image suitable for
netbooting on machines that can't netboot a fullsize kernel.

This is only a stop-gap solution until the pmax gets a working two stage
netboot, and is not enabled by default.
 1.1.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.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.6 01-Jan-2019  christos ELF2ECOFF -> MIPS_ELF2ECOFF
 1.5 12-Apr-2002  lukem branches: 1.5.200; 1.5.202;
use ${ELF2ECOFF} from <bsd.{own,sys}.mk>
 1.4 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.3 14-Nov-2001  tv branches: 1.3.2;
${MAKE} print-objdir -> ${PRINTOBJDIR}
 1.2 30-Aug-2000  jhawk branches: 1.2.4;
Use
${MAKE}
instead of
make
 1.1 13-May-1999  simonb branches: 1.1.2; 1.1.4;
Standalone program that contains a compressed kernel image suitable for
netbooting on machines that can't netboot a fullsize kernel.

This is only a stop-gap solution until the pmax gets a working two stage
netboot, and is not enabled by default.
 1.1.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.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.2.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.3.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.2.1 14-Nov-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:27:08 +0000
 1.5.202.1 10-Jun-2019  christos Sync with HEAD
 1.5.200.1 18-Jan-2019  pgoyette Synch with HEAD
 1.8 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.7 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.6 28-Apr-2008  martin branches: 1.6.8; 1.6.14;
Remove clause 3 and 4 from TNF licenses
 1.5 04-Mar-2007  christos branches: 1.5.40; 1.5.42; 1.5.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.4 20-Jul-2002  grant branches: 1.4.22; 1.4.60;
sweep of errx/warnx, remove unnecessary trailing \n
 1.3 19-Feb-2001  cgd branches: 1.3.4; 1.3.8; 1.3.18;
convert to use getprogname()
 1.2 25-Oct-1999  kleink Update to match new SVR4-style definition names in <sys/exec_elf.h>.
 1.1 13-May-1999  simonb branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Standalone program that contains a compressed kernel image suitable for
netbooting on machines that can't netboot a fullsize kernel.

This is only a stop-gap solution until the pmax gets a working two stage
netboot, and is not enabled by default.
 1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.6.1 15-Nov-1999  fvdl Sync with -current
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.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.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3.18.1 31-Aug-2002  gehenna catch up with -current.
 1.3.8.1 01-Aug-2002  nathanw Catch up to -current.
 1.3.4.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.60.1 12-Mar-2007  rmind Sync with HEAD.
 1.4.22.1 03-Sep-2007  yamt sync with head.
 1.5.44.2 04-May-2009  yamt sync with head.
 1.5.44.1 16-May-2008  yamt sync with head.
 1.5.42.1 18-May-2008  yamt sync with head.
 1.5.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file asc.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.4 02-Mar-1999  nisimura - An inch towards busified drivers. Needs considerations for TCDS
consolidation.
 1.1.2.3 06-Dec-1998  drochner update for scsipi_adapter changes
 1.1.2.2 15-Oct-1998  nisimura - Updated as recent changes for MI SCSI.
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.27 03-May-2022  andvar fix various typos, mainly s/trasfering/transferring/ and s/theese/these/.
 1.26 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.25 13-Oct-2012  tsutsui branches: 1.25.36; 1.25.38;
Fix botch on device_t/softc split in debug printf macro. from chs@
 1.24 09-Jul-2011  matt branches: 1.24.2; 1.24.12;
Cleanu <machine/*> includes
 1.23 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.22 12-Aug-2009  tsutsui Fix a botch in the previous rev 1.21:
We have to mask higher bits on NCR register access via bus_space_read_4(9),
as the previous NCR_READ_REG() does.
Problem reported by Erik Bertelsen on port-pmax@.

I tested a different version on 3MIN and I also tested committed version
on gxemul, but 3MAX doesn't have asc_ioasic but asc_tc..
 1.21 01-Aug-2009  tsutsui Micro optimization around ncr53c9x register accesses.
 1.20 28-Apr-2008  martin branches: 1.20.18;
Remove clause 3 and 4 from TNF licenses
 1.19 13-Apr-2008  tsutsui branches: 1.19.2; 1.19.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.18 06-Mar-2007  simonb branches: 1.18.40;
Fix some caddr_t rototill fallout.

Some from Erik Bertelsen on port-pmax@.
 1.17 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.16 08-Mar-2006  lukem branches: 1.16.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.15 02-Apr-2003  thorpej branches: 1.15.18; 1.15.32; 1.15.34; 1.15.36; 1.15.38;
Use PAGE_SIZE rather than NBPG.
 1.14 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.13 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.12 26-Aug-2001  simonb branches: 1.12.6;
Switch to MI SCSI and drop old pmax MD SCSI support completely.
 1.11 25-Apr-2001  bouyer branches: 1.11.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.10 28-Sep-2000  mhitch branches: 1.10.2;
Set the boundary to NBPG for bus_dmamap_create(). The IOASIC DMA segment
can not cross a page boundary. This fixes a problem when a dump(8) buffer
just crossed a page boundary and bus_dmamap_load() would coalesce the
the overlap onto the first segment. The NEXTPTR value would get set to
-1 when starting the DMA transfer and the residual data for unaligned
transfers would be copied to physical address 0x1ffffffc. On the R3000,
this would result in corrupted data, and on the R4000 would usually result
in a hard system hang.
 1.9 07-Jun-2000  nisimura branches: 1.9.2;
- Take care of dm_segs[].dm_len value whenever the offset is adjusted.
Known not working well for 4MAX+ this moment.
- White spacing.
 1.8 05-Jun-2000  nisimura 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.7 03-Jun-2000  nisimura Use bus_dma(9) to instruct IOASIC DMA to load transferring addresses,
eliminating MIPS cache machinary exposure here.
 1.6 06-Mar-2000  mhitch branches: 1.6.2;
Get rid of hook for dk_establish() - pmax will now use device_register().
 1.5 04-Mar-2000  nisimura Cosmetic cleanups to hide local objects.
 1.4 04-Mar-2000  mhitch Fix boot device detection. Device probes are not done when adapters are
configured, but after all adapters have been configured. When multiple
adapters are present, only the last configured adapter could be matched
to the boot device slot. The adapter attach routines now check if that
adapter slot matches the boot device slot and saves the softc pointer
for that controller. Then when the disks are configured, dk_establish()
matches the appropriate controller. Also change the rz boot device test
to include a check for the adapter so that it works when booting from a
disk on adapters other than the first one.
 1.3 28-Feb-2000  mhitch Check and clear the appropriate IOASIC SCSI interrupt bits when in polled
I/O mode. Kernel dumps will now work with the IOASIC SCSI devices.
 1.2 19-Feb-2000  nisimura Introduce MI SCSI codes; for DECstation 5000s only this moment.
 1.1 15-Oct-1998  nisimura branches: 1.1.2; 1.1.4;
file asc_ioasic.c was initially added on branch nisimura-pmax-wscons.
 1.1.4.2 29-Mar-2001  bouyer Pass compile-test on i386
 1.1.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.1.2.15 14-Mar-2000  nisimura Synchronize with the recent improvements of main trunk. Main trunk
filled gaps toward this, indeed.
 1.1.2.14 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.1.2.13 10-Sep-1999  nisimura Fix an error in DMAPTR adjustment in unaligned transaction.
 1.1.2.12 09-Sep-1999  nisimura Add more SCR/SDR0/SDR1 improvement. From the analysis on Mach3/pmax codes.
IOASIC SCSI DMA is performed on 8-byte boundary. Unaligned transaction
requires special care managed by these registers. SDR0/SDR1 hold unaligned
data upto 6 bytes in 2 byte increment while SCR indicates the cases. Disk
block I/O operation behaves gracefully and is immune to unaligned transfers.
TODO.1 - introduce bus_dmamap_load(); must be good for either of R3000
cache and R4000 cache.
TODO.2 - handle PTR LOAD interrupt to perform 'chained' DMA spans 3+ page
long.
TODO.3 - tape drive ...
TODO.4 - syncing disks on halt/reboot.
TODO.5 - dumping core memory on panic.
TODO.6 - test ss/uk/ch drives.
 1.1.2.11 06-Sep-1999  nisimura Fix missing shift adjustment of DMAPTR value. Still no luck for tape drive.
 1.1.2.10 05-Sep-1999  nisimura - Add SCR/SDR0/SDR1 register handling supposedly necessary (but failed to
cure any of erroneous behavoiurs I'm experiencing ...)
 1.1.2.9 06-Apr-1999  nisimura - Another bit improvement toward bus_space(9).
 1.1.2.8 05-Apr-1999  nisimura - A bit improvement toward bus_space(9).
 1.1.2.7 30-Mar-1999  nisimura - Restore a local variable mistakenly omitted.
- sc_iswrite -> sc_ispullup (pull up from SCSI device).
 1.1.2.6 29-Mar-1999  drochner use common dev/tc/ioasic code
 1.1.2.5 05-Mar-1999  nisimura - Snailing ahead for bus'ified drivers.
 1.1.2.4 02-Mar-1999  nisimura - An inch towards busified drivers. Needs considerations for TCDS
consolidation.
 1.1.2.3 18-Jan-1999  drochner remove void * arithmetics
 1.1.2.2 06-Dec-1998  drochner update for scsipi_adapter changes
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.6.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.9.2.1 30-Sep-2000  mhitch Pull up rev 1.10 [approved by thorpej].

Set the boundary to NBPG for bus_dmamap_create(). The IOASIC DMA segment
can not cross a page boundary. This fixes a problem when a dump(8) buffer
just crossed a page boundary and bus_dmamap_load() would coalesce the
the overlap onto the first segment. The NEXTPTR value would get set to
-1 when starting the DMA transfer and the residual data for unaligned
transfers would be copied to physical address 0x1ffffffc. On the R3000,
this would result in corrupted data, and on the R4000 would usually result
in a hard system hang.
 1.10.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.11.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.12.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.12.6.1 26-Aug-2001  nathanw file asc_ioasic.c was added on branch nathanw_sa on 2002-10-18 02:39:28 +0000
 1.15.38.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.15.36.1 13-Mar-2006  yamt sync with head.
 1.15.34.1 22-Apr-2006  simonb Sync with head.
 1.15.32.1 09-Sep-2006  rpaulo sync with head
 1.15.18.2 03-Sep-2007  yamt sync with head.
 1.15.18.1 21-Jun-2006  yamt sync with head.
 1.16.16.1 12-Mar-2007  rmind Sync with HEAD.
 1.18.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.19.4.3 11-Mar-2010  yamt sync with head
 1.19.4.2 19-Aug-2009  yamt sync with head.
 1.19.4.1 16-May-2008  yamt sync with head.
 1.19.2.1 18-May-2008  yamt sync with head.
 1.20.18.1 08-Sep-2009  matt Enable building LP64 kernels for 3min, maxine, and 3maxplus.
Fix various LP64 bugs.
XXX still invoked via O32 call args
 1.24.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.24.2.1 30-Oct-2012  yamt sync with head
 1.25.38.1 10-Jun-2019  christos Sync with HEAD
 1.25.36.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.9 01-Oct-2001  simonb Move MI PMAZ-A SCSI attachment to sys/dev/tc.
 1.8 26-Aug-2001  simonb branches: 1.8.2;
Switch to MI SCSI and drop old pmax MD SCSI support completely.
 1.7 25-Apr-2001  bouyer branches: 1.7.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.6 05-Jun-2000  nisimura branches: 1.6.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.5 06-Mar-2000  mhitch branches: 1.5.2;
Get rid of hook for dk_establish() - pmax will now use device_register().
 1.4 04-Mar-2000  nisimura Cosmetic cleanups to hide local objects.
 1.3 04-Mar-2000  mhitch Fix boot device detection. Device probes are not done when adapters are
configured, but after all adapters have been configured. When multiple
adapters are present, only the last configured adapter could be matched
to the boot device slot. The adapter attach routines now check if that
adapter slot matches the boot device slot and saves the softc pointer
for that controller. Then when the disks are configured, dk_establish()
matches the appropriate controller. Also change the rz boot device test
to include a check for the adapter so that it works when booting from a
disk on adapters other than the first one.
 1.2 19-Feb-2000  nisimura Introduce MI SCSI codes; for DECstation 5000s only this moment.
 1.1 15-Oct-1998  nisimura branches: 1.1.2; 1.1.4;
file asc_pmaz.c was initially added on branch nisimura-pmax-wscons.
 1.1.4.3 29-Mar-2001  bouyer Pass compile-test on i386
 1.1.4.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.1.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.1.2.7 14-Mar-2000  nisimura Synchronize with the recent improvements of main trunk. Main trunk
filled gaps toward this, indeed.
 1.1.2.6 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.1.2.5 30-Mar-1999  nisimura - Restore a local variable mistakenly omitted.
- sc_iswrite -> sc_ispullup (pull up from SCSI device).
 1.1.2.4 05-Mar-1999  nisimura - Snailing ahead for bus'ified drivers.
 1.1.2.3 02-Mar-1999  nisimura - An inch towards busified drivers. Needs considerations for TCDS
consolidation.
 1.1.2.2 06-Dec-1998  drochner update for scsipi_adapter changes
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.5.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.6.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.8.2.1 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file ascvar.h was initially added on branch nisimura-pmax-wscons.
 1.1.2.3 02-Mar-1999  nisimura - An inch towards busified drivers. Needs considerations for TCDS
consolidation.
 1.1.2.2 06-Dec-1998  drochner update for scsipi_adapter changes
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.42 01-Dec-1999  nisimura Replace old asic.c with one imported from a development branch.
 1.41 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.40 01-Oct-1999  nisimura branches: 1.40.2; 1.40.8;
- Remove defunct codes and arrange consistency between pmax and alpha.
- Reduce 'ioasic_base' expose.
 1.39 28-Sep-1999  nisimura Forgot to commit an important change for bus_space/bus_dma.
 1.38 09-Sep-1999  nisimura Remove now defunct local implementation of ioasic_lance_dma_setup().
 1.37 03-Sep-1999  nisimura - Nuke '#ifdef alpha' which brings little useful, plus a small cleanup.
 1.36 26-Apr-1999  nisimura - Forgot to commit these two.
 1.35 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.34 18-Mar-1999  simonb branches: 1.34.4;
Don't prototype ioasicprint() - the prototype is now in
dev/tc/ioasicvar.h and we don't use it here anyway.
 1.33 15-Mar-1999  jonathan MI ioasic softc and child-device structs, gc duplicate struct definitions.
Add MI ioasic functions, but dont enable on alpha until tested.
 1.32 14-Mar-1999  jonathan Clean up initializers for pmax ioasic children. Use same struct as alpha.
 1.31 12-Mar-1999  nisimura - Nuke old leftover; round two. XXX Still there 3MAX's IOASIC disguise.
Rework will be done in conf/files.pmax, anyway.
 1.30 05-Sep-1998  nisimura branches: 1.30.2;
- Clearify what ioasic_init() is for. No runtime difference because
NetBSD/pmax does not fully utilize the hardware features.
 1.29 21-May-1998  thorpej Make this build for a 3MAX-only kernel.
 1.28 25-Apr-1998  jonathan Resync 3max (kn02) support.
 1.27 19-Apr-1998  jonathan Rework, based loosely on suggestions from Tohru Nisimura..
 1.26 26-Mar-1998  thorpej It's Just Wrong to configure a KN02 system slot as an IOCTL ASIC, but
since it's currently done that way, nuke the gratuitous printf that
reports the behavior.
 1.25 25-Mar-1998  jonathan * Use new defopt model-specific options and opt files.
Replace all DS5000_* and DS3100 ifdefs with ifdefs on DEC_ options.
* Use MI declarations, not pmax-specific, in model-specific init
that uses baseboard (ioasic) registers.
* Further cleanup of machdep.c. Clock-tick still needs more thought.
* Use 'ibus' names for 3100 baseboard devices in MI code.
 1.24 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.23 12-Jan-1998  thorpej Update for changes to config.
 1.22 21-Jul-1997  jonathan Kill __BROKEN_INDIRECT_CONFIG on pmax.
Based on a patch from Chris G. Demetriou, December 1996.
 1.21 17-Jul-1997  jtk use locator defines in "locators.h" to index cf_loc[]
 1.20 16-Jun-1997  jonathan Garbage-collect '#include <machine/pte.h>'.
 1.19 16-Jun-1997  jonathan <machine/locore.h> -> <machine/bus.h>
 1.18 16-Jun-1997  jonathan Remove the machConst.h (wrapper for Sprite-derived source), and all
#includes <machine/machConst.h> uses.
Other header files now include <mips/cpuregs.h> where necessary.
 1.17 15-Jun-1997  mhitch DECstation MIPS3 support: wbflush() is cpu-dependent, need declaration from
machine/locore.h.
 1.16 24-May-1997  jonathan Delint debugging-printf() macro.
 1.15 13-Oct-1996  christos backout previous kprintf change
 1.14 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.13 06-Oct-1996  jonathan Update pmax drivers to use "const" on 2nd arg to cfprint_t:
turbocnhannel: include/tc_machdep.h, tc/tc_subr.c, tc/asic.c
kn01 baseboard: pmax/mainbus.c
 1.12 09-Sep-1996  jonathan Apply diff from the 1.2 release branch, so that ugly IOASIC debugging
is disabled by default:
>revision 1.9.4.2
>date: 1996/09/09 20:19:11; author: thorpej; state: Exp; lines: +2 -18
>Disable IOASIC_DEBUG so that autoconfiguration looks normal, by request
>of Jonathan Stone
 1.11 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.10 29-May-1996  mhitch Fix autoconfiguration stuff to more closely match the alpha - primarily
the IOASIC attached devices. The DS3100 will now configure properly.
Fix the DS5000/25 IOASIC table entry for the RTC so the RTC interrupts
get enabled.
Fix up a moved include file.
 1.9 17-Mar-1996  thorpej branches: 1.9.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.8 31-Jan-1996  jonathan Resolve pmax and alpha IOCTL asic driver differences, pass 1:

Rename the ioctl asic register and slot macros from ASIC_<xxx> to
IOASIC_<xxx>, to be compatible with the machine-indpendent names in
sys/dev/tc/ioasicvar.h. The pmax code still uses
sys/arch/pmax/pmax/asic.h, as some of the registers and offsets
defined there are not yet defined in sys/dev/tc/ioasicvar.h.

Rename the ioctl asic base-address pointer from `asic_base' to `ioasic_base'.
 1.7 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.6 25-Sep-1995  jonathan Update pmax kernel to compile with -Werror:
Update TURBOChannel and ioasic interrupt-establish routines to pass on their
device argument as a "void *", since that's how all the pmax interrupt handlers
are declared.
 1.5 12-Sep-1995  jonathan Change the signature of interrupt-handlers to take a void *
(a pointer to the softc) and return an int (indicating spurious
interrupts or other conditions.)
 1.4 29-Aug-1995  jonathan Fix references to ASIC_SLOT_RTC, which isn't yet defined on DECstations.
 1.3 18-Aug-1995  jonathan Initialize the ioasic slot probe table for the 3MIN (Decstation 5k/1xx)
and MAXINE (Decstation 5k/xx), instead of setting them to NULL.
New-config kernels should work on those machines now.

Rename the definition of the struct cfdriver for the IO ASIC from "asiccd"
to "ioasiccd", as the config-file name changed from "asic" to "ioasic".
 1.2 10-Aug-1995  jonathan Move IO ASIC interrupt-enable outside #ifdef DEBUG, where it had
accidentally snuck in. Clean up debugging messages and explicitly
give a warning on CPUs the code hasn't been tested on.
 1.1 07-Aug-1995  jonathan New-style config (config.new) autoconfiguration code for Decstation
turhsturbochannel machines. Lifted wholesale from cgd's Alpha
turbochannel code, with changes that reflect the slightly different
bus topology and `slot' numbering on Decstations.
 1.9.4.2 09-Sep-1996  thorpej Disable IOASIC_DEBUG so that autoconfiguration looks normal, by request
from Jonathan Stone.
 1.9.4.1 30-May-1996  mhitch Pulled autoconfig fixes up from the trunk
 1.30.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.34.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.40.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.40.2.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file bt431reg.h was initially added on branch nisimura-pmax-wscons.
 1.1.2.2 30-Oct-1998  nisimura - Migrate to MI TURBOchannel codes.
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file bt459reg.h was initially added on branch nisimura-pmax-wscons.
 1.1.2.2 30-Oct-1998  nisimura - Migrate to MI TURBOchannel codes.
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file cfb.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.2 30-Oct-1998  nisimura - Migrate to MI TURBOchannel codes.
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.7 19-Apr-1998  jonathan Rework pmax turbochannel config, as suggested by Jason Thorpe.
Also make TC framebuffer-console search table-driven.

Does not yet include "tcasic" layer; there's no such hardware on DECstations
and nothing for a tcasic layer to do.
 1.6 29-May-1996  mhitch Fix autoconfiguration stuff to more closely match the alpha - primarily
the IOASIC attached devices. The DS3100 will now configure properly.
Fix the DS5000/25 IOASIC table entry for the RTC so the RTC interrupts
get enabled.
Fix up a moved include file.
 1.5 29-Jan-1996  jonathan branches: 1.5.4;
Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.4 03-Jan-1996  jonathan arch/pmax/tc -> dev/tc, pass 1:
Eliminate pmax/tc/tc.h. Use dev/tc headers for pmax port. Change pmax TC
autoconfig tables to use structs (mostly) compatible with dev/tc/tcvar.h.
Move TC console search to tc.c.
 1.3 09-Oct-1995  jonathan Fix bugs in the turbochannel config table for MAXINE (personal decstation).
 1.2 09-Aug-1995  jonathan Add missing "priority" field value in KN02 "asic" configuration entry for
the Dallas-compatible real-time clock. The missing entry caused the offset
to end up in the "priority" field. New-style config now boots cleanly on a
KN02 (3MAX).
 1.1 07-Aug-1995  jonathan New-style config (config.new) autoconfiguration code for Decstation
turhsturbochannel machines. Lifted wholesale from cgd's Alpha
turbochannel code, with changes that reflect the slightly different
bus topology and `slot' numbering on Decstations.
 1.5.4.1 30-May-1996  mhitch Pulled autoconfig fixes up from the trunk
 1.8 27-Feb-1996  jonathan Replace tc.c and ds-tc-conf.c with a re-written tc_subr.c. tc_subr.c
works with the revamped machine-independent TC code in sys/dev/tc.
A name change is necessary to avoid a name clash with sys/dev/tc/tc.c,
which also creates a tc.o.
 1.7 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.6 11-Jan-1996  jonathan Add lots of debugging to the TurboChannel autoconfiguration code.
 1.5 03-Jan-1996  jonathan arch/pmax/tc -> dev/tc, pass 1:
Eliminate pmax/tc/tc.h. Use dev/tc headers for pmax port. Change pmax TC
autoconfig tables to use structs (mostly) compatible with dev/tc/tcvar.h.
Move TC console search to tc.c.
 1.4 09-Oct-1995  jonathan Fix bugs in the turbochannel config table for MAXINE (personal decstation).
 1.3 12-Sep-1995  jonathan Add entry for MAXINE xcfb baseboard framebuffer to the MAXINE
turbochannel configuration table.
 1.2 24-Aug-1995  jonathan Fix autoconfig table initializers for 3MIN (tested) and MAXINE (untested).
 1.1 07-Aug-1995  jonathan New-style config (config.new) autoconfiguration code for Decstation
turhsturbochannel machines. Lifted wholesale from cgd's Alpha
turbochannel code, with changes that reflect the slightly different
bus topology and `slot' numbering on Decstations.
 1.16 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.15 24-Apr-2021  thorpej branches: 1.15.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.14 21-Nov-2020  thorpej branches: 1.14.2;
malloc(9) -> kmem(9)
 1.13 10-Nov-2019  chs branches: 1.13.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.12 28-Jun-2015  maxv branches: 1.12.18;
Use-after-free.

ok christos@

Found by The Brainy Code Scanner.
 1.11 04-Jun-2011  tsutsui branches: 1.11.12; 1.11.28; 1.11.30;
- split device_t/softc
- make sure that *(dtdv_handler)() registered via dt_establish_handler()
takes softc, not device_t as other interrupt handlers

No crash during device attach on GXemul.
 1.10 28-Apr-2008  martin branches: 1.10.22; 1.10.28; 1.10.32;
Remove clause 3 and 4 from TNF licenses
 1.9 17-Oct-2007  garbled branches: 1.9.16; 1.9.18; 1.9.20;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.8 08-Oct-2007  ad Use the softint API.
 1.7 04-Mar-2007  christos branches: 1.7.2; 1.7.10; 1.7.18; 1.7.20; 1.7.22;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.6 11-Dec-2005  christos branches: 1.6.26;
merge ktrace-lwp.
 1.5 10-Jun-2005  jmc branches: 1.5.2;
Change max -> max_polls to avoid shadowing.
 1.4 15-Jan-2005  mhitch Detection of mouse packet did not work with my mouse. It only sends 6 bytes
instead of the 8 defined by struct dt_locator_msg. Change the dectection
so we swap the mouse/keyboard addresses only if the packets don't match
what's expected (rather than on every packet). My mouse now works, and
if a different mouse sends an 8 byte packet, it should also work.
 1.3 23-Dec-2003  ad MAXINE keyboard and mouse now works, albeit with some minor issues.
 1.2 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.1 15-Mar-2002  ad branches: 1.1.2; 1.1.12;
file dt.c was initially added on branch ad_pmax_wscons.
 1.1.12.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.12.4 17-Jan-2005  skrll Sync with HEAD.
 1.1.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.12.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.2 15-Mar-2002  ad More sanity checks.
 1.1.2.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.5.2.2 27-Oct-2007  yamt sync with head.
 1.5.2.1 03-Sep-2007  yamt sync with head.
 1.6.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.7.22.1 14-Oct-2007  yamt sync with head.
 1.7.20.1 06-Nov-2007  matt sync with HEAD
 1.7.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.7.10.1 16-Oct-2007  garbled Sync with HEAD
 1.7.2.1 15-Jul-2007  ad Get pmax working.
 1.9.20.1 16-May-2008  yamt sync with head.
 1.9.18.1 18-May-2008  yamt sync with head.
 1.9.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.32.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.10.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.22.1 12-Jun-2011  rmind sync with head
 1.11.30.1 22-Sep-2015  skrll Sync with HEAD
 1.11.28.1 05-Jul-2015  snj Pull up following revision(s) (requested by maxv in ticket #856):
sys/arch/pmax/tc/dt.c: revision 1.12
Use-after-free.
ok christos@
Found by The Brainy Code Scanner.
 1.11.12.1 03-Dec-2017  jdolecek update from HEAD
 1.12.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.13.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.14.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.15.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.13 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.12 24-Apr-2021  thorpej branches: 1.12.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.11 10-Nov-2013  christos branches: 1.11.44;
fix unused variable warnings
 1.10 09-Jul-2011  matt branches: 1.10.2; 1.10.12; 1.10.16;
Cleanu <machine/*> includes
 1.9 04-Jun-2011  tsutsui - split device_t/softc
- make sure that *(dtdv_handler)() registered via dt_establish_handler()
takes softc, not device_t as other interrupt handlers

No crash during device attach on GXemul.
 1.8 28-Apr-2008  martin branches: 1.8.22; 1.8.28; 1.8.32;
Remove clause 3 and 4 from TNF licenses
 1.7 04-Mar-2007  christos branches: 1.7.40; 1.7.42; 1.7.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.6 11-Dec-2005  christos branches: 1.6.26;
merge ktrace-lwp.
 1.5 10-Jan-2005  mhitch branches: 1.5.10;
Fix Maxine keyboard and mouse ioctl routines to return EPASSTHROUGH for
unrecognized commands so they can be passed to other handlers.
 1.4 08-Jan-2005  mhitch Fix MAXINE keyboard multi-key press bug. Keyboard sends all currently
depressed keys in each message. Any keys in current message that are
also present in previous message are ignored. However, copying a byte
array into an integer array and comparing entry by entry doesn't have
the desired effect. Change the definition of the save buffer to match
the current message buffer data.
 1.3 23-Dec-2003  ad MAXINE keyboard and mouse now works, albeit with some minor issues.
 1.2 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.1 15-Mar-2002  ad branches: 1.1.2; 1.1.12;
file dtkbd.c was initially added on branch ad_pmax_wscons.
 1.1.12.5 17-Jan-2005  skrll Sync with HEAD.
 1.1.12.4 13-Jan-2005  skrll Adapt to branch
 1.1.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.12.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.4 15-Mar-2002  ad More sanity checks.
 1.1.2.3 15-Mar-2002  ad Bail out if dt_identify() fails.
 1.1.2.2 15-Mar-2002  ad Remove debugging crud.
 1.1.2.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.5.10.2 03-Sep-2007  yamt sync with head.
 1.5.10.1 21-Jun-2006  yamt sync with head.
 1.6.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.7.44.1 16-May-2008  yamt sync with head.
 1.7.42.1 18-May-2008  yamt sync with head.
 1.7.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.32.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.8.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.22.1 12-Jun-2011  rmind sync with head
 1.10.16.1 18-May-2014  rmind sync with head
 1.10.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.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.11.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.12.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.13 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.12 24-Apr-2021  thorpej branches: 1.12.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.11 09-Jul-2011  matt branches: 1.11.68;
Cleanu <machine/*> includes
 1.10 04-Jun-2011  tsutsui - split device_t/softc
- make sure that *(dtdv_handler)() registered via dt_establish_handler()
takes softc, not device_t as other interrupt handlers

No crash during device attach on GXemul.
 1.9 28-Apr-2008  martin branches: 1.9.22; 1.9.28; 1.9.32;
Remove clause 3 and 4 from TNF licenses
 1.8 04-Mar-2007  christos branches: 1.8.40; 1.8.42; 1.8.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.7 12-Nov-2006  plunky branches: 1.7.4;
Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.6 11-Dec-2005  christos branches: 1.6.20; 1.6.22;
merge ktrace-lwp.
 1.5 10-Jan-2005  mhitch branches: 1.5.10;
Fix Maxine keyboard and mouse ioctl routines to return EPASSTHROUGH for
unrecognized commands so they can be passed to other handlers.
 1.4 10-Jan-2005  mhitch Maxine mouse buttons were being mapped incorrectly (old dtop.c code mapped
them to serial mouse buttons, which were then mapped into events to pass
to the X server).
Also fix bug in mouse motion - putting 2 unsigned bytes into an integer
resulted in a 16-bit unsigned value, so negative mouse motion didn't work.
 1.3 23-Dec-2003  ad MAXINE keyboard and mouse now works, albeit with some minor issues.
 1.2 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.1 15-Mar-2002  ad branches: 1.1.2; 1.1.12;
file dtms.c was initially added on branch ad_pmax_wscons.
 1.1.12.5 17-Jan-2005  skrll Sync with HEAD.
 1.1.12.4 13-Jan-2005  skrll Adapt to branch
 1.1.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.12.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.3 15-Mar-2002  ad More sanity checks.
 1.1.2.2 15-Mar-2002  ad Bail out if dt_identify() fails.
 1.1.2.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.5.10.3 03-Sep-2007  yamt sync with head.
 1.5.10.2 30-Dec-2006  yamt sync with head.
 1.5.10.1 21-Jun-2006  yamt sync with head.
 1.6.22.1 10-Dec-2006  yamt sync with head.
 1.6.20.1 18-Nov-2006  ad Sync with head.
 1.7.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.8.44.1 16-May-2008  yamt sync with head.
 1.8.42.1 18-May-2008  yamt sync with head.
 1.8.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.32.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.9.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.9.22.1 12-Jun-2011  rmind sync with head
 1.11.68.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.12.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file dtop.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.10 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.1.2.9 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.1.2.8 26-Nov-1999  nisimura Redo the previous makeup.
 1.1.2.7 26-Nov-1999  nisimura Make more realistic this mockup; still no clockwork inside.
 1.1.2.6 19-Nov-1999  nisimura Replace with a more realistic mockup code; still not useful.
 1.1.2.5 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.1.2.4 03-Apr-1999  nisimura - Make this compilable. Needs to be rewritten.
 1.1.2.3 23-Oct-1998  nisimura - Fix typos.
 1.1.2.2 23-Oct-1998  nisimura - An inch progress of dtop.c towards NWSCONS. Still useless. As
ACCESS.bus (Digital called this in many ways) runs much faster than
4800bps serial interconnect, smart "packet disassembler" might be
required with the help of DMA circuit. Packet interpretation of LK501 ->
LK201 might be also a pain...
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.1 15-Mar-2002  ad branches: 1.1.2; 1.1.12;
file dtreg.h was initially added on branch ad_pmax_wscons.
 1.1.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.12.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.6 04-Jun-2011  tsutsui - split device_t/softc
- make sure that *(dtdv_handler)() registered via dt_establish_handler()
takes softc, not device_t as other interrupt handlers

No crash during device attach on GXemul.
 1.5 28-Apr-2008  martin branches: 1.5.22; 1.5.28; 1.5.32;
Remove clause 3 and 4 from TNF licenses
 1.4 11-Dec-2005  christos branches: 1.4.74; 1.4.76; 1.4.78;
merge ktrace-lwp.
 1.3 23-Dec-2003  ad MAXINE keyboard and mouse now works, albeit with some minor issues.
 1.2 13-Dec-2003  ad Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.1 15-Mar-2002  ad branches: 1.1.2; 1.1.12;
file dtvar.h was initially added on branch ad_pmax_wscons.
 1.1.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.12.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.4.78.1 16-May-2008  yamt sync with head.
 1.4.76.1 18-May-2008  yamt sync with head.
 1.4.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.32.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.5.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.5.22.1 12-Jun-2011  rmind sync with head
 1.16 13-Oct-1996  jonathan Remove pmax/tc/if_le.c. Superseded by sys/dev/tc MI TC/ioasic lance drivers.
 1.15 13-Oct-1996  christos backout previous kprintf change
 1.14 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.13 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.12 22-Apr-1996  christos Add a hardware dependent initialization function lehwinit()
 1.11 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.10 18-Mar-1996  jonathan Additional fixes to complete the NetBSD/1.1B config changes:

Add new device-attach struct cfattach le_tc_ca and struct cfdriver le_cd.
Change IOASIC cfdriver references from "ioasiccd" to "ioasic_cd".
Change "mainbuscd" to "mainbus_cd"
 1.9 31-Jan-1996  jonathan Resolve pmax and alpha IOCTL asic driver differences, pass 1:

Rename the ioctl asic register and slot macros from ASIC_<xxx> to
IOASIC_<xxx>, to be compatible with the machine-indpendent names in
sys/dev/tc/ioasicvar.h. The pmax code still uses
sys/arch/pmax/pmax/asic.h, as some of the registers and offsets
defined there are not yet defined in sys/dev/tc/ioasicvar.h.

Rename the ioctl asic base-address pointer from `asic_base' to `ioasic_base'.
 1.8 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.7 28-Dec-1995  jonathan Use machine-independent TurboChannel include files from dev/tc.
Add machine-dependent TC definitions in pmax/include/tc_machdep.h.
 1.6 28-Dec-1995  jonathan *** empty log message ***
 1.5 22-Dec-1995  jonathan Re-apply fix from before the NetBSD/1.1 version: actually write the pointer
to the LANCE's dma region into the IO ASIC after computing it.
 1.4 17-Dec-1995  jonathan Remove LENITR_UNIT and supporting code that allowed passing a unit
number, instead of a softc pointer, to leintr(). Pmaxes don't need it anymore.
 1.3 25-Nov-1995  cgd allow bus-specific lance drivers to use machine-independent buffer/descriptor
copy functions, and convert isa and pmax drivers to do so.
 1.2 17-Aug-1995  jonathan branches: 1.2.2;
Merge back fixes from the merged Decstation/Alpha driver.
Remove all references to #ifdef SPARSE, and use #ifdef alpha instead.
Only initialize ASIC dma on a machine with an ASIC.
 1.1 11-Aug-1995  jonathan Re-port the Alpha versino of NetBSD's machine-independent LANCE driver
back to the DECstation. Boots on 3MAX and 3MAXPLUS. The bug-fixes
applied to this driver since it forked off the Decstation code also
seem to fix long-standing DMA problems with the Decstation SCSI driver.
 1.2.2.1 13-Oct-1995  jonathan Commit a version of the pmax lance driver that's been cleaned up
to compile with -Werror to the NetBSD-1.1 tree.
 1.4 13-Oct-1996  jonathan Remove pmax/tc/if_le.c. Superseded by sys/dev/tc MI TC/ioasic lance drivers.
 1.3 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.2 17-Aug-1995  jonathan Merge back fixes from the merged Decstation/Alpha driver.
Remove all references to #ifdef SPARSE, and use #ifdef alpha instead.
Only initialize ASIC dma on a machine with an ASIC.
 1.1 11-Aug-1995  jonathan Re-port the Alpha versino of NetBSD's machine-independent LANCE driver
back to the DECstation. Boots on 3MAX and 3MAXPLUS. The bug-fixes
applied to this driver since it forked off the Decstation code also
seem to fix long-standing DMA problems with the Decstation SCSI driver.
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file ims332reg.h was initially added on branch nisimura-pmax-wscons.
 1.1.2.2 30-Oct-1998  nisimura - Migrate to MI TURBOchannel codes.
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.23 03-Sep-2020  simonb The TC device addresses are defined in KSEG1, but this confuses
bus_space(9) which expects bus addresses and not kernel virtual
addresses. Pull the addresses back to bus addresses with
MIPS_KSEG1_TO_PHYS().

XXX: Fix this properly one day (without storing KSEG1 addrs in
the TC device configuration).

Fixes problem with TURBOchannel pmaxes panicing during
autoconfiguartion.
 1.22 10-Nov-2013  christos fix unused variable warnings
 1.21 09-Jul-2011  matt branches: 1.21.2; 1.21.12; 1.21.16;
Cleanu <machine/*> includes
 1.20 04-Jun-2011  tsutsui Split device_t/softc. pmax is tested on GXemul, compile test only for alpha.
 1.19 16-Mar-2009  dsl branches: 1.19.4; 1.19.6; 1.19.10;
ANSIfy functions with function-pointer arguments
 1.18 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.17 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.16 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.15 02-Oct-2002  thorpej branches: 1.15.112; 1.15.120; 1.15.126;
Use CFATTACH_DECL().
 1.14 11-Jul-2000  nisimura branches: 1.14.4; 1.14.8;
- Use PMAD-BA name for device match logic. It's not a real TURBOchannel
device and the id string is not found in option ROM string, but
ULTRIX/OSF1 call it so anyway.
- Squash IOASIC DMA buffer allocation into device attach() sequence.
 1.13 04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.12 15-Mar-2000  nisimura branches: 1.12.2;
Eliminate unused sc_cookie field of struct ioasic_softc.
 1.11 29-Feb-2000  nisimura - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.10 03-Feb-2000  nisimura Merge IOASIC register definitions.
 1.9 03-Feb-2000  nisimura Not to use (cfdata->cf_unit > 0) conditional in device match() routine.
 1.8 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.7 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.6 10-Jan-2000  simonb Add trailing quote to RCS ID.
 1.5 09-Jan-2000  ad RCS ID police.
 1.4 08-Jan-2000  simonb Function prototype cleanup.
 1.3 06-Dec-1999  simonb branches: 1.3.2;
Fix typo in 3max+ scc1 device declaration - console output on a serial
console 3max+ works again.
 1.2 01-Dec-1999  nisimura Replace old asic.c with one imported from a development branch.
 1.1 15-Oct-1998  nisimura branches: 1.1.2; 1.1.4;
file ioasic.c was initially added on branch nisimura-pmax-wscons.
 1.1.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.1.2.17 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.1.2.16 06-Dec-1999  nisimura Sync w/ recent changes in main trunk.
 1.1.2.15 30-Nov-1999  nisimura Synchronize them w/ recent changes in main trunk and sweep bozos I made.
 1.1.2.14 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.1.2.13 26-Oct-1999  drochner remove ioasic_lance_ether_address(), it's in mi code now
 1.1.2.12 09-Sep-1999  nisimura Follow changes made in main trunk.
 1.1.2.11 13-Aug-1999  nisimura - Resolve code inconsistency.
 1.1.2.10 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.1.2.9 06-Apr-1999  nisimura - And more bus_space(9).
 1.1.2.8 05-Apr-1999  nisimura - Correct defined(DS_3MAXPLUS) -> defined(DEC_3MAXPLUS).
 1.1.2.7 31-Mar-1999  nisimura - Fix an error in ioasic_attach_devs() pointed by Matthias Drochner.
 1.1.2.6 30-Mar-1999  nisimura - Restore a local variable mistakenly omitted.
- sc_iswrite -> sc_ispullup (pull up from SCSI device).
 1.1.2.5 30-Mar-1999  nisimura - Track changes in main trunk and sweap codes.
- Make codes a bit descriptive that registers are aligned in 32bit boundary.
 1.1.2.4 29-Mar-1999  drochner use common dev/tc/ioasic code
 1.1.2.3 18-Mar-1999  nisimura - Arrange how IOASIC device interrupts are served.
- Fix a bozo I made in 3MIN TC processing.
- Change 3MAX interrupt processing like as ULTRIX does.
- Clean up IOASIC a bit.
 1.1.2.2 05-Mar-1999  nisimura - A bit improve make these bus_dma(9) friendy.
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.3.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.14.8.1 18-Oct-2002  nathanw Catch up to -current.
 1.14.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.15.126.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.15.120.1 28-Apr-2009  skrll Sync with HEAD.
 1.15.112.1 04-May-2009  yamt sync with head.
 1.19.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.19.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.19.4.1 12-Jun-2011  rmind sync with head
 1.21.16.1 18-May-2014  rmind sync with head
 1.21.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.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.1 15-Oct-1998  nisimura branches: 1.1.2;
file ioasicreg.h was initially added on branch nisimura-pmax-wscons.
 1.1.2.3 03-Feb-2000  nisimura Catch up to recent changes in main trunk.
 1.1.2.2 05-Sep-1999  nisimura - Reduce clatters and cleanup.
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.4 04-Mar-1999  nisimura - Nuke old leftover. This has no useful information and not used by any
other files.
 1.3 12-Jan-1998  thorpej branches: 1.3.4;
Update for changes to config.
 1.2 05-Jan-1998  perry RCSID Police.
 1.1 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.3.4.5 03-Apr-1999  nisimura - This file is no longer used.
 1.3.4.4 18-Mar-1999  nisimura - Arrange how IOASIC device interrupts are served.
- Fix a bozo I made in 3MIN TC processing.
- Change 3MAX interrupt processing like as ULTRIX does.
- Clean up IOASIC a bit.
 1.3.4.3 05-Mar-1999  nisimura - A bit improve make these bus_dma(9) friendy.
 1.3.4.2 15-Oct-1998  nisimura - Mistakenly removed a necessary file.
 1.3.4.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.24 09-Jun-2015  matt #include either <sys/cpu.h> or <mips/cpuregs.h> as needed
 1.23 04-Jun-2011  tsutsui branches: 1.23.12; 1.23.30;
Split device_t/softc. Tested on GXemul.
 1.22 14-Mar-2009  dsl branches: 1.22.4; 1.22.6; 1.22.10;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.21 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.20 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.19 03-Jan-2008  joerg branches: 1.19.10; 1.19.18; 1.19.24;
Timecounter and generic todr support for pmax. From Garret D'Amore.
 1.18 02-Oct-2002  thorpej branches: 1.18.22; 1.18.84; 1.18.90; 1.18.98;
Use CFATTACH_DECL().
 1.17 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.16 26-Sep-2002  thorpej No need to check that parent's cfdriver is ioasic_cd.
 1.15 08-Jan-2002  chs include sys/systm.h for strcmp() prototype.
 1.14 10-Jan-2000  simonb branches: 1.14.8; 1.14.12;
Remove unneeded include files (up to 16 in two files!).
 1.13 09-Jan-2000  ad RCS ID police.
 1.12 09-Jan-2000  simonb Use the badaddr() prototype in mips/include/cpu.h by including
<machine/cpu.h> in mips/include/mips_param.h. Remove duplicate
badaddr() prototypes from some pmax header files.
 1.11 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.10 08-Jan-2000  simonb Function prototype cleanup.
 1.9 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.8 24-Apr-1999  simonb branches: 1.8.2; 1.8.8;
Nuke register and remove trailling white space.
 1.7 19-Apr-1998  jonathan branches: 1.7.4; 1.7.12;
oops, diffs to use dev/dec/mcclock_pad32 were in a different tree. Fix.
 1.6 19-Apr-1998  jonathan Copy alpha/tc/mcclock_ioasic.c (duplicated in pmax/tc/mcclock_ioasic.c)
into sys/dev/dec and split into a clockfns layer and a "middle" layer
for other DEC systems which use mcclocks with each onchip byte
register padded out to a 32-bit word.

Clone alpha/alpha/mcclock (also duplicated in pmax port) into
sys/dev/dec, and ifdef for default clockrates on pmax and alpha.

Use new machinery on pmax for ibus,ioasic attached mcclocks.
 1.5 01-Feb-1998  jonathan Use correct name ("ioasic") when checking parent bus.
 1.4 06-Aug-1997  jonathan branches: 1.4.4;
Garbage-collect Mach_clock_addr outside of machdep.c.
Use as mcclock_addr inside machdep.c, to disable clock interrupts
until the clock is autoconfigured.
 1.3 22-Jul-1997  jonathan branches: 1.3.2;
Move sys/dev/tc/mcclockvar.h -> sys/dev/dec/mcclockvar.h.
Update pmax clock code.
 1.2 22-Jul-1997  jonathan Include /sys/dev/dec/clockvar.h. Garbage-collect tc/clockvar.h.
 1.1 22-Jun-1997  jonathan Import mcclock from NetBSD/Alpha, mostly replacing the Sprite clock code.
interface. From Toru Nishimura <nisimura@itc.aist-nara.ac.jp>.

Partly merged back with Alpha code by Jonathan Stone. Needs more merging.
 1.3.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.4.2 08-May-1998  mycroft Revert pullup of 1.5, per discussion with mhitch.
 1.4.4.1 07-Feb-1998  mellon Pull up 1.5 (jonathan)
 1.7.12.1 21-Jun-1999  thorpej Sync w/ -current.
 1.7.4.1 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.8.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.14.12.3 18-Oct-2002  nathanw Catch up to -current.
 1.14.12.2 28-Feb-2002  nathanw Catch up to -current.
 1.14.12.1 11-Jan-2002  nathanw More catchup.
 1.14.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.14.8.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.18.98.1 08-Jan-2008  bouyer Sync with HEAD
 1.18.90.1 18-Feb-2008  mjf Sync with HEAD.
 1.18.84.1 09-Jan-2008  matt sync with HEAD
 1.18.22.1 21-Jan-2008  yamt sync with head
 1.19.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.19.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.19.10.1 04-May-2009  yamt sync with head.
 1.22.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.22.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.22.4.1 12-Jun-2011  rmind sync with head
 1.23.30.1 22-Sep-2015  skrll Sync with HEAD
 1.23.12.1 03-Dec-2017  jdolecek update from HEAD
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file mfb.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.2 30-Oct-1998  nisimura - Migrate to MI TURBOchannel codes.
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.95 29-Jul-2006  ad Remove RASTERCONSOLE support from the pmax port.
 1.94 23-Jul-2006  ad Use the LWP cached credentials where sane.
 1.93 14-May-2006  elad integrate kauth.
 1.92 29-Mar-2006  thorpej Use device_cfdata().
 1.91 28-Mar-2006  thorpej Use device_unit().
 1.90 08-Mar-2006  lukem branches: 1.90.2;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.89 14-Dec-2005  oster branches: 1.89.4; 1.89.6; 1.89.8; 1.89.10;
more proc->lwp changes. (untested, but at least the pmax kernel builds)
 1.88 11-Dec-2005  christos merge ktrace-lwp.
 1.87 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.

Also change this to use the proc argument instead of curproc.
 1.86 01-Jun-2005  drochner branches: 1.86.2;
quell cast-qual and shadow warnings
 1.85 26-Aug-2004  drochner kick out the ioasic offset check which happens in submatch() now
 1.84 25-Apr-2004  matt Constify the speedtab arrays
 1.83 28-Sep-2003  chs avoid hanging during autoconf if no mouse is attached. fixes PR 11111.
based on code from Christian Groessler.
 1.82 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.81 29-Jun-2003  fvdl branches: 1.81.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.80 29-Jun-2003  simonb Fix 'struct lwp *' lossage.
 1.79 21-Mar-2003  drochner make these compile after struct consdev change
 1.78 23-Feb-2003  simonb Fix a tyop in a comment.
 1.77 06-Jan-2003  wiz through, not throught.
 1.76 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.75 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.74 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.73 26-Sep-2002  thorpej No need to check that parent's cfdriver is ioasic_cd.
 1.72 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.71 17-Mar-2002  atatat branches: 1.71.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.70 07-Jul-2001  simonb branches: 1.70.2; 1.70.4; 1.70.8;
b{cmp,copy,zero} -> mem{cmp,cpy,set}
Also remove some unnecessary argument casts.
 1.69 02-May-2001  scw Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
 1.68 31-Mar-2001  enami Remove unnecessary test of tp->t_linesw against NULL; they are results
of confusion while correcting compilation error after t_line is
replaced with t_linesw.
 1.67 03-Nov-2000  simonb branches: 1.67.2;
Fix up line discipline change fallout.
 1.66 02-Nov-2000  eeh Adapt to new line discipline scheme.
 1.65 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.64 09-Feb-2000  nisimura - Add missing "opt_ddb.h" to dc.c and dtop.c (oh, boy)
- Nuke irrelevant "dcvar.h" and "tc.h" inclusion from dc.c
- Put '#if NRASTERCONSOLE > 0' around scc_lk201_cnattach().
 1.63 03-Feb-2000  nisimura - Massive change of console initialization. Have each model its own
consinit().
- Fix fbconnect() and relatives; 'struct fbinfo' is initialized only once,
making sure no extraneous console resolution message is emitted.
 1.62 18-Jan-2000  simonb Only prototype and include code for scc_kbd_init() and scc_mouse_init()
if NRASTERCONSOLE > 0. Fixes problem reported on port-pmax by Anders
Andersson.
 1.61 10-Jan-2000  simonb Remove unneeded include files (up to 16 in two files!).
 1.60 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.59 08-Jan-2000  simonb Function prototype cleanup.
 1.58 07-Jan-2000  simonb Start of the "The Big Cleanup" - remove "ifdef alpha". This has
diverged enough from the alpha scc.c that keeping any pretence of
portability is not worth it.
 1.57 04-Jan-2000  simonb Ick - include pmioctl.h to get the pmEventQueue typedef needed for
qvssvar.h (needed for the mouseInit() prototype). This _will_ be
cleaned up soon!
 1.56 30-Dec-1999  simonb Include qvssvar.h to get mouseInput() prototype.
 1.55 23-Dec-1999  ad Rectify the jumbled naming scheme of routines in lk201.c. Function names
are now lower case and prefixed by 'lk_'. XXX lk_mouseinit() is bogus. It
belongs somewhere else.
 1.54 08-Dec-1999  simonb Don't use our own defines for SCCDEV or RCONSDEV - pull in
<pmax/pmax/cons.h> for these values.
 1.53 29-Nov-1999  ad - When kbdMapChar() was modified to support returning multi-character
mappings, it broke Ctrl-Space; fix that.
- Clean up lk201.c a little.
 1.52 17-Sep-1999  thorpej branches: 1.52.2; 1.52.8;
Centralize the declaration and clearing of `cold'.
 1.51 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.50 20-Apr-1999  mrg make this compile again with no rcons.
 1.49 12-Apr-1999  pk Quote "AS IS" as in the majority of Carnegy Mellon notices.
 1.48 06-Apr-1999  pk Fix a pasto in copyright text which has been procreating like rabbits..
 1.47 22-Mar-1999  ad branches: 1.47.2;
Added support for cursor keys, function keys and friends. kbdMapChar now
returns 'char *' to do this. Codes returned for the various keys match
what 'rcons' termcap entry expects.
 1.46 29-Jan-1999  kleink Remove an incorrect (but harmless) comment.
 1.45 28-Jan-1999  jonathan Jason Thorpe's changes from PR#6848. Makes 115200 bps work on some systems.
Reverse sense of #ifdef to disable 76.8k and 115.2k until we can verify
it works on all 8530 chips (similar changes didnt work on a /240 in 1996).
 1.44 15-Nov-1998  jonathan * make scc_tty_init() callable when very cold: call scc_coldparam() directly.
Use scc_tty_init() in scc_consinit(). Declare scc_consinit() in sccvar.h.

* Remove last vestige of special-case console handling in sccparam() code.

* Call scc_consinit() from findcons scc_serial() console-setup.
Dont PROM for scc serial console at all.
 1.43 29-Oct-1998  jonathan Use console_debugger() hook to enter DDB.
 1.42 07-Sep-1998  mhitch branches: 1.42.2;
scc_softCAR is a bit array, so set it accordingly for a serial console
port (instead of using the scc line number).
 1.41 04-Jul-1998  jonathan defopt DDB.
 1.40 30-Mar-1998  jonathan * Mouse reset blocks waiting for response for mouse.
Only initialize the mouse if we are using rcons as the console device.
 1.39 24-Mar-1998  jonathan Rewrite pmax console-probing code from scratch
as pmax/dev/findcons.c:
* Follow the same logic: look for the device the PROM is using.
* If it's a framebuffer and we don't have a driver for it, try other
* framebuffers in PROM search order.
* If no match found, warn user and fall over to serial console.
* if no serial console found, go back to PROM.

Rework tc/scc.c attach routine to give cleaner initialization semantics.
Prune out old 'braindamage' code.
 1.38 24-Mar-1998  jonathan Commit snapshot of pmax console rework as basepoint for 1.3.2 pullup:
* Do rcons output properly, using cn_tab->cn_dev which points
at rcons cdevsw entrypoints.

* The pmadx console code was using keyboard (serial) device
(major,minor) for raster consoles with special code in the keyboard
drivers to catch output intended for consoles, pull it off the device
queue, and print them via cnputc().
Ifdef out RCONS_BRAINDAMAGE.

* Other minor cleanup to pmax scc driver.
 1.37 22-Mar-1998  jonathan Clone lk20.h (keycode definitions) to /sys/dev/dec.
Update source pmax files accordingly.
cvs remove old pmax/dev/lk201.h.
 1.36 22-Mar-1998  jonathan Elimiate whitespace KNF botches due to emacs/X cut-and-paste.
 1.35 22-Mar-1998  jonathan oops, forgot more whitespace changs and alpha_mb() -> tc_mb().
 1.34 22-Mar-1998  jonathan Whitespace, cosmetic changes against alpha/tc/scc.c 1.40.
 1.33 22-Mar-1998  jonathan More tty dialin/dialout changes (t_wopen).
NB: dtop is a keyboard/mouse bus and doesn't support dialout.
 1.32 05-Feb-1998  jonathan Add local `extern' declaration of ioasic_cd, as in alpha/tc/scc.c.
Missed here after the removal of ioasic_cd decl from ioasicvar.h.
 1.31 12-Jan-1998  thorpej Update for changes to config.
 1.30 14-Nov-1997  jonathan Back out read-side DELAY() in previous revision added on advice of
tech-kern. Reported by Sean Davidson to cause erroneous doubling of
keyboard input on a 5000/50 under load.

Increasing the DELAY() from 2 to 30 doesn't help. Remove it for the
1.3 release. May cause problems with low-speed serial input, but
console keyboards work properly.
 1.29 08-Nov-1997  jonathan Workaround for port-pmax/4438 (pmax kernel glass-tty console code is broken)
until a proper fix is available:
Perpetuate the 4.4bsd design even further. Change keyboard-driver
open routines to check for an active raster console. If active, set the
keyboard struct tty's t_winsize from the rcons t_winsize on first open.
See pr 4438 for remaining problems and discussion of a complete fix.
 1.28 21-Jul-1997  jonathan branches: 1.28.6;
Kill __BROKEN_INDIRECT_CONFIG on pmax.
Based on a patch from Chris G. Demetriou, December 1996.
 1.27 17-Jul-1997  jtk use locator defines in "locators.h" to index cf_loc[]
 1.26 07-Jul-1997  jonathan DDB for mips.
Add DDB interface to /sys/arch/mips/mips..
Rework heuristic stack traceback to work with DDB.
Add hooks to print exception log from DDB.
Add hooks from pmax console drivers: call Debugger()
after break from serial console, or 'DO' key from LK-xxx.
 1.25 22-Jun-1997  jonathan * Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).
 1.24 16-Jun-1997  jonathan Garbage-collect <machine/locore.h>
 1.23 15-Jun-1997  mhitch DECstation MIPS3 support: wbflush() is cpu-dependent, need declaration from
machine/locore.h.
 1.22 25-May-1997  jonathan lint: add prototype for pmax serial-console inithook.
 1.21 15-May-1997  mellon Don't do rcons-specific things if no rcons pseudo-device was declared. Clean up probe-time printfs.
 1.20 15-May-1997  jonathan Merge in changes from Alpha scc driver with RCS log message:

> revision 1.33
> date: 1997/05/15 02:15:55; author: thorpej; state: Exp; lines: +8 -4
> - In sccmatch(), check any user-specified offset, allowing scc unit numbers
> to be nailed down. From Ken Hornstein <kenh@cmf.nrl.navy.mil>, PR #3626,
> slightly modified to allow wildcarded offsets.
> - Blow away the cf->cf_unit check in sccmatch(); it's bogus.

Also gc usused references to NSCC and #include "scc.h"
 1.19 26-Apr-1997  jonathan Stop ignoring DCD transitions on ioasic SCC serial lines.
From entropy@zippy.bernstein.com>.
 1.18 16-Oct-1996  jonathan Cleanups, and convergence with the Alpha driver:
* kill scc_tty[] and needs-count.
* Add usable-when-cold version of sccparam().
* Add pre-autconf() console initialization entrypoint.
* remove lint for gcc -Wall
* wbflush() -> tc_mb()
all but the last of which have been fed through cgd and committed to the
Alpha scc driver.
 1.17 13-Oct-1996  christos backout previous kprintf change
 1.16 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.15 07-Sep-1996  mhitch The MAXINE serial console is on scc0 (the only SCC on the MAXINE) instead
of scc1. Fix the check of which scc to initialize the console serial line
so that the MAXINE serial console will work.
 1.14 02-Sep-1996  mycroft tty stop functions really should return void, not int, and certainly not both.
 1.13 16-Jun-1996  mhitch Do tty_attach() for serial lines.
 1.12 29-May-1996  mhitch Fix autoconfiguration stuff to more closely match the alpha - primarily
the IOASIC attached devices. The DS3100 will now configure properly.
Fix the DS5000/25 IOASIC table entry for the RTC so the RTC interrupts
get enabled.
Fix up a moved include file.
 1.11 17-Mar-1996  jonathan branches: 1.11.4;
Additional fixes to complete the NetBSD/1.1B config changes:

change IOASIC cfdriver references from "ioasiccd" to "ioasic_cd"
 1.10 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.9 08-Feb-1996  jonathan Add serial-console support that works with `new-style' (config.new) autconf
code. Substantially the same code tested on a 5k/240. Should work on a
5k/1xx. Not tested on a MAXINE, where the single unit may break the
PROM-channel-number to driver-channel-number mapping.
 1.8 02-Feb-1996  mycroft Fix #includes.
 1.7 31-Jan-1996  jonathan Resolve pmax and alpha IOCTL asic driver differences, pass 1:

Rename the ioctl asic register and slot macros from ASIC_<xxx> to
IOASIC_<xxx>, to be compatible with the machine-indpendent names in
sys/dev/tc/ioasicvar.h. The pmax code still uses
sys/arch/pmax/pmax/asic.h, as some of the registers and offsets
defined there are not yet defined in sys/dev/tc/ioasicvar.h.

Rename the ioctl asic base-address pointer from `asic_base' to `ioasic_base'.
 1.6 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.5 29-Sep-1995  jonathan Add speed entries for 7200 and multiples.
Add as-yet-unused speed entries for a 1x SCC clock, up to 200 Kbits.

Remove old top-bit-means-delay code, since nothing seems to need it,
and it apparently partially broke lk-201 initialization anyway.
 1.4 25-Sep-1995  jonathan Fix SCC bug that broke getty on pmax SCC lines: if RAW and LITOUT were
both off, haracters with their top bit clear were interpreted as a delay.
This (strange) behaviour is still available if SCC_PARITY_MEANS_DELAY
is defined.
 1.3 25-Sep-1995  jonathan Force a delay after calling SCC_WRITE_DATA() to give the chip
registers time to settle. DELAY(2) is reportedly enough. Without the
delay, output characters are occasionally doubled.
 1.2 11-Sep-1995  jonathan Change pmax rcons and low-level serial drivers to support the
old-style pmax polled input for cn_getc(). Needed because the
input side of rcons is not initialized in time for GENERIC kernels
to use it to read a root/swap devicename from /dev/console.
 1.1 22-Aug-1995  jonathan Move the pmax scc driver from sys/arch/pmax/dev to sys/arch/pmax/tc,
as it's a driver for a device under a TC IOASIC. The Alpha port also
has its scc driver in tc/scc.c, and the pmax driver scc is nearly the same
as the Alpha.
 1.11.4.3 17-Sep-1996  thorpej Pull up changes between revision 1.14 and 1.15 by request from Jonathan
Stone.
 1.11.4.2 16-Jun-1996  mhitch Pull up from trunk: Do tty_attach() on serial lines.
 1.11.4.1 30-May-1996  mhitch Pulled autoconfig fixes up from the trunk
 1.28.6.6 01-Feb-1999  cgd pull up rev 1.45 from trunk (jonathan)
 1.28.6.5 24-Nov-1998  cgd patch to pull up the remainder of 1.39, 1.40, 1.42, 1.44. (jonathan)
 1.28.6.4 24-Nov-1998  cgd pull up a patch consisting of changes which give the effect of revision
1.38 and includes revisions 1.34-1.35, 1.37, 1.41. (jonathan)
 1.28.6.3 30-Oct-1998  cgd patch to allow kernels to compile even if no frame buffer or rconsole
devices are included. (code has changed substantially, and is already
fixed in -current.) (mrg)
 1.28.6.2 15-Nov-1997  mellon Pull rev 1.30 up from trunk (jonathan)
 1.28.6.1 09-Nov-1997  mellon Pull rev 1.29 up from trunk (jonathan)
 1.42.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.47.2.3 26-Sep-2000  he Pull up revision 1.50 (requested by simonb):
Make this compile again with no rcons.
 1.47.2.2 12-Apr-1999  pk branches: 1.47.2.2.2;
Pullup copyright text corrections.
 1.47.2.1 07-Apr-1999  pk Pull up from trunk: copyright text warts.
 1.47.2.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.52.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.52.2.3 21-Apr-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.67.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.67.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.70.8.10 07-Jan-2003  thorpej Sync with HEAD.
 1.70.8.9 11-Nov-2002  nathanw Catch up to -current
 1.70.8.8 18-Oct-2002  nathanw Catch up to -current.
 1.70.8.7 17-Sep-2002  nathanw Catch up to -current.
 1.70.8.6 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.70.8.5 03-Jul-2002  nathanw Whitespace.
 1.70.8.4 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.70.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.70.8.2 15-Dec-2001  gmcgarry lwp'ify
 1.70.8.1 07-Jul-2001  gmcgarry file scc.c was added on branch nathanw_sa on 2001-12-15 07:11:00 +0000
 1.70.4.2 13-Oct-2001  fvdl Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
 1.70.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.70.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.70.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.71.4.1 19-May-2002  gehenna Add device switch.
Replace the access to devsw table and the hard-coded majors with devsw API.
 1.81.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.81.2.5 13-Jan-2005  skrll Adapt to branch
 1.81.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.81.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.81.2.2 03-Sep-2004  skrll Sync with HEAD
 1.81.2.1 03-Aug-2004  skrll Sync with HEAD
 1.86.2.2 30-Dec-2006  yamt sync with head.
 1.86.2.1 21-Jun-2006  yamt sync with head.
 1.89.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.89.10.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.89.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.89.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.89.8.4 11-Aug-2006  yamt sync with head
 1.89.8.3 24-May-2006  yamt sync with head.
 1.89.8.2 01-Apr-2006  yamt sync with head.
 1.89.8.1 13-Mar-2006  yamt sync with head.
 1.89.6.2 01-Jun-2006  kardel Sync with head.
 1.89.6.1 22-Apr-2006  simonb Sync with head.
 1.89.4.1 09-Sep-2006  rpaulo sync with head
 1.90.2.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.90.2.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.8 29-Jul-2006  ad Remove RASTERCONSOLE support from the pmax port.
 1.7 03-Feb-2000  nisimura branches: 1.7.44; 1.7.58; 1.7.62;
- Massive change of console initialization. Have each model its own
consinit().
- Fix fbconnect() and relatives; 'struct fbinfo' is initialized only once,
making sure no extraneous console resolution message is emitted.
 1.6 09-Jan-2000  ad - Protect against multiple includes.
- Spacing.
 1.5 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.4 08-Jan-2000  simonb Function prototype cleanup.
 1.3 15-Nov-1998  jonathan branches: 1.3.10;
* make scc_tty_init() callable when very cold: call scc_coldparam() directly.
Use scc_tty_init() in scc_consinit(). Declare scc_consinit() in sccvar.h.

* Remove last vestige of special-case console handling in sccparam() code.

* Call scc_consinit() from findcons scc_serial() console-setup.
Dont PROM for scc serial console at all.
 1.2 19-May-1996  jonathan branches: 1.2.16; 1.2.20;
Add port number encodings.
 1.1 04-Aug-1995  jonathan Add header files with prototyped declarations of the serial-chip hooks
used by old-style pmax console configuration.
 1.2.20.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.2.16.1 24-Nov-1998  cgd pull up rev 1.3 from trunk (jonathan)
 1.3.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.62.1 11-Aug-2006  yamt sync with head
 1.7.58.1 09-Sep-2006  rpaulo sync with head
 1.7.44.1 30-Dec-2006  yamt sync with head.
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file sfb.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.2 30-Oct-1998  nisimura - Migrate to MI TURBOchannel codes.
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.15 30-Mar-1998  jonathan Remove ancient non-MI pmax/tc/tc.c code.
 1.14 22-Jun-1997  jonathan * Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).
 1.13 16-Jun-1997  jonathan Remove the machConst.h (wrapper for Sprite-derived source), and all
#includes <machine/machConst.h> uses.
Other header files now include <mips/cpuregs.h> where necessary.
 1.12 13-Oct-1996  christos backout previous kprintf change
 1.11 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.10 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.9 02-Feb-1996  mycroft Fix #includes.
 1.8 29-Jan-1996  jonathan Re-write Decstation turbochannel autoconfiguration code to use the machine-
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.

* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.

Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
 1.7 03-Jan-1996  jonathan arch/pmax/tc -> dev/tc, pass 1:
Eliminate pmax/tc/tc.h. Use dev/tc headers for pmax port. Change pmax TC
autoconfig tables to use structs (mostly) compatible with dev/tc/tcvar.h.
Move TC console search to tc.c.
 1.6 28-Dec-1995  jonathan Add untested, partial support for Decsystem 5100 (mipsfair).
 1.5 09-Oct-1995  jonathan Fix bugs in the turbochannel config table for MAXINE (personal decstation).
 1.4 25-Sep-1995  jonathan Update pmax kernel to compile with -Werror:
Update TURBOChannel and ioasic interrupt-establish routines to pass on their
device argument as a "void *", since that's how all the pmax interrupt handlers
are declared.
 1.3 12-Sep-1995  jonathan Change the signature of interrupt-handlers to take a void *
(a pointer to the softc) and return an int (indicating spurious
interrupts or other conditions.)
 1.2 10-Aug-1995  jonathan Remove extraneous debugging printf()s when running on processors
this code has been tested on.
 1.1 07-Aug-1995  jonathan New-style config (config.new) autoconfiguration code for Decstation
turhsturbochannel machines. Lifted wholesale from cgd's Alpha
turbochannel code, with changes that reflect the slightly different
bus topology and `slot' numbering on Decstations.
 1.3 03-Jan-1996  jonathan Remove pmax/tc/tc.h; use dev/tc/tcvar.h instead.
 1.2 28-Dec-1995  jonathan Use machine-independent TurboChannel include files from dev/tc.
Add machine-dependent TC definitions in pmax/include/tc_machdep.h.
 1.1 07-Aug-1995  jonathan New-style config (config.new) autoconfiguration code for Decstation
turhsturbochannel machines. Lifted wholesale from cgd's Alpha
turbochannel code, with changes that reflect the slightly different
bus topology and `slot' numbering on Decstations.
 1.7 04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.6 29-Feb-2000  nisimura branches: 1.6.2;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.5 09-Jan-2000  ad RCS ID police.
 1.4 01-Dec-1999  nisimura Arrange comment descriptions for internals of TC DECstations.
 1.3 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.2 12-Mar-1999  nisimura branches: 1.2.8; 1.2.14;
- Nuke old leftover bogocities, round one; externs for non-existent
functions, less-intuitive #define's in inappropriate header files.
 1.1 19-Apr-1998  jonathan branches: 1.1.4;
Rework pmax turbochannel config, as suggested by Jason Thorpe.
Also make TC framebuffer-console search table-driven.

Does not yet include "tcasic" layer; there's no such hardware on DECstations
and nothing for a tcasic layer to do.
 1.1.4.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.2.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.6 04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.5 29-Feb-2000  nisimura branches: 1.5.2;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.4 01-Dec-1999  nisimura Arrange comment descriptions for internals of TC DECstations.
 1.3 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.2 24-Apr-1999  simonb branches: 1.2.2; 1.2.8;
Nuke register and remove trailling white space.
 1.1 19-Apr-1998  jonathan branches: 1.1.4; 1.1.12;
Rework pmax turbochannel config, as suggested by Jason Thorpe.
Also make TC framebuffer-console search table-driven.

Does not yet include "tcasic" layer; there's no such hardware on DECstations
and nothing for a tcasic layer to do.
 1.1.12.1 21-Jun-1999  thorpej Sync w/ -current.
 1.1.4.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.2.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.6 04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.5 29-Feb-2000  nisimura branches: 1.5.2;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.4 01-Dec-1999  nisimura Fix wrong figures in comments.
 1.3 01-Dec-1999  nisimura Arrange comment descriptions for internals of TC DECstations.
 1.2 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.1 19-Apr-1998  jonathan branches: 1.1.4; 1.1.16; 1.1.22;
Rework pmax turbochannel config, as suggested by Jason Thorpe.
Also make TC framebuffer-console search table-driven.

Does not yet include "tcasic" layer; there's no such hardware on DECstations
and nothing for a tcasic layer to do.
 1.1.22.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.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.1.4.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.5.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file tc_machdep.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.2 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 02-Jan-2005  mhitch Fix long-standing error in interrupt index for Maxine built-in graphics
card. It was using the same index as the Ethernet interface, but didn't
cause any problems until the new xcfb.c driver installed an interrupt
handler. Ethernet interrupts went to the xcfb.c interrupt handler and
hung machine.
 1.6 04-Jun-2000  cgd branches: 1.6.28;
Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.5 29-Feb-2000  nisimura branches: 1.5.2;
- Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.4 01-Dec-1999  nisimura Fix wrong figures in comments.
 1.3 01-Dec-1999  nisimura Arrange comment descriptions for internals of TC DECstations.
 1.2 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.1 19-Apr-1998  jonathan branches: 1.1.4; 1.1.16; 1.1.22;
Rework pmax turbochannel config, as suggested by Jason Thorpe.
Also make TC framebuffer-console search table-driven.

Does not yet include "tcasic" layer; there's no such hardware on DECstations
and nothing for a tcasic layer to do.
 1.1.22.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.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.1.4.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.5.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.6.28.1 17-Jan-2005  skrll Sync with HEAD.
 1.27 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.26 02-Aug-1999  mrg branches: 1.26.2; 1.26.8;
if there are no FB devices, tc_consprobeslot() fails always.
 1.25 25-Jul-1999  ad Change the way fb devices are configured and attached:
- 'struct fbsoftc' created, which points to a 'struct fbinfo'
- 'struct fbinfo' for each device is allocated with fballoc()

This means:
- Console device doesn't get different 'struct fbinfo' at attach
- Console device doesn't get initialized twice
- Color rcons now works
- The current Xserver MUST BE REBUILT.
 1.24 24-Jun-1999  ad Remove a few entries for nonexistant TC graphics boards.
 1.23 24-Apr-1999  simonb Nuke register and remove trailling white space.
 1.22 13-Apr-1999  ad Added console initalization glue to allow `px' device to function as the
console.
 1.21 22-May-1998  thorpej branches: 1.21.4; 1.21.12;
Provide bus_space and bus_dma data structures to the TurboChannel bus.
 1.20 20-Apr-1998  jonathan * Fix typo in ROM name of mfb (PMAG-AA)
* Use TC_ROM_LLEN instead of constant, add space for sentinel.
* Don't print fb dimensions at console-probe time.
 1.19 19-Apr-1998  jonathan Rework pmax turbochannel config, as suggested by Jason Thorpe.
Also make TC framebuffer-console search table-driven.

Does not yet include "tcasic" layer; there's no such hardware on DECstations
and nothing for a tcasic layer to do.
 1.18 30-Mar-1998  mrg <pmax/pmax/trap.h> has been obsoleted...
 1.17 25-Mar-1998  jonathan * Use new defopt model-specific options and opt files.
Replace all DS5000_* and DS3100 ifdefs with ifdefs on DEC_ options.
* Use MI declarations, not pmax-specific, in model-specific init
that uses baseboard (ioasic) registers.
* Further cleanup of machdep.c. Clock-tick still needs more thought.
* Use 'ibus' names for 3100 baseboard devices in MI code.
 1.16 25-Mar-1998  jonathan Split sys/arch/pmaxpmax/{machdep.c,trap.c} as suggested by Jason Thorpe:
* add "Platform" support inpmax/pmax/sysconf.c and pmax/include/sysconf.h
(based on Alpha cpuconf.[ch], with a namechange to avoid clashes with
support for models of MIPS cpus. They differ more than Alphas).

* For each supported model of DECstation, create a separate file
with the support for that model. Use model codenames, since
support is really baseboard-specific and CPU daugherboards can change.
Move code from machdep.c and pmax_trap.c,
Add sysconf (nee "cpuconf") support.

* Rename model-specific functions to match sysconf names.

* Clean up autoconf.c. Use platform callbacks.

* Retire pmax_trap.c.

Leaves I/O bus configuration and console configuration untouched.
 1.15 08-Nov-1997  jonathan Delete ancient warning printf() from when this code hadn't been
tested on 3MIN or MAXINE motherboards. Add __KERNEL_RSID while we're here.
 1.14 24-Sep-1997  mhitch branches: 1.14.2;
Add an entry for the bus_space_tag in the TC attach argument tables. Fixes
PR #4100.
 1.13 22-Jun-1997  jonathan branches: 1.13.4;
* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).
 1.12 16-Jun-1997  jonathan Remove the machConst.h (wrapper for Sprite-derived source), and all
#includes <machine/machConst.h> uses.
Other header files now include <mips/cpuregs.h> where necessary.
 1.11 15-Jun-1997  mhitch Use TC_SPEED* for turbochannel speed values (keeps me from being confused
more than I am).
 1.10 24-May-1997  jonathan Lint: include prototypes for TurboChannel framebuffer console-init functions.
include prototype for printf() and panic() and delint calls.
 1.9 13-Oct-1996  christos backout previous kprintf change
 1.8 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.7 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.6 27-Aug-1996  jonathan * Add initialization of colourmap array when using mfb as a console.
* Add interrupt handler for 3MIN, where we cannot disable TC slot interrupts.
* Change mfbinit() signature to match other (pmax) TC framebuffer init
routines.
* TODO after 1.2: add {cfb,mbf,sfb}var.h. Declare init functions there.
 1.5 21-Aug-1996  jonathan Fix sfbinit() call to pass four arguments, not three, matching the
signature in sfb.c, which was changed to support multiple sfb devices.
 1.4 17-Jun-1996  jonathan Fix typo, colon instead of semicolon when DS_5000_25 is not defined.
 1.3 15-Jun-1996  jonathan Fix for PR #1828 and partial fix for PR #2548:
* Eliminate the #ifdef DS5000 and kernel config option DS5000 altogether.
option DS5000 was a hangover from 4.4bsd/pmax; it's never been clear
if it means "support for DS5000/200" or "support for any TC machine".
This implictly fixes pr 1828.

* Use the "tc.h" and NTC generated by config for a "tc? at mainbus"
where appropriate, intsead of #ifdef DS5000.


* Canonicalize the spelling of kernel options that enable support
for particular models. Use
DS5000_25 for the Personal Decstation aka MAXINE aka KN02-ca
DS5000_100 for the 5000/1xx series aka KMIN aka KN02-ba
DS5000_200 for the 5000/200 aka 3MAX aka KN02
DS500_240 for the 5000/240 aka 3MAXPLUS aka KN03

and change DS_5000_xxx to DS5000_xxx everywhere.

* Wrap the interrupt handlers for each model in the appropriate #ifdef,
instead of wrapping all of them with "#ifdef DS5000".

* Wrap the TC autoconfig for each model in the appropriate #ifdef.
 1.2 29-May-1996  mhitch Fix autoconfiguration stuff to more closely match the alpha - primarily
the IOASIC attached devices. The DS3100 will now configure properly.
Fix the DS5000/25 IOASIC table entry for the RTC so the RTC interrupts
get enabled.
Fix up a moved include file.
 1.1 27-Feb-1996  jonathan branches: 1.1.4;
TurboChannel bus auto-configuration tables, and TurboChannel pre-autoconfig
probe functions for console framebuffers, rewritten to work with the
machine-independent TC support in sys/dev/tc.
 1.1.4.4 09-Sep-1996  thorpej Pull up diffs between revs 1.4 and 1.6, by request from Jonathan Stone.
Log messages:

revision 1.5
date: 1996/08/21 14:02:48; author: jonathan; state: Exp; lines: +2 -2
Fix sfbinit() call to pass four arguments, not three, matching the
signature in sfb.c, which was changed to support multiple sfb devices.

revision 1.6
date: 1996/08/27 02:32:48; author: jonathan; state: Exp; lines: +2 -2
* Add initialization of colourmap array when using mfb as a console.
* Add interrupt handler for 3MIN, where we cannot disable TC slot interrupts.
* Change mfbinit() signature to match other (pmax) TC framebuffer init
routines.
* TODO after 1.2: add {cfb,mbf,sfb}var.h. Declare init functions there.
 1.1.4.3 17-Jun-1996  jonathan Pull up fix from trunk:
>Fix typo, colon instead of semicolon when DS_5000_25 is not defined.
 1.1.4.2 15-Jun-1996  jonathan Pull up mainbranch fix for kernels configured for a sigle model of DECstation
 1.1.4.1 30-May-1996  mhitch Pulled autoconfig fixes up from the trunk
 1.13.4.1 29-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.2.1 09-Nov-1997  mellon Pull rev 1.15 up from trunk (jonathan)
 1.21.12.3 02-Aug-1999  thorpej Update from trunk.
 1.21.12.2 01-Jul-1999  thorpej Sync w/ -current.
 1.21.12.1 21-Jun-1999  thorpej Sync w/ -current.
 1.21.4.5 14-Mar-2000  nisimura This file has gone long time ago.
 1.21.4.4 21-May-1999  nisimura - typo in a panic message.
 1.21.4.3 15-Mar-1999  nisimura - Sync. w/ main trunk.
- Remove unnecessary includes.
 1.21.4.2 15-Mar-1999  nisimura - Adjustment for 'machine/conf.h' removal.
- A bit cleanup of handcrafted TC device config.
 1.21.4.1 15-Oct-1998  nisimura - codes to probe TURBOchannel framebuffer with NWSCONS driver.
 1.26.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.26.2.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.33 09-Jun-2017  flxd Make VAXstation 4000 TURBOchannel adaptor work.
PIO and IRQ tested on VS4000/60 and /96 with TC-USB (slhci) and PMAD-AA (le).
DMA is untested.
vax needs space to be mapped out, so memory space is pre-mapped for TC option
drivers not bus_space'ified yet, also providing custom bus_space methods for
this kludge.
 1.32 12-Dec-2016  flxd branches: 1.32.8;
Clean-up (remove redundant declarations, concentrate checks).
 1.31 16-Nov-2016  macallan switch to common MIPS bus_space and bus_dma
tested by flxd@
 1.30 09-Jun-2015  matt branches: 1.30.2;
#include either <sys/cpu.h> or <mips/cpuregs.h> as needed
 1.29 13-Oct-2012  tsutsui branches: 1.29.14;
struct device * -> device_t, use device_xname() (from chs@)
 1.28 09-Jul-2011  matt branches: 1.28.2; 1.28.12;
Cleanu <machine/*> includes
 1.27 04-Jun-2011  tsutsui Split device_t/softc. pmax is tested on GXemul.
Compile test only for alpha and vax.

XXX: alpha/tc/tcasic.c calls tcattach() via config_found(9), but
XXX: pmax/tc/tcbus.c and vax/vsa/tc_vsbus.c calls tcattach() directly.
XXX: It looks horrible...
 1.26 20-Feb-2011  matt branches: 1.26.2;
Merge forward from matt-nb5-mips64.
New interrupt code.
mips64 support for DS5000/260.
 1.25 16-Mar-2009  dsl branches: 1.25.4; 1.25.6; 1.25.8;
ANSIfy functions with function-pointer arguments
 1.24 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.23 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.22 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.21 26-May-2008  nisimura branches: 1.21.6; 1.21.12; 1.21.16;
- assign 2 clause TNF license to the files cited as my ownership.
- abandon and remove my copyright notice from the three files were
copied in order to adapt HW I don't have; pvr.c, pm.c and stic.c
 1.20 31-Jul-2006  ad branches: 1.20.58; 1.20.60; 1.20.62; 1.20.64;
tcfb_cnattach(): pass the slot address through TC_PHYS_TO_UNCACHED() in
case the PROM hands us a physical or KSEG0 address.
 1.19 29-Jul-2006  ad Remove RASTERCONSOLE support from the pmax port.
 1.18 11-Dec-2005  christos branches: 1.18.4; 1.18.8;
merge ktrace-lwp.
 1.17 13-Dec-2003  ad branches: 1.17.16;
Add drivers for the desktop bus, DC-7085 and pm display. Make it possible to
select between rcons or wscons at compile time. Ok'ed by simonb.
 1.16 02-Oct-2002  thorpej branches: 1.16.6;
Use CFATTACH_DECL().
 1.15 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.14 19-Sep-2001  thorpej branches: 1.14.4; 1.14.10;
Adjust to use <dev/sun/fbio.h>
 1.13 17-Feb-2001  tsutsui branches: 1.13.2; 1.13.4;
white space nits.
 1.12 06-Jun-2000  nisimura branches: 1.12.4;
Add a missing parenthesis and correct the function return value declaration.
 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 29-Feb-2000  nisimura branches: 1.10.2;
Cleanup warning comment which is now irrelevant. Reorder codes.
 1.9 29-Feb-2000  nisimura - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
 1.8 03-Feb-2000  nisimura - Massive change of console initialization. Have each model its own
consinit().
- Fix fbconnect() and relatives; 'struct fbinfo' is initialized only once,
making sure no extraneous console resolution message is emitted.
 1.7 14-Jan-2000  simonb Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
- Remove bogus tc_slot_info[] name for interrupt handling array
and replace with simplified struct intrhand intrtab[] array.
- Add intr_establish() and intr_disestablish() function pointers
to struct platform and initialise this in each model-specific
initialisation, and remove global tc_enable_interrupt function
pointer.
- Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
 1.6 09-Jan-2000  ad RCS ID police.
 1.5 09-Jan-2000  simonb The clean-up continues:
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
 1.4 08-Jan-2000  simonb Function prototype cleanup.
 1.3 17-Nov-1999  nisimura branches: 1.3.2; 1.3.4;
Consistent panic messages when erroneous kernel configurations are found.
 1.2 16-Nov-1999  nisimura Fix a typo in PX TC device identification case analysis.
 1.1 15-Nov-1999  nisimura Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
 1.3.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.2.2 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.3.2.1 17-Nov-1999  nisimura file tcbus.c was added on branch nisimura-pmax-wscons on 1999-11-19 11:06:31 +0000
 1.10.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.12.4.3 12-Mar-2001  bouyer Sync with HEAD.
 1.12.4.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.12.4.1 06-Jun-2000  bouyer file tcbus.c was added on branch thorpej_scsipi on 2000-11-20 20:20:52 +0000
 1.13.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.13.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.13.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.14.10.1 15-Mar-2002  ad Changes necessary for wscons on NetBSD/pmax. All device support is here,
just needs further testing.
 1.14.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.14.4.1 19-Sep-2001  nathanw file tcbus.c was added on branch nathanw_sa on 2002-10-18 02:39:28 +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.17.16.1 30-Dec-2006  yamt sync with head.
 1.18.8.1 11-Aug-2006  yamt sync with head
 1.18.4.1 09-Sep-2006  rpaulo sync with head
 1.20.64.2 24-Jun-2008  wrstuden Hand-merge files that didn't merge right in recent sync w/ current.
 1.20.64.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.20.62.1 04-May-2009  yamt sync with head.
 1.20.60.1 04-Jun-2008  yamt sync with head
 1.20.58.1 02-Jun-2008  mjf Sync with HEAD.
 1.21.16.1 29-Dec-2010  matt Use a promcall wrapper function to call the prom. For non O32 systems
this will save and restore the callee saved registers since the 32-bit
prom probably won't be saving all 64bits.
 1.21.12.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.21.6.1 28-Apr-2009  skrll Sync with HEAD.
 1.25.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.25.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.25.4.2 12-Jun-2011  rmind sync with head
 1.25.4.1 05-Mar-2011  rmind sync with head
 1.26.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.28.12.2 03-Dec-2017  jdolecek update from HEAD
 1.28.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.28.2.1 30-Oct-2012  yamt sync with head
 1.29.14.4 28-Aug-2017  skrll Sync with HEAD
 1.29.14.3 05-Feb-2017  skrll Sync with HEAD
 1.29.14.2 05-Dec-2016  skrll Sync with HEAD
 1.29.14.1 22-Sep-2015  skrll Sync with HEAD
 1.30.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.32.8.1 01-Jul-2017  snj Pull up following revision(s) (requested by flxd in ticket #65):
share/man/man4/tc.4: revision 1.7
sys/arch/alpha/tc/tcasic.c: revision 1.46
sys/arch/pmax/tc/tcbus.c: revision 1.33
sys/arch/vax/conf/files.vax: revision 1.121
sys/arch/vax/vsa/tc_vsbus.c: revision 1.8, 1.9
sys/dev/tc/tc.c: revision 1.55
sys/dev/tc/tcvar.h: revision 1.27
Make VAXstation 4000 TURBOchannel adaptor work.
PIO and IRQ tested on VS4000/60 and /96 with TC-USB (slhci) and PMAD-AA (le).
DMA is untested.
vax needs space to be mapped out, so memory space is pre-mapped for TC option
drivers not bus_space'ified yet, also providing custom bus_space methods for
this kludge.
--
whitespace
--
Add vax.
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file tfb.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.2 30-Oct-1998  nisimura - Migrate to MI TURBOchannel codes.
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file xcfb.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.2 30-Oct-1998  nisimura - Migrate to MI TURBOchannel codes.
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file zs_ioasic.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.11 14-Mar-2000  nisimura Synchronize with the recent improvements of main trunk. Main trunk
filled gaps toward this, indeed.
 1.1.2.10 03-Feb-2000  nisimura Manipulate ZS csr/data registers in short quantity as ULTRIX does.
 1.1.2.9 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.1.2.8 29-Oct-1999  drochner make console keyboard support dependent on NZSKBD
 1.1.2.7 26-Oct-1999  drochner apply the change of 1.1.2.3 again - it got lost
 1.1.2.6 09-Aug-1999  drochner make zs_ioasic_lk201_cnattach() return an errno (and match its prototype)
 1.1.2.5 04-Aug-1999  nisimura - Catch up to recent introduction of wsmux psuedo-device.
- Make sure to assign BRG value early in boot.
- Make ZELMWU comfortable to build.
 1.1.2.4 11-May-1999  nisimura - Catch up to recent main trunk changes.
- Make target platform files to have TURBOchannel slot definitions and
nuke tc_machdep.c.
- MIPS processor needs not to have tc_mb() before ZS register read ops.
 1.1.2.3 26-Jan-1999  drochner Debugger() -> console_debugger() to honour the ddb_fromconsole sysctl
 1.1.2.2 19-Oct-1998  drochner slight cleanup, add support for keyboard attachment
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.1 15-Oct-1998  nisimura branches: 1.1.2;
file zs_ioasicvar.h was initially added on branch nisimura-pmax-wscons.
 1.1.2.3 19-Nov-1999  nisimura Merge w/ recent changes in main trunk.
 1.1.2.2 19-Oct-1998  drochner slight cleanup, add support for keyboard attachment
 1.1.2.1 15-Oct-1998  nisimura - new asc driver combined with MI NCR53C9x and MI SCSI.
- import zs_ioasic.? from NetBSD/alpha.
- NWSCONS drivers for various DECstations.
- squash tc_xxx.c into single tc_machdep.c
 1.1 19-Oct-1998  drochner branches: 1.1.2;
file zskbd.c was initially added on branch nisimura-pmax-wscons.
 1.1.2.2 22-Oct-1998  drochner use common zskbd code in dev/dec
 1.1.2.1 19-Oct-1998  drochner LK201 driver backend for Z8530. Still somehow hackish.
Derived from sun keyboard driver, partly by Takuya Koumoto.
 1.1 19-Oct-1998  drochner branches: 1.1.2;
file zskbdvar.h was initially added on branch nisimura-pmax-wscons.
 1.1.2.1 19-Oct-1998  drochner LK201 driver backend for Z8530. Still somehow hackish.
Derived from sun keyboard driver, partly by Takuya Koumoto.

RSS XML Feed