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

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

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

Per lengthy discussion with Andrew Brown.
 1.2 12-Jun-1998  cgd branches: 1.2.36;
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 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.36.1 07-Jan-2003  thorpej Sync with HEAD.
 1.3 16-Aug-1998  scw Hopelessly out of date, esp. now that we follow the standard
installation procedure.
 1.2 30-Nov-1995  jtc branches: 1.2.4;
merge in changes from 1.1 release branch
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.2;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.2.2 20-Oct-1995  chuck minor doc cleanup
 1.1.1.1.2.1 18-Oct-1995  chuck minor doc update
 1.2.4.1 05-Jul-1996  chuck update for 1.2
 1.4 12-Jan-2002  scw Move the VMEbus RAM `howto' into the docs directory.
 1.3 19-Jun-2001  wiz branches: 1.3.2; 1.3.8;
`accessible' only has one `a'.
 1.2 01-Nov-1997  scw branches: 1.2.30;
Remove paragraph describing problem with initialising VMEbus RAM cards'
parity bits. Initialisation now handled during kernel startup.
 1.1 12-Oct-1997  scw branches: 1.1.2; 1.1.4;
Describe how to configure and use VMEbus RAM cards with an MVME147 card.
 1.1.4.1 07-Nov-1997  mellon Pull rev 1.2 up from trunk (scw)
 1.1.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 12-Oct-1997  thorpej file README.VMEbus-RAM was added on branch marc-pcmcia on 1997-10-14 10:17:24 +0000
 1.2.30.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.8.1 19-Jun-2001  nathanw file README.VMEbus-RAM was added on branch nathanw_sa on 2002-02-28 04:10:48 +0000
 1.3.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.2 06-Jan-2003  lukem Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

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

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

Per lengthy discussion with Andrew Brown.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.54;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.54.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:11 +0000
 1.106 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.105 29-Sep-2022  riastradh swwdog(4): Add to GENERIC kernels.

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

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

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

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

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

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.101 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.100 26-Apr-2019  sevan Use veriexec.config to reduce duplication
 1.99 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.98 23-Jan-2018  sevan branches: 1.98.2; 1.98.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.97 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.96 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.95 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.94 16-Nov-2014  manu branches: 1.94.2; 1.94.12;
Remove unused extended attributes kernel options

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

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

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

There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
 1.91 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.90 05-Jul-2014  tsutsui branches: 1.90.2;
Use COPTS="-O2 -fno-reorder-blocks" as defined in sys.mk for userland.

Compile tests only.
 1.89 05-Jun-2013  christos branches: 1.89.6;
remove obsolete networking options
 1.88 27-Apr-2013  christos the bogus number police
 1.87 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.86 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.85 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.84 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.83 18-Dec-2011  dholland branches: 1.83.6;
WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.82 22-Nov-2011  tls branches: 1.82.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.81 30-Jun-2011  wiz branches: 1.81.2;
dependant -> dependent
 1.80 29-Apr-2010  chs enable TMPFS in all GENERICs that have MFS enabled.
 1.79 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.78 24-Jan-2009  mrg branches: 1.78.4; 1.78.6;
add COMPAT_50 to all the configs with COMPAT_40.
 1.77 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

Proposed on tech-kern@.
 1.76 10-Aug-2008  tls branches: 1.76.2;
Add accept filters to GENERIC kernels where they exist.
 1.75 31-Jul-2008  simonb Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.74 30-May-2008  tsutsui branches: 1.74.4;
Add options COMPAT_40 to files which have options COMPAT_30.
 1.73 31-Dec-2007  ad branches: 1.73.6; 1.73.8; 1.73.10; 1.73.12;
Remove systrace. Ok core@.
 1.72 17-Oct-2007  garbled branches: 1.72.2; 1.72.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.71 04-Jun-2007  martin branches: 1.71.10;
Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
 1.70 11-Nov-2006  jmmv branches: 1.70.2; 1.70.8; 1.70.10; 1.70.16; 1.70.18;
Remove tmpfs's experimental status. OK'ed by core@.
 1.69 26-Aug-2006  tsutsui branches: 1.69.2; 1.69.4;
Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.68 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.67 28-Jun-2006  liamjfoy branches: 1.67.2;
Add CARP to GENERIC kernel configs. CARP is not enabled by default.

ok: christos
 1.66 28-Mar-2006  pavel branches: 1.66.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.65 05-Feb-2006  cube branches: 1.65.2; 1.65.4; 1.65.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.64 02-Feb-2006  reinoud branches: 1.64.2;
Add commented out UDF file-system entry in all GENERIC configurations.
 1.63 09-Dec-2005  elad branches: 1.63.2; 1.63.4;
Add (commented out) Veriexec options and pseudo-device to GENERIC kernels,
and remove the i386 GENERIC_VERIEXEC config.
 1.62 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.61 03-Nov-2005  chs turn off DEBUG and DIAGNOSTIC in GENERIC kernels so that they
are compatible with the LKMs that are part of the release.
 1.60 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.59 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.58 19-Aug-2005  christos 64 bit inode changes.
 1.57 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.56 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.55 09-Jun-2005  tsutsui branches: 1.55.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.54 25-Feb-2005  simonb branches: 1.54.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.53 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.52 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.51 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.50 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.49 10-Nov-2004  christos branches: 1.49.4; 1.49.6;
Add COMPAT_BSDPTY to the rest of the config files.
 1.48 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.47 26-Jun-2004  abs Add (commented out) ALTQ options to all GENERIC-like files
 1.46 22-Jun-2004  itojun have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
 1.45 18-Jun-2004  christos ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM
 1.44 16-Jun-2004  christos Add pseudo-device ptm on all the generic flavored kernels.
 1.43 22-Sep-2003  cl branches: 1.43.2;
add COMPAT_15/COMPAT_16
 1.42 26-Apr-2003  ragge branches: 1.42.2;
Add pseudo-device ksyms.
 1.41 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.40 22-Nov-2002  wiz Fix typo (responsiness -> responsiveness).
 1.39 18-Oct-2002  junyoung Add NEW_BUFQ_STRATEGY (disabled by default).
 1.38 14-Oct-2002  elric Added commented out cgd(4)s to GENERIC configs.
 1.37 06-Oct-2002  provos add SYSTRACE; approved perry.
 1.36 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.35 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.34 25-Apr-2002  atatat branches: 1.34.2; 1.34.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.33 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.32 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.31 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.30 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.29 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.28 01-Sep-2001  atatat branches: 1.28.6;
Add bridge pseudo devices to GENERIC configs
 1.27 27-Jul-2001  scw memc attaches at mainbus now.
 1.26 08-Jul-2001  abs branches: 1.26.2;
Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
 1.25 10-Jun-2001  scw Enable DHCP and BOOTP as supported diskless NFS boot options.
 1.24 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.23 19-Dec-2000  bouyer branches: 1.23.2;
Add pseudo-device vlan
 1.22 09-Dec-2000  scw Delete the commented out EXEC_ELF32 now that it's in std.mvme68k.
(Spotted by Simon Burge)
 1.21 07-Dec-2000  scw Add "options COMPAT_AOUT_M68K".
 1.20 25-Nov-2000  scw Add the memory controller ASIC driver.
 1.19 25-Nov-2000  scw Oops, missed a trailing comma ...
 1.18 25-Nov-2000  scw Enable compatibility for earlier releases.
 1.17 25-Nov-2000  scw Add CD9660, plus some general cleanup.
 1.16 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.15 04-Oct-2000  itojun more rnd(4).
 1.14 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.13 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.12 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.11 27-Jul-2000  mason Moving to a default of 64 PTYs.
 1.10 30-Jun-2000  itojun add PULLDOWN_TEST for all the platforms.
XXX should be moved to somewhere else when stabilized
 1.9 22-Jun-2000  fvdl Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC.
 1.8 14-Jun-2000  veego branches: 1.8.2;
Remove the obsolete config fragments for kernel crypto, because the IPsec
crypto code is now in the kernel source tree.
 1.7 19-Apr-2000  itojun branches: 1.7.2;
add stf pseudo interface (commented out due to possible security risks)
 1.6 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.5 23-Jan-2000  hubertf branches: 1.5.2;
Add commented out "ident"-command
 1.4 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.3 15-Nov-1999  fvdl Add commented out option SOFTDEP to all GENERIC kernels.
 1.2 29-Jul-1999  augustss branches: 1.2.2; 1.2.8;
It's time to be COMPAT_14.
 1.1 20-Feb-1999  scw branches: 1.1.4;
Config file with support for both '147 and '167.
 1.1.4.1 02-Aug-1999  thorpej Update from trunk.
 1.2.8.2 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.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.2.2.5 05-Jan-2001  bouyer Sync with HEAD
 1.2.2.4 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.2.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.2.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.2.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.2.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.7.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.8.2.5 01-May-2001  he Pull up revision 1.23 (via patch, requested by he):
Add pseudo-device vlan.
Make sure "rnd is EXPERIMENTAL" comment is removed.
 1.8.2.4 17-Oct-2000  scw Pullup 1.12 - 1.13 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.8.2.3 05-Oct-2000  itojun pullup (approved by releng-1-5)
enable rnd(4).

> cvs rdiff -r1.33 -r1.34 syssrc/sys/arch/sun3/conf/GENERIC3X
> cvs rdiff -r1.33 -r1.34 syssrc/sys/arch/bebox/conf/GENERIC
> cvs rdiff -r1.14 -r1.15 syssrc/sys/arch/mvme68k/conf/GENERIC
 1.8.2.2 11-Aug-2000  mason Move to default of 64 PTYs in GENERIC kernel config.
Requested by mason, approved by jhawk.
 1.8.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.23.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.26.2.7 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.26.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.26.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.26.2.4 11-Feb-2002  jdolecek Sync w/ -current.
 1.26.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.26.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.26.2.1 03-Aug-2001  lukem update to -current
 1.28.6.8 11-Dec-2002  thorpej Sync with HEAD.
 1.28.6.7 11-Nov-2002  nathanw Catch up to -current
 1.28.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.28.6.5 20-Jun-2002  nathanw Catch up to -current.
 1.28.6.4 17-Apr-2002  nathanw Catch up to -current.
 1.28.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.28.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.28.6.1 01-Sep-2001  nathanw file GENERIC was added on branch nathanw_sa on 2002-01-08 00:26:31 +0000
 1.34.4.1 01-Aug-2002  lukem Pull up revision 1.35 (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.34.2.1 14-Jul-2002  gehenna catch up with -current.
 1.42.2.9 11-Dec-2005  christos Sync with head.
 1.42.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.42.2.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.42.2.6 15-Feb-2005  skrll Sync with HEAD.
 1.42.2.5 04-Feb-2005  skrll Sync with HEAD.
 1.42.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.42.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.42.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.42.2.1 03-Aug-2004  skrll Sync with HEAD
 1.43.2.2 15-Jul-2004  he Pull up revision 1.48 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.43.2.1 30-Jun-2004  jdc Pull up revision 1.47 (requested by abs in ticket #567).

Add (commented out) ALTQ options to all GENERIC-like files
 1.49.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.49.6.1 12-Feb-2005  yamt sync with head.
 1.49.4.1 29-Apr-2005  kent sync with -current
 1.54.2.3 05-Nov-2005  tron Pull up following revision(s) (requested by chs in ticket #929):
sys/arch/hp300/conf/GENERIC: revision 1.124
sys/arch/acorn32/conf/GENERIC: revision 1.62
sys/arch/pdp10/conf/GENERIC: revision 1.19
sys/arch/mvme68k/conf/GENERIC: revision 1.61
sys/arch/netwinder/conf/GENERIC: revision 1.70
sys/arch/sbmips/conf/GENERIC: revision 1.46
sys/arch/macppc/conf/GENERIC: revision 1.214
sys/arch/bebox/conf/GENERIC: revision 1.89
sys/arch/cobalt/conf/GENERIC: revision 1.83
sys/arch/cats/conf/GENERIC: revision 1.92
sys/arch/shark/conf/GENERIC: revision 1.53
sys/arch/amiga/conf/GENERIC.in: revision 1.45
sys/arch/acorn26/conf/GENERIC: revision 1.37
sys/arch/cesfic/conf/GENERIC: revision 1.38
sys/arch/iyonix/conf/GENERIC: revision 1.21
sys/arch/alpha/conf/GENERIC: revision 1.277
sys/arch/vax/conf/GENERIC: revision 1.143
sys/arch/atari/conf/GENERIC.in: revision 1.56
sys/arch/mipsco/conf/GENERIC: revision 1.53
sys/arch/ofppc/conf/GENERIC: revision 1.85
sys/arch/next68k/conf/GENERIC: revision 1.96
sys/arch/arc/conf/GENERIC: revision 1.125
sys/arch/dreamcast/conf/GENERIC: revision 1.62
turn off DEBUG and DIAGNOSTIC in GENERIC kernels so that they
are compatible with the LKMs that are part of the release.
 1.54.2.2 14-Aug-2005  riz Pull up revision 1.57 (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.54.2.1 18-Jul-2005  riz Pull up revision 1.56 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.55.2.4 21-Jan-2008  yamt sync with head
 1.55.2.3 03-Sep-2007  yamt sync with head.
 1.55.2.2 30-Dec-2006  yamt sync with head.
 1.55.2.1 21-Jun-2006  yamt sync with head.
 1.63.4.1 09-Sep-2006  rpaulo sync with head
 1.63.2.1 18-Feb-2006  yamt sync with head.
 1.64.2.1 22-Apr-2006  simonb Sync with head.
 1.65.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.65.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.65.2.3 03-Sep-2006  yamt sync with head.
 1.65.2.2 11-Aug-2006  yamt sync with head
 1.65.2.1 01-Apr-2006  yamt sync with head.
 1.66.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.67.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.67.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.69.4.1 10-Dec-2006  yamt sync with head.
 1.69.2.1 18-Nov-2006  ad Sync with head.
 1.70.18.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.70.16.1 26-Jun-2007  garbled Sync with HEAD.
 1.70.10.1 11-Jul-2007  mjf Sync with head.
 1.70.8.1 09-Jun-2007  ad Sync with head.
 1.70.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.71.10.2 09-Jan-2008  matt sync with HEAD
 1.71.10.1 06-Nov-2007  matt sync with HEAD
 1.72.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.72.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.73.12.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.73.12.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.73.10.2 11-Aug-2010  yamt sync with head.
 1.73.10.1 04-May-2009  yamt sync with head.
 1.73.8.1 04-Jun-2008  yamt sync with head
 1.73.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.73.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.73.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.74.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.74.4.1 19-Oct-2008  haad Sync with HEAD.
 1.76.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.76.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.78.6.1 30-May-2010  rmind sync with head
 1.78.4.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.78.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.81.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.81.2.2 30-Oct-2012  yamt sync with head
 1.81.2.1 17-Apr-2012  yamt sync with head
 1.82.2.1 18-Feb-2012  mrg merge to -current.
 1.83.6.4 03-Dec-2017  jdolecek update from HEAD
 1.83.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.83.6.2 23-Jun-2013  tls resync from head
 1.83.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.89.6.1 10-Aug-2014  tls Rebase.
 1.90.2.2 18-Nov-2014  snj Pull up following revision(s) (requested by manu in ticket #251):
sys/arch/acorn26/conf/GENERIC: revision 1.81
sys/arch/acorn32/conf/GENERIC: revision 1.116
sys/arch/alpha/conf/GENERIC: revision 1.362
sys/arch/amd64/conf/ALL: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.404
sys/arch/amd64/conf/XEN3_DOM0: revision 1.112
sys/arch/amd64/conf/XEN3_DOMU: revision 1.60
sys/arch/amiga/conf/GENERIC.in: revision 1.129
sys/arch/amiga/conf/GENERIC: revision 1.311
sys/arch/amigappc/conf/GENERIC: revision 1.24
sys/arch/arc/conf/GENERIC: revision 1.184
sys/arch/bebox/conf/GENERIC: revision 1.145
sys/arch/cats/conf/GENERIC: revision 1.155
sys/arch/cesfic/conf/GENERIC: revision 1.65
sys/arch/cobalt/conf/GENERIC: revision 1.147
sys/arch/dreamcast/conf/GENERIC: revision 1.121
sys/arch/emips/conf/GENERIC: revision 1.15
sys/arch/epoc32/conf/GENERIC: revision 1.8
sys/arch/ews4800mips/conf/GENERIC: revision 1.51
sys/arch/hp300/conf/GENERIC: revision 1.190
sys/arch/hpcmips/conf/GENERIC: revision 1.229
sys/arch/hpcsh/conf/GENERIC: revision 1.106
sys/arch/hppa/conf/GENERIC: revision 1.6
sys/arch/i386/conf/ALL: revision 1.389
sys/arch/i386/conf/GENERIC: revision 1.1118
sys/arch/i386/conf/XEN3_DOM0: revision 1.93
sys/arch/i386/conf/XEN3_DOMU: revision 1.65
sys/arch/ibmnws/conf/GENERIC: revision 1.46
sys/arch/iyonix/conf/GENERIC: revision 1.88
sys/arch/landisk/conf/GENERIC: revision 1.45
sys/arch/luna68k/conf/GENERIC: revision 1.119
sys/arch/mac68k/conf/GENERIC: revision 1.220
sys/arch/macppc/conf/GENERIC: revision 1.320
sys/arch/macppc/conf/MAMBO: revision 1.24
sys/arch/macppc/conf/POWERMAC_G5: revision 1.25
sys/arch/mipsco/conf/GENERIC: revision 1.88
sys/arch/mmeye/conf/GENERIC: revision 1.120
sys/arch/mvme68k/conf/GENERIC: revision 1.94
sys/arch/mvmeppc/conf/GENERIC: revision 1.24
sys/arch/netwinder/conf/GENERIC: revision 1.126
sys/arch/news68k/conf/GENERIC: revision 1.125
sys/arch/newsmips/conf/GENERIC: revision 1.129
sys/arch/next68k/conf/GENERIC: revision 1.139
sys/arch/ofppc/conf/GENERIC: revision 1.157
sys/arch/pmax/conf/GENERIC64: revision 1.21
sys/arch/pmax/conf/GENERIC: revision 1.185
sys/arch/prep/conf/GENERIC: revision 1.174
sys/arch/rs6000/conf/GENERIC: revision 1.33
sys/arch/sandpoint/conf/GENERIC: revision 1.88
sys/arch/sbmips/conf/GENERIC: revision 1.101
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.28
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.104
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.106
sys/arch/shark/conf/GENERIC: revision 1.121
sys/arch/sparc/conf/GENERIC: revision 1.248
sys/arch/sparc/conf/TADPOLE3GX: revision 1.65
sys/arch/sparc64/conf/GENERIC: revision 1.177
sys/arch/sparc64/conf/NONPLUS64: revision 1.44
sys/arch/sun2/conf/GENERIC: revision 1.94
sys/arch/sun3/conf/GENERIC: revision 1.171
sys/arch/vax/conf/GENERIC: revision 1.193
sys/arch/vax/conf/VAX780: revision 1.19
sys/arch/x68k/conf/GENERIC: revision 1.179
sys/arch/zaurus/conf/GENERIC: revision 1.65
sys/ufs/files.ufs: revision 1.38
Remove unused extended attributes kernel options

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

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.102.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 21-Nov-1999  itojun bring in content of GENERIC.v6 into GENERIC.
remove GENERIC.v6 file (as it is part of GENERIC now).

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

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

XXX what to do with arch/arm32/SHARK{,.v6}?
 1.2 09-Jul-1999  thorpej branches: 1.2.2; 1.2.8;
Add examples for including the kernel crypto bits from either crypto-us
or crypto-intl, commented out, with instructions to use only one, and
adjust the prefix as necessary.
 1.1 01-Jul-1999  itojun branches: 1.1.2;
kernel configuration for IPv6/IPsec. should be in GENERIC in the future.
(source code will be committed soon)
 1.1.2.3 02-Aug-1999  thorpej Update from trunk.
 1.1.2.2 01-Jul-1999  thorpej Sync w/ -current.
 1.1.2.1 01-Jul-1999  thorpej file GENERIC.v6 was added on branch chs-ubc2 on 1999-07-01 23:13:52 +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.69 18-Jan-2024  thorpej Don't put the MVME1xx model defines into IDENT, make them defflag options and
put them in opt_mvmeconf.h. Make these options depend on the appropriate
M680x0 option (MVME147 -> M68030, MVME16[27] -> M68040, MVME17[27] -> M68060)
so that the CPU option appears correctly in opt_m68k_arch.h.
 1.68 22-Sep-2018  rin - Determine KERN_AS automatically depending on whether OPT_MODULAR is
set or not, in the same way as libcompat.

- Specify OPT_MODULAR in the port Makefile instead of KERN_AS.

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

OK christos
 1.67 08-Mar-2018  mrg branches: 1.67.2;
fix various gcc6 m68k issues:
- bad indentation. next68k en.c and mvme68k le_poll.c fixes real issues
in error handling, the rest are NFCI.
- pass 68030 flags as appropriate for mvme68k.
- next68k nextrom.c has -Warray-bounds ignored for an odd expression
that appears to run before relocation, and needs manual offsets
added which trips bounds array checking.

with this all m68k ports build with GCC 6.
 1.66 06-Sep-2015  uebayasi branches: 1.66.16;
Declare dependency on fpsp.o via newly introduced ${MD_LIBS} instead of
${MD_OBJS}.

${MD_OBJS} should be used only for objects that must be linked first (i.e.,
start code). Objects have to be compiled following common compile rules,
and have to be generated into common places (i.e., top of kernel build
directory).

${MD_LIBS} defines libraries that are built by separate makefiles, under
separate directories. `Makefile.kern.inc' doesn't know intermediate library
objects.
 1.65 05-Apr-2014  tsutsui branches: 1.65.6;
Specify both -Wa,-march=68030 and -Wa,-mcpu=68030 in -m68060 case for gcc45.

Now VME177 builds with both gcc45 and gcc48
(though untested on the real machines).

XXX: is it really worth to use -m68060 (instead of -m68020-60)
for kernel binaries?
 1.64 30-Mar-2014  tsutsui Fix "Error: unrecognized option -mcpu68030".
 1.63 30-Mar-2014  christos fixes for gcc-4.8 (John D. Baker)
 1.62 21-Jan-2011  joerg branches: 1.62.4; 1.62.14; 1.62.18;
Switch remaining platforms to modern CPP for assembler.
 1.61 18-Feb-2008  joerg branches: 1.61.32; 1.61.38; 1.61.40;
Add assym.h dependencies.
 1.60 11-Dec-2005  christos branches: 1.60.50; 1.60.56;
merge ktrace-lwp.
 1.59 31-May-2005  christos branches: 1.59.2;
s/GENASSYM/GENASSYM_CONF/ so we can use "GENASSYM" as the program name.
 1.58 04-Jun-2004  thorpej Add the %MAKEOPTIONSAPPEND token at the end of the file, after the
common Makefile.kern.inc has been included.
 1.57 26-Nov-2002  thorpej branches: 1.57.6; 1.57.10;
The traditional C preprocessor is fixed in GCC 3.3 now, so no need
to skip -traditional-cpp for HAVE_GCC3.
 1.56 04-Jun-2002  thorpej Don't use -traditional-cpp if HAVE_GCC3.
 1.55 09-Dec-2001  atatat branches: 1.55.8;
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.54 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.53 26-Oct-2001  jmc branches: 1.53.2;
Change defaults for kernel compiles. Default all to USETOOLS?=no and have
the etc Makefile override that by putting USETOOLS into $.MAKEOVERRIDES
This way the default for kernel compiles is still to use the installed
toolchain instead of depending on $TOOLDIR. $TOOLDIR can be used by
simply adding USETOOLS=yes to the command line as usual.

Adjust each ports template to set the default no setting and also pull in
bsd.own.mk if they weren't already to ensure they'll build correctly
with the new toolchain setup.
 1.52 23-Oct-2001  thorpej branches: 1.52.2;
Set MACHINE_ARCH explicitly in Makefiles for which it is constant.
Also, since config(8) now explcitly sets MACHINE, there is no need
to do it here in the Makefile.
 1.51 29-May-2001  mrg branches: 1.51.2;
define _KERNEL_OPT as well as _KERNEL. we will use this in the future to
get kernel "opt_foo.h" headers, rather than _KERNEL && !_LKM.
 1.50 17-Dec-2000  jdolecek branches: 1.50.2;
delete obsolete comment
 1.49 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.48 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.47 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.46 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.45 01-Feb-2000  tsutsui branches: 1.45.2;
Revert STRIPPROG -> STRIP
 1.44 24-Jan-2000  tron Add "dependall" target for comfort.
 1.43 19-Jan-2000  tsutsui STRIP -> STRIPPROG
 1.42 19-Jan-2000  tsutsui Change STRIPFLAGS=-g for cross-toolchains.
 1.41 26-Jul-1999  cgd branches: 1.41.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.40 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.39 15-Jan-1999  thorpej branches: 1.39.6;
Some minor, mostly costmetic, changes to CPPFLAGS/CFLAGS.
 1.38 15-Jan-1999  thorpej Don't define "mc68020". Nothing uses it.
 1.37 08-Jan-1999  augustss Add -Wpointer-arith warning since `void *' arithmetic is not ANSI C.
 1.36 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.35 05-Sep-1998  lukem distclean is a synonym for cleandir
 1.34 31-May-1998  thorpej Specify a non-profiling C rule.
 1.33 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.32 12-Nov-1997  thorpej Make sure CPP, AR, AS, and RANLIB are defined.
 1.31 12-Nov-1997  thorpej Define LORDER, NM, and TSORT here, like we do the rest of the tools.
 1.30 03-Oct-1997  lukem branches: 1.30.2;
define SIZE?=size, and use ${SIZE} instead of size. makes cross
compilation easier
 1.29 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.28 12-Sep-1997  mycroft FPCOPROC is no longer used here.
 1.27 12-Sep-1997  mycroft Kill vestiges of Locore.c.
 1.26 12-Jul-1997  leo branches: 1.26.2;
Generate assym.h dependencies when making 'depend'.
 1.25 25-Apr-1997  thorpej Sync with hp300.
 1.24 08-Apr-1997  gwr Zap AFLAGS
 1.23 17-Mar-1997  gwr Support cross-compilation.
 1.22 14-Mar-1997  mycroft Put the genassym.sh output in a temp file, and mv -f it, in case
it fails spectacularly and doesn't clean up. Also, remove dependencies for
genassym.o (since it no longer exists).
 1.21 13-Mar-1997  mycroft Use genassym.cf, to support cross-compiling.
 1.20 10-Mar-1997  chuck remove "::" entries as per cgd
 1.19 04-Feb-1997  perry branches: 1.19.4;
Nuke some options GENERIC residue.
 1.18 04-Feb-1997  perry Nuke some GENERIC residue.
 1.17 01-Dec-1996  jonathan * Replace explicit -O2 in CFLAGS with COPTS macro. Default COPTS?= -O2.
Lets users over-ride with makeoptions COPTS="..." in kernel config files.

Leave `mandatory' flags (like -msoft-float which on m68k enforces no
FP in kernel) in CFLAGS.
 1.16 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.15 31-Aug-1996  mycroft Wrap the default definition of `S' in `.ifndef'.
 1.14 12-Aug-1996  mycroft Put into . Remove hooks for `config-dependent' and
`device-driver' flags.
 1.13 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.12 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.11 11-May-1996  mycroft Make `make depend' work for libraries.
 1.10 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.9 26-Feb-1996  mycroft Define build programs with `?=', so they can be overridden with `makeoptions'.
 1.8 09-Feb-1996  mycroft Fix mkdep problems due to missing flags.
 1.7 03-Feb-1996  mycroft Use `-traditional-cpp' when building .s and .S files.
 1.6 02-Feb-1996  mycroft Clone these, and fix many bugs.
 1.5 02-Feb-1996  mycroft assym.s -> assym.h
(Some ports did this already.)
 1.4 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.3 19-Sep-1995  thorpej Compile the kernel with -Werror and -fno-builtin.
 1.2 10-Aug-1995  chuck minor alphabetize clean up
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.19.4.1 12-Mar-1997  is Merge in changes from Trunk
 1.26.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.26.2.1 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.30.2.1 12-Nov-1997  thorpej Pull up "make sure tools are defined" changes from trunk.
 1.39.6.1 02-Aug-1999  thorpej Update from trunk.
 1.41.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.41.2.2 22-Nov-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.45.2.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.50.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.51.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.51.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.52.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.53.2.5 11-Dec-2002  thorpej Sync with HEAD.
 1.53.2.4 20-Jun-2002  nathanw Catch up to -current.
 1.53.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.53.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.53.2.1 26-Oct-2001  nathanw file Makefile.mvme68k was added on branch nathanw_sa on 2002-01-08 00:26:31 +0000
 1.55.8.1 14-Jul-2002  gehenna catch up with -current.
 1.57.10.1 06-Feb-2005  jmc Pull up patch (requested by martti in ticket #1086)
Move ipf to sys/dist/ipf and sync w. trunk
 1.57.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.57.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.57.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.57.6.1 03-Aug-2004  skrll Sync with HEAD
 1.59.2.1 27-Feb-2008  yamt sync with head.
 1.60.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.60.50.1 23-Mar-2008  matt sync with HEAD
 1.61.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.61.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.61.32.1 05-Mar-2011  rmind sync with head
 1.62.18.1 18-May-2014  rmind sync with head
 1.62.14.2 03-Dec-2017  jdolecek update from HEAD
 1.62.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.62.4.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.65.6.1 22-Sep-2015  skrll Sync with HEAD
 1.66.16.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.66.16.1 15-Mar-2018  pgoyette Synch with HEAD
 1.67.2.1 10-Jun-2019  christos Sync with HEAD
 1.30 23-Jan-2015  chs increase ramdisk size for gcc48.
 1.29 05-Jul-2014  tsutsui branches: 1.29.2; 1.29.4;
Use COPTS="-O2 -fno-reorder-blocks" as defined in sys.mk for userland.

Compile tests only.
 1.28 23-Nov-2010  hannken branches: 1.28.18; 1.28.32;
Remove unused count from pseudo-device md.
 1.27 06-Feb-2009  jym branches: 1.27.6;
Changes to MEMORY_RBFLAGS option:
- renamed to MEMORY_DISK_RBFLAGS to better fit the rest of the
MEMORY_DISK options(4)
- change default value to RB_AUTOBOOT instead of RB_SINGLE, and adapt
the config(5) files accordingly
- document this option inside options(4)

See also http://mail-index.netbsd.org/tech-kern/2008/12/25/msg003924.html

Reviewed by abs@ in private mail.
 1.26 14-May-2008  he branches: 1.26.6;
Bump ramdisk size to compensate for recent bloat.
 1.25 05-Feb-2006  cube branches: 1.25.68; 1.25.70; 1.25.72; 1.25.74;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.24 07-Dec-2005  tsutsui branches: 1.24.2; 1.24.4; 1.24.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.23 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.22 18-Feb-2005  dsl branches: 1.22.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.21 15-Jul-2004  atatat branches: 1.21.4; 1.21.6;
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.20 21-May-2004  he Bump ramdisk size from 800k to 900k so the contents fit again.
 1.19 18-Sep-2002  lukem branches: 1.19.6; 1.19.8;
enable USERCONF by default; it's small and extremely useful to have available.
 1.18 11-Jul-2002  wiz 'environment', not 'enviroment'
 1.17 25-Apr-2002  atatat branches: 1.17.2;
Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.16 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.15 02-Apr-2002  lukem Rename MEMORY_DISK_SIZE (formerly MINIROOTSIZE) to MEMORY_DISK_ROOT_SIZE,
which was suggested by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> as
being more consistent with what it's controlling...
 1.14 24-Mar-2002  scw Bump the MD image size to 1600 blocks.
 1.13 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.12 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.11 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.10 27-Jul-2001  scw branches: 1.10.6;
memc attaches at mainbus now.
 1.9 03-Jul-2001  scw branches: 1.9.2;
Another instance of the MD siop driver which slipped the net...
 1.8 10-Jun-2001  scw Enable DHCP and BOOTP as supported diskless NFS boot options.
 1.7 28-May-2001  scw s/ncsrc/osiop.
While I'm here, ditch some excess baggage which is useless for
the RAMDISK kernel.
 1.6 25-Nov-2000  scw branches: 1.6.2;
Include the cd9660 filesystem and cd(4).
 1.5 25-Nov-2000  scw Don't base this on the GENERIC config file; there's too much
unnecessary bloat in it for an installation kernel.
 1.4 24-Nov-2000  scw The ramdisk now needs 1024 blocks.
 1.3 20-Feb-1999  scw branches: 1.3.8; 1.3.20;
Include the GENERIC config. file instead of VME147.
 1.2 08-May-1998  scw Move 'pseudo-device md' from VME147 to RAMDISK, where it belongs.
For some reason, 'pseudo-device vnd' was missing from VME147; added.
 1.1 17-Dec-1997  scw Conf file suitable for the ramdisk installation kernel.
 1.3.20.1 25-Jun-2001  he Pull up revision 1.4 (requested by scw):
Bump the miniroot size to fit larger embedded image.
 1.3.8.1 08-Dec-2000  bouyer Sync with HEAD.
 1.6.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.2.7 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.9.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.9.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.9.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.2.1 03-Aug-2001  lukem update to -current
 1.10.6.8 18-Oct-2002  nathanw Catch up to -current.
 1.10.6.7 01-Aug-2002  nathanw Catch up to -current.
 1.10.6.6 20-Jun-2002  nathanw Catch up to -current.
 1.10.6.5 17-Apr-2002  nathanw Catch up to -current.
 1.10.6.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.10.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.10.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.10.6.1 27-Jul-2001  nathanw file RAMDISK was added on branch nathanw_sa on 2002-01-08 00:26:32 +0000
 1.17.2.1 16-Jul-2002  gehenna catch up with -current.
 1.19.8.1 15-Jul-2004  he Pull up revision 1.21 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.19.6.6 11-Dec-2005  christos Sync with head.
 1.19.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.6.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 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.21.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.21.4.1 29-Apr-2005  kent sync with -current
 1.22.6.1 21-Jun-2006  yamt sync with head.
 1.24.6.1 22-Apr-2006  simonb Sync with head.
 1.24.4.1 09-Sep-2006  rpaulo sync with head
 1.24.2.1 18-Feb-2006  yamt sync with head.
 1.25.74.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.25.72.2 04-May-2009  yamt sync with head.
 1.25.72.1 16-May-2008  yamt sync with head.
 1.25.70.1 18-May-2008  yamt sync with head.
 1.25.68.1 02-Jun-2008  mjf Sync with HEAD.
 1.26.6.1 03-Mar-2009  skrll Sync with HEAD.
 1.27.6.1 05-Mar-2011  rmind sync with head
 1.28.32.1 10-Aug-2014  tls Rebase.
 1.28.18.2 03-Dec-2017  jdolecek update from HEAD
 1.28.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.4.1 06-Apr-2015  skrll Sync with HEAD
 1.29.2.1 04-Feb-2015  snj Pull up following revision(s) (requested by chs in ticket #484):
distrib/mvme68k/ramdisk/Makefile: revision 1.29
sys/arch/mvme68k/conf/RAMDISK: revision 1.30
increase ramdisk size for gcc48.
 1.62 21-Jan-2021  nia add a commented out compat_ossaudio wherever there's compat_linux

requested by mrg
 1.61 14-Sep-2017  mrg branches: 1.61.16;
clean up COMPAT_* options for native netbsd code:
- new series of files that are useful for saying "i want everything
since netbsd 1.4", etc.
- use the fact COMPAT_* options have future dependancies to remove
many redundant options.

removes about 3000 lines total across kernel configuration files.
tested about 30 random kernels in the changed list.
 1.60 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 2.
 1.59 23-Aug-2014  dholland branches: 1.59.2;
Systematize (and in many cases, fix) the comments on options COMPAT_NN.

There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
 1.58 05-Jul-2014  tsutsui Use COPTS="-O2 -fno-reorder-blocks" as defined in sys.mk for userland.

Compile tests only.
 1.57 01-Mar-2013  joerg branches: 1.57.10;
Retire OSI network stack. OK core@
 1.56 22-Nov-2011  tls branches: 1.56.8;

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

This fixes build breaks on several ports. Thanks to Havard Eidnes for
pointing them out.
 1.55 30-Jun-2011  wiz branches: 1.55.2;
dependant -> dependent
 1.54 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.53 30-May-2008  tsutsui branches: 1.53.18; 1.53.20;
Add options COMPAT_40 to files which have options COMPAT_30.
 1.52 05-Feb-2006  cube branches: 1.52.68; 1.52.70; 1.52.72; 1.52.74;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.51 07-Dec-2005  tsutsui branches: 1.51.2; 1.51.4; 1.51.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.50 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.49 19-Aug-2005  christos 64 bit inode changes.
 1.48 25-Feb-2005  simonb branches: 1.48.4;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.47 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.46 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.45 10-Nov-2004  christos branches: 1.45.4; 1.45.6;
Add COMPAT_BSDPTY to the rest of the config files.
 1.44 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.43 22-Sep-2003  cl branches: 1.43.2;
add COMPAT_15/COMPAT_16
 1.42 18-Sep-2002  lukem branches: 1.42.6;
enable USERCONF by default; it's small and extremely useful to have available.
 1.41 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.40 25-Apr-2002  atatat branches: 1.40.2; 1.40.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.39 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.38 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.37 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.36 08-Jul-2001  abs branches: 1.36.2; 1.36.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.35 10-Jun-2001  scw Enable DHCP and BOOTP as supported diskless NFS boot options.
 1.34 10-Jun-2001  scw Add rnd(4) pseudo-device.
 1.33 28-May-2001  scw Add COMPAT_15 and comment out COMPAT_SUNOS. (It's hardly used and saves
a bit of space on low memory models).
 1.32 09-Dec-2000  scw branches: 1.32.2;
Delete the commented out EXEC_ELF32 now that it's in std.mvme68k.
(Spotted by Simon Burge)
 1.31 07-Dec-2000  scw Add "options COMPAT_AOUT_M68K".
 1.30 25-Nov-2000  scw Add CD9660, plus some general cleanup.
 1.29 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.28 29-Jul-1999  augustss branches: 1.28.2; 1.28.10;
It's time to be COMPAT_14.
 1.27 20-Feb-1999  scw branches: 1.27.4;
Add NFS_BOOT_BOOTPARAMS option.
 1.26 15-Dec-1998  itohy Added options COMPAT_LINUX and EXEC_ELF32 as comments
to GENERIC configuration files.
 1.25 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.24 08-May-1998  scw Move 'pseudo-device md' from VME147 to RAMDISK, where it belongs.
For some reason, 'pseudo-device vnd' was missing from VME147; added.
 1.23 04-May-1998  thorpej options UVM no longer needed; it's now standard
 1.22 18-Mar-1998  bouyer Add commented out "options FFS_EI"
 1.21 21-Feb-1998  scw Implement changes for MACHINE_NEW_NONCONTIG and UVM.
 1.20 17-Dec-1997  scw Add file-system KERNFS for the benefit of miniroot install.
 1.19 01-Dec-1997  kleink Add COMPAT_13.
 1.18 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.17 12-Sep-1997  mycroft FPCOPROC is already in the Makefile; no need for it here.
 1.16 22-Jul-1997  phil branches: 1.16.2;
Add "#file-system UNION" as per PR 1032. (Should mvme68k have a
GENERIC conf file with "everything?")
 1.15 21-Mar-1997  thorpej Nuke unneeded "machine ..." line, pointed out by John Birrell.
 1.14 18-Mar-1997  thorpej Use std.mvme68k, which contains non-optional "options" (a'la other ports).
 1.13 31-Jan-1997  thorpej Adopt for new file system and root spec grammar.
 1.12 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.11 28-Dec-1996  pk branches: 1.11.2;
rename: ramdisk => md
 1.10 09-Nov-1996  chuck - new lpt driver, contributed by Steve Woodford <steve@mctavish.demon.co.uk>
- added 1.1 and 1.2 compat to VME147 config file
 1.9 08-Nov-1996  chuck add ss/uk
 1.8 06-Nov-1996  chuck add options: EXEC_AOUT and EXEC_SCRIPT
 1.7 12-Sep-1996  thorpej Update for the new way machine/cpu support is option'd in.
 1.6 10-Sep-1996  thorpej Document COMPAT_M68K4K, but leave it disabled by default.
 1.5 29-May-1996  chuck switch to generic boot
 1.4 20-May-1996  chuck branches: 1.4.4;
add "rd" ram-disk config
 1.3 26-Apr-1996  chuck - sync with new autoconfig code (iio goes away)
- add support for zs1, vme devices (untested)

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.2 18-Apr-1996  chuck add wdsc, enable FFS, move le
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.4.4.1 29-May-1996  chuck import generic boot bug fix
 1.11.2.2 18-Jan-1997  thorpej Update from trunk.
 1.11.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.16.2.1 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.27.4.1 02-Aug-1999  thorpej Update from trunk.
 1.28.10.3 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.28.10.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.28.10.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.28.2.3 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.28.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.28.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 21-Jun-2001  nathanw Catch up to -current.
 1.36.8.6 18-Oct-2002  nathanw Catch up to -current.
 1.36.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.36.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.36.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.36.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.36.8.1 08-Jul-2001  nathanw file VME147 was added on branch nathanw_sa on 2002-01-08 00:26:32 +0000
 1.36.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.36.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.36.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.36.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.36.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.40.4.1 01-Aug-2002  lukem Pull up revision 1.41 (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.40.2.1 14-Jul-2002  gehenna catch up with -current.
 1.42.6.8 11-Dec-2005  christos Sync with head.
 1.42.6.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.42.6.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.42.6.5 04-Feb-2005  skrll Sync with HEAD.
 1.42.6.4 14-Nov-2004  skrll Sync with HEAD.
 1.42.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.42.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.42.6.1 03-Aug-2004  skrll Sync with HEAD
 1.43.2.1 15-Jul-2004  he Pull up revision 1.44 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.45.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.45.6.1 12-Feb-2005  yamt sync with head.
 1.45.4.1 29-Apr-2005  kent sync with -current
 1.48.4.1 21-Jun-2006  yamt sync with head.
 1.51.6.1 22-Apr-2006  simonb Sync with head.
 1.51.4.1 09-Sep-2006  rpaulo sync with head
 1.51.2.1 18-Feb-2006  yamt sync with head.
 1.52.74.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.52.72.2 11-Aug-2010  yamt sync with head.
 1.52.72.1 04-May-2009  yamt sync with head.
 1.52.70.1 04-Jun-2008  yamt sync with head
 1.52.68.1 02-Jun-2008  mjf Sync with HEAD.
 1.53.20.1 30-May-2010  rmind sync with head
 1.53.18.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.55.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.55.2.1 17-Apr-2012  yamt sync with head
 1.56.8.3 03-Dec-2017  jdolecek update from HEAD
 1.56.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.56.8.1 23-Jun-2013  tls resync from head
 1.57.10.1 10-Aug-2014  tls Rebase.
 1.59.2.1 28-Aug-2017  skrll Sync with HEAD
 1.61.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.34 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.33 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 2.
 1.32 23-Aug-2014  dholland branches: 1.32.2;
Systematize (and in many cases, fix) the comments on options COMPAT_NN.

There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
 1.31 05-Jul-2014  tsutsui Use COPTS="-O2 -fno-reorder-blocks" as defined in sys.mk for userland.

Compile tests only.
 1.30 01-Mar-2013  joerg branches: 1.30.10;
Retire OSI network stack. OK core@
 1.29 22-Nov-2011  tls branches: 1.29.8;

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

This fixes build breaks on several ports. Thanks to Havard Eidnes for
pointing them out.
 1.28 30-Jun-2011  wiz branches: 1.28.2;
dependant -> dependent
 1.27 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.26 30-May-2008  tsutsui branches: 1.26.18; 1.26.20;
Add options COMPAT_40 to files which have options COMPAT_30.
 1.25 05-Feb-2006  cube branches: 1.25.68; 1.25.70; 1.25.72; 1.25.74;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.24 07-Dec-2005  tsutsui branches: 1.24.2; 1.24.4; 1.24.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.23 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.22 19-Aug-2005  christos 64 bit inode changes.
 1.21 25-Feb-2005  simonb branches: 1.21.4;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.20 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.19 31-Jan-2005  hannken Add file system snapshots to kernel configs.

- Ffs internal snapshots get compiled in unconditionally.

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

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
 1.18 10-Nov-2004  christos branches: 1.18.4; 1.18.6;
Add COMPAT_BSDPTY to the rest of the config files.
 1.17 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.16 22-Sep-2003  cl branches: 1.16.2;
add COMPAT_15/COMPAT_16
 1.15 18-Sep-2002  lukem branches: 1.15.6;
enable USERCONF by default; it's small and extremely useful to have available.
 1.14 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.13 25-Apr-2002  atatat branches: 1.13.2; 1.13.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.12 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.11 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 27-Jul-2001  scw branches: 1.9.6;
memc attaches at mainbus now.
 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 10-Jun-2001  scw Enable DHCP and BOOTP as supported diskless NFS boot options.
 1.6 10-Jun-2001  scw Add rnd(4) pseudo-device.
 1.5 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.4 07-Dec-2000  scw branches: 1.4.2;
Add "options COMPAT_AOUT_M68K".
 1.3 25-Nov-2000  scw Add the memory controller ASIC driver.
 1.2 25-Nov-2000  scw Add CD9660, plus some general cleanup.
 1.1 06-Sep-2000  scw branches: 1.1.2; 1.1.4;
Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.1.4.3 08-Dec-2000  bouyer Sync with HEAD.
 1.1.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.1.4.1 06-Sep-2000  bouyer file VME162 was added on branch thorpej_scsipi on 2000-11-20 20:15:15 +0000
 1.1.2.2 17-Oct-2000  scw Pullup new file on the branch (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.1.2.1 06-Sep-2000  scw file VME162 was added on branch netbsd-1-5 on 2000-10-17 19:43:57 +0000
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.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.8.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.8.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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 03-Aug-2001  lukem update to -current
 1.9.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.9.6.5 20-Jun-2002  nathanw Catch up to -current.
 1.9.6.4 17-Apr-2002  nathanw Catch up to -current.
 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 27-Jul-2001  nathanw file VME162 was added on branch nathanw_sa on 2002-01-08 00:26:32 +0000
 1.13.4.1 01-Aug-2002  lukem Pull up revision 1.14 (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.13.2.1 14-Jul-2002  gehenna catch up with -current.
 1.15.6.8 11-Dec-2005  christos Sync with head.
 1.15.6.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.15.6.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.15.6.5 04-Feb-2005  skrll Sync with HEAD.
 1.15.6.4 14-Nov-2004  skrll Sync with HEAD.
 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.2.1 15-Jul-2004  he Pull up revision 1.17 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.18.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.18.6.1 12-Feb-2005  yamt sync with head.
 1.18.4.1 29-Apr-2005  kent sync with -current
 1.21.4.1 21-Jun-2006  yamt sync with head.
 1.24.6.1 22-Apr-2006  simonb Sync with head.
 1.24.4.1 09-Sep-2006  rpaulo sync with head
 1.24.2.1 18-Feb-2006  yamt sync with head.
 1.25.74.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.25.72.2 11-Aug-2010  yamt sync with head.
 1.25.72.1 04-May-2009  yamt sync with head.
 1.25.70.1 04-Jun-2008  yamt sync with head
 1.25.68.1 02-Jun-2008  mjf Sync with HEAD.
 1.26.20.1 30-May-2010  rmind sync with head
 1.26.18.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.28.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.28.2.1 17-Apr-2012  yamt sync with head
 1.29.8.3 03-Dec-2017  jdolecek update from HEAD
 1.29.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.8.1 23-Jun-2013  tls resync from head
 1.30.10.1 10-Aug-2014  tls Rebase.
 1.32.2.1 28-Aug-2017  skrll Sync with HEAD
 1.38 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.37 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 2.
 1.36 23-Aug-2014  dholland branches: 1.36.2;
Systematize (and in many cases, fix) the comments on options COMPAT_NN.

There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
 1.35 05-Jul-2014  tsutsui Use COPTS="-O2 -fno-reorder-blocks" as defined in sys.mk for userland.

Compile tests only.
 1.34 01-Mar-2013  joerg branches: 1.34.10;
Retire OSI network stack. OK core@
 1.33 22-Nov-2011  tls branches: 1.33.8;

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

This fixes build breaks on several ports. Thanks to Havard Eidnes for
pointing them out.
 1.32 30-Jun-2011  wiz branches: 1.32.2;
dependant -> dependent
 1.31 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.30 30-May-2008  tsutsui branches: 1.30.18; 1.30.20;
Add options COMPAT_40 to files which have options COMPAT_30.
 1.29 05-Feb-2006  cube branches: 1.29.68; 1.29.70; 1.29.72; 1.29.74;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.28 07-Dec-2005  tsutsui branches: 1.28.2; 1.28.4; 1.28.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.27 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.26 19-Aug-2005  christos 64 bit inode changes.
 1.25 25-Feb-2005  simonb branches: 1.25.4;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.24 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.23 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.22 10-Nov-2004  christos branches: 1.22.4; 1.22.6;
Add COMPAT_BSDPTY to the rest of the config files.
 1.21 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.20 22-Sep-2003  cl branches: 1.20.2;
add COMPAT_15/COMPAT_16
 1.19 18-Sep-2002  lukem branches: 1.19.6;
enable USERCONF by default; it's small and extremely useful to have available.
 1.18 17-Jun-2002  lukem Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
 1.17 25-Apr-2002  atatat branches: 1.17.2; 1.17.4;
Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.16 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.15 27-Jan-2002  jdolecek add options PIPE_SOCKETPAIR to individual kernel configs
the option is commented out on everything but kernels I was able
to recognize as INSTALL-like or ones for small memory machines
 1.14 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.13 27-Jul-2001  scw branches: 1.13.6;
memc attaches at mainbus now.
 1.12 08-Jul-2001  abs branches: 1.12.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.11 10-Jun-2001  scw Enable DHCP and BOOTP as supported diskless NFS boot options.
 1.10 10-Jun-2001  scw Add rnd(4) pseudo-device.
 1.9 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.8 07-Dec-2000  scw branches: 1.8.2;
Add "options COMPAT_AOUT_M68K".
 1.7 25-Nov-2000  scw Add the memory controller ASIC driver.
 1.6 25-Nov-2000  scw Add CD9660, plus some general cleanup.
 1.5 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.4 29-Jul-1999  augustss branches: 1.4.2; 1.4.10;
It's time to be COMPAT_14.
 1.3 20-Feb-1999  scw branches: 1.3.4;
Add entries for SCSI and VME. While I'm here, bump maxusers to 16,
and enable a couple of other things which weren't useful in the
early days of development.
 1.2 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file VME167 was initially added on branch scw-mvme167.
 1.1.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.3.4.1 02-Aug-1999  thorpej Update from trunk.
 1.4.10.2 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.4.10.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.4.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.4.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.8.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.12.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.12.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.12.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.12.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.12.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.2.1 03-Aug-2001  lukem update to -current
 1.13.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.13.6.5 20-Jun-2002  nathanw Catch up to -current.
 1.13.6.4 17-Apr-2002  nathanw Catch up to -current.
 1.13.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.13.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.13.6.1 27-Jul-2001  nathanw file VME167 was added on branch nathanw_sa on 2002-01-08 00:26:32 +0000
 1.17.4.1 01-Aug-2002  lukem Pull up revision 1.18 (requested by lukem in ticket #312):
Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
 1.17.2.1 14-Jul-2002  gehenna catch up with -current.
 1.19.6.8 11-Dec-2005  christos Sync with head.
 1.19.6.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.6.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.19.6.5 04-Feb-2005  skrll Sync with HEAD.
 1.19.6.4 14-Nov-2004  skrll Sync with HEAD.
 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.2.1 15-Jul-2004  he Pull up revision 1.21 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.22.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.22.6.1 12-Feb-2005  yamt sync with head.
 1.22.4.1 29-Apr-2005  kent sync with -current
 1.25.4.1 21-Jun-2006  yamt sync with head.
 1.28.6.1 22-Apr-2006  simonb Sync with head.
 1.28.4.1 09-Sep-2006  rpaulo sync with head
 1.28.2.1 18-Feb-2006  yamt sync with head.
 1.29.74.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.29.72.2 11-Aug-2010  yamt sync with head.
 1.29.72.1 04-May-2009  yamt sync with head.
 1.29.70.1 04-Jun-2008  yamt sync with head
 1.29.68.1 02-Jun-2008  mjf Sync with HEAD.
 1.30.20.1 30-May-2010  rmind sync with head
 1.30.18.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.32.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.32.2.1 17-Apr-2012  yamt sync with head
 1.33.8.3 03-Dec-2017  jdolecek update from HEAD
 1.33.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.33.8.1 23-Jun-2013  tls resync from head
 1.34.10.1 10-Aug-2014  tls Rebase.
 1.36.2.1 28-Aug-2017  skrll Sync with HEAD
 1.34 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.33 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 2.
 1.32 23-Aug-2014  dholland branches: 1.32.2;
Systematize (and in many cases, fix) the comments on options COMPAT_NN.

There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
 1.31 05-Jul-2014  tsutsui Use COPTS="-O2 -fno-reorder-blocks" as defined in sys.mk for userland.

Compile tests only.
 1.30 01-Mar-2013  joerg branches: 1.30.10;
Retire OSI network stack. OK core@
 1.29 22-Nov-2011  tls branches: 1.29.8;

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

This fixes build breaks on several ports. Thanks to Havard Eidnes for
pointing them out.
 1.28 30-Jun-2011  wiz branches: 1.28.2;
dependant -> dependent
 1.27 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.26 30-May-2008  tsutsui branches: 1.26.18; 1.26.20;
Add options COMPAT_40 to files which have options COMPAT_30.
 1.25 05-Feb-2006  cube branches: 1.25.68; 1.25.70; 1.25.72; 1.25.74;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.24 07-Dec-2005  tsutsui branches: 1.24.2; 1.24.4; 1.24.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.23 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.22 19-Aug-2005  christos 64 bit inode changes.
 1.21 25-Feb-2005  simonb branches: 1.21.4;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.20 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.19 31-Jan-2005  hannken Add file system snapshots to kernel configs.

- Ffs internal snapshots get compiled in unconditionally.

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

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
 1.18 10-Nov-2004  christos branches: 1.18.4; 1.18.6;
Add COMPAT_BSDPTY to the rest of the config files.
 1.17 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.16 22-Sep-2003  cl branches: 1.16.2;
add COMPAT_15/COMPAT_16
 1.15 18-Sep-2002  lukem branches: 1.15.6;
enable USERCONF by default; it's small and extremely useful to have available.
 1.14 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.13 25-Apr-2002  atatat branches: 1.13.2; 1.13.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.12 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.11 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 27-Jul-2001  scw branches: 1.9.6;
memc attaches at mainbus now.
 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 10-Jun-2001  scw Enable DHCP and BOOTP as supported diskless NFS boot options.
 1.6 10-Jun-2001  scw Add rnd(4) pseudo-device.
 1.5 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.4 07-Dec-2000  scw branches: 1.4.2;
Add "options COMPAT_AOUT_M68K".
 1.3 25-Nov-2000  scw Add the memory controller ASIC driver.
 1.2 25-Nov-2000  scw Add CD9660, plus some general cleanup.
 1.1 20-Nov-2000  scw branches: 1.1.2;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.1.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 20-Nov-2000  bouyer file VME172 was added on branch thorpej_scsipi on 2000-11-22 16:00:49 +0000
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.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.8.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.8.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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 03-Aug-2001  lukem update to -current
 1.9.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.9.6.5 20-Jun-2002  nathanw Catch up to -current.
 1.9.6.4 17-Apr-2002  nathanw Catch up to -current.
 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 27-Jul-2001  nathanw file VME172 was added on branch nathanw_sa on 2002-01-08 00:26:32 +0000
 1.13.4.1 01-Aug-2002  lukem Pull up revision 1.14 (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.13.2.1 14-Jul-2002  gehenna catch up with -current.
 1.15.6.8 11-Dec-2005  christos Sync with head.
 1.15.6.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.15.6.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.15.6.5 04-Feb-2005  skrll Sync with HEAD.
 1.15.6.4 14-Nov-2004  skrll Sync with HEAD.
 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.2.1 15-Jul-2004  he Pull up revision 1.17 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.18.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.18.6.1 12-Feb-2005  yamt sync with head.
 1.18.4.1 29-Apr-2005  kent sync with -current
 1.21.4.1 21-Jun-2006  yamt sync with head.
 1.24.6.1 22-Apr-2006  simonb Sync with head.
 1.24.4.1 09-Sep-2006  rpaulo sync with head
 1.24.2.1 18-Feb-2006  yamt sync with head.
 1.25.74.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.25.72.2 11-Aug-2010  yamt sync with head.
 1.25.72.1 04-May-2009  yamt sync with head.
 1.25.70.1 04-Jun-2008  yamt sync with head
 1.25.68.1 02-Jun-2008  mjf Sync with HEAD.
 1.26.20.1 30-May-2010  rmind sync with head
 1.26.18.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.28.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.28.2.1 17-Apr-2012  yamt sync with head
 1.29.8.3 03-Dec-2017  jdolecek update from HEAD
 1.29.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.8.1 23-Jun-2013  tls resync from head
 1.30.10.1 10-Aug-2014  tls Rebase.
 1.32.2.1 28-Aug-2017  skrll Sync with HEAD
 1.36 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.35 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 2.
 1.34 23-Aug-2014  dholland branches: 1.34.2;
Systematize (and in many cases, fix) the comments on options COMPAT_NN.

There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
 1.33 05-Jul-2014  tsutsui Use COPTS="-O2 -fno-reorder-blocks" as defined in sys.mk for userland.

Compile tests only.
 1.32 01-Mar-2013  joerg branches: 1.32.10;
Retire OSI network stack. OK core@
 1.31 22-Nov-2011  tls branches: 1.31.8;

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

This fixes build breaks on several ports. Thanks to Havard Eidnes for
pointing them out.
 1.30 30-Jun-2011  wiz branches: 1.30.2;
dependant -> dependent
 1.29 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.28 30-May-2008  tsutsui branches: 1.28.18; 1.28.20;
Add options COMPAT_40 to files which have options COMPAT_30.
 1.27 17-Apr-2006  he branches: 1.27.62; 1.27.64; 1.27.66; 1.27.68;
It's NULLFS, not NULL.
 1.26 15-Apr-2006  matt Add ksyms
Add file-systems for NULL & TMPFS
 1.25 05-Feb-2006  cube branches: 1.25.2; 1.25.4; 1.25.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.24 07-Dec-2005  tsutsui branches: 1.24.2; 1.24.4; 1.24.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.23 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.22 19-Aug-2005  christos 64 bit inode changes.
 1.21 25-Feb-2005  simonb branches: 1.21.4;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.20 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.19 31-Jan-2005  hannken Add file system snapshots to kernel configs.

- Ffs internal snapshots get compiled in unconditionally.

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

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
 1.18 10-Nov-2004  christos branches: 1.18.4; 1.18.6;
Add COMPAT_BSDPTY to the rest of the config files.
 1.17 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.16 22-Sep-2003  cl branches: 1.16.2;
add COMPAT_15/COMPAT_16
 1.15 18-Sep-2002  lukem branches: 1.15.6;
enable USERCONF by default; it's small and extremely useful to have available.
 1.14 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.13 25-Apr-2002  atatat branches: 1.13.2; 1.13.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.12 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.11 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 27-Jul-2001  scw branches: 1.9.6;
memc attaches at mainbus now.
 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 10-Jun-2001  scw Enable DHCP and BOOTP as supported diskless NFS boot options.
 1.6 10-Jun-2001  scw Add rnd(4) pseudo-device.
 1.5 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.4 07-Dec-2000  scw branches: 1.4.2;
Add "options COMPAT_AOUT_M68K".
 1.3 25-Nov-2000  scw Add the memory controller ASIC driver.
 1.2 25-Nov-2000  scw Add CD9660, plus some general cleanup.
 1.1 20-Nov-2000  scw branches: 1.1.2;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.1.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 20-Nov-2000  bouyer file VME177 was added on branch thorpej_scsipi on 2000-11-22 16:00:49 +0000
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.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.8.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.8.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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 03-Aug-2001  lukem update to -current
 1.9.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.9.6.5 20-Jun-2002  nathanw Catch up to -current.
 1.9.6.4 17-Apr-2002  nathanw Catch up to -current.
 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 27-Jul-2001  nathanw file VME177 was added on branch nathanw_sa on 2002-01-08 00:26:32 +0000
 1.13.4.1 01-Aug-2002  lukem Pull up revision 1.14 (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.13.2.1 14-Jul-2002  gehenna catch up with -current.
 1.15.6.8 11-Dec-2005  christos Sync with head.
 1.15.6.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.15.6.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.15.6.5 04-Feb-2005  skrll Sync with HEAD.
 1.15.6.4 14-Nov-2004  skrll Sync with HEAD.
 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.2.1 15-Jul-2004  he Pull up revision 1.17 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.18.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.18.6.1 12-Feb-2005  yamt sync with head.
 1.18.4.1 29-Apr-2005  kent sync with -current
 1.21.4.1 21-Jun-2006  yamt sync with head.
 1.24.6.1 22-Apr-2006  simonb Sync with head.
 1.24.4.1 09-Sep-2006  rpaulo sync with head
 1.24.2.1 18-Feb-2006  yamt sync with head.
 1.25.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.25.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.25.2.1 24-May-2006  yamt sync with head.
 1.27.68.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.27.66.2 11-Aug-2010  yamt sync with head.
 1.27.66.1 04-May-2009  yamt sync with head.
 1.27.64.1 04-Jun-2008  yamt sync with head
 1.27.62.1 02-Jun-2008  mjf Sync with HEAD.
 1.28.20.1 30-May-2010  rmind sync with head
 1.28.18.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.30.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.30.2.1 17-Apr-2012  yamt sync with head
 1.31.8.3 03-Dec-2017  jdolecek update from HEAD
 1.31.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.31.8.1 23-Jun-2013  tls resync from head
 1.32.10.1 10-Aug-2014  tls Rebase.
 1.34.2.1 28-Aug-2017  skrll Sync with HEAD
 1.69 18-Jan-2024  thorpej Don't put the MVME1xx model defines into IDENT, make them defflag options and
put them in opt_mvmeconf.h. Make these options depend on the appropriate
M680x0 option (MVME147 -> M68030, MVME16[27] -> M68040, MVME17[27] -> M68060)
so that the CPU option appears correctly in opt_m68k_arch.h.
 1.68 16-Jan-2024  thorpej Switch mvme68k over to the common interrupt dispatch code and G/C
__HAVE_LEGACY_INTRCNT.
 1.67 13-Jan-2024  thorpej Switch mvme68k to the common m68k vector table.
 1.66 09-Jan-2024  thorpej Remove duplicated / slightly-tweaked loadustp() (load user segment table)
routines from all of the m68k ports using the shared pmap. Instead, in
pmap_init(), set up a function pointer to the appropriate mmu_load_urp*()
function in mmu_subr.s.
 1.65 30-Sep-2023  andvar Improve kgdb build for mvme68k:
* include sys/kgdb.h in mvme68k/trap.c for missing definitions.
* cast second kgdb_trap argument to (db_regs_t *).
* build m68k/kgdb_machdep.c in kgdb enable build for kgdb_trap() implementation.

KGDB build still fails, apparently due to missing zs_kgdb.c implementation.
 1.64 18-Feb-2019  thorpej Refactor the 68040 writeback() from each m68k port's trap handler into a
shared copy: m68040_writeback(). It is essentially a copy of the Atari
version, with some minor cosmetic tweaks and one small performance optimization
from the mvme68k port.

Tested by rjs@ on a Quadra 950. (Thanks!)
 1.63 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.62 12-Jun-2011  rmind branches: 1.62.52; 1.62.54;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

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

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

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

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

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

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.61 03-Dec-2007  ad branches: 1.61.40; 1.61.50;
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.60 11-Dec-2005  christos branches: 1.60.30; 1.60.48; 1.60.50; 1.60.56;
merge ktrace-lwp.
 1.59 14-Nov-2004  christos branches: 1.59.12;
Use common procfs_machdep.c
 1.58 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.57 28-Jun-2003  he branches: 1.57.2;
Defflag PANICBUTTON now that machdep.c includes opt_panicbutton.h.
 1.56 05-Nov-2002  chs merge pmap.c for all 4k-page motorola-MMU (or compatible) m68k platforms.
 1.55 03-Nov-2002  chs use a merged sys_machdep.c for all the motorola-MMU m68k platforms.
 1.54 02-Nov-2002  chs enhance the common m68k db_memrw.c to handle read-only kernel text
and switch all the motorola-MMU m68k platforms to use it.
 1.53 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.52 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.51 24-Mar-2002  scw branches: 1.51.2;
Build the 68k-specific vmetwo stub (albeit a cut down version), even
if vmetwo isn't in the config file.
 1.50 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.49 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.48 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.47 12-Aug-2001  scw branches: 1.47.6;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.46 27-Jul-2001  scw memc attaches at mainbus now.
 1.45 06-Jul-2001  scw branches: 1.45.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.44 18-Jun-2001  christos Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.
 1.43 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.42 17-Jan-2001  fvdl branches: 1.42.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.41 03-Dec-2000  scw Include the a.out m68k compatibility module.
 1.40 03-Dec-2000  scw Back out the previous change after discussion with thorpej and cgd.
 1.39 30-Nov-2000  scw Only try to attach those devices which have been configured
in the kernel config file.
 1.38 24-Nov-2000  scw First cut of a driver for the Memory Controller ASICs found
on mvme16x and mvme17x boards.
 1.37 24-Nov-2000  scw Use the MI md_root.c.
 1.36 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.35 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.34 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.33 20-Jul-2000  scw Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.32 21-Apr-2000  bouyer branches: 1.32.4;
Rename define 'siop' to 'msiop' to avoid clash with machine-indepndant siop
driver. Doesn't change the name of drivers in config files.
 1.31 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.30 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.29 18-Sep-1999  scw branches: 1.29.2; 1.29.10;
Make the sd, cd and md major numbers match reallity.
 1.28 09-Jul-1999  thorpej Normalize include paths.
 1.27 07-Jun-1999  thorpej Only declare block major numbers for devices which can be the root device.
 1.26 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.25 16-Apr-1999  kleink Normalize path of files.sunos.
 1.24 20-Feb-1999  scw branches: 1.24.4;
Forgot to commit this one; added SCSI and VME drivers.
 1.23 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.22 15-Dec-1998  itohy branches: 1.22.2;
Added COMPAT_LINUX support.
 1.21 21-Jul-1998  drochner adapt to LANCE driver split
 1.20 31-May-1998  thorpej Build pmap_boostrap.o without profiling; we can't call mcount before the
mmu is enabled!
 1.19 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.18 01-Feb-1998  is Amiga uses the common m68k/sig_machdep.c now. Also moved its definition from
the other 68k ports' files.${port} to arch/m68k/conf/files.m68k.
 1.17 12-Jan-1998  thorpej Update for changes to config.
 1.16 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.15 09-Apr-1997  thorpej branches: 1.15.2; 1.15.4;
Remove redundant file directives.
 1.14 18-Mar-1997  thorpej Use our own db_memrw.c
 1.13 17-Mar-1997  gwr Add m68k/sig_machdep.c
 1.12 17-Mar-1997  gwr Separate bcopy and copypage stuff from copy.s
 1.11 21-Jan-1997  thorpej "md" is declared in sys/conf/files, now.
 1.10 28-Dec-1996  pk rename: ramdisk => md
 1.9 09-Nov-1996  chuck - new lpt driver, contributed by Steve Woodford <steve@mctavish.demon.co.uk>
- added 1.1 and 1.2 compat to VME147 config file
 1.8 12-Aug-1996  mycroft Remove the only use of `config-dependent', as it isn't actually needed.
 1.7 20-May-1996  chuck add "rd" ram-disk config
 1.6 16-May-1996  thorpej Remove duplicate definitions of the "le" device .. "oops"
 1.5 26-Apr-1996  chuck - sync with new autoconfig code (iio goes away)
- add support for zs1, vme devices (untested)

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.4 18-Apr-1996  chuck add wdsc device
 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 22-Feb-1996  gwr Add m68k/db_memrw.c
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.15.4.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.15.2.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.22.2.3 14-Feb-1999  scw m68k/m68k/cacheops.c needed for building mixed 030/040 kernels.
 1.22.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.22.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.24.4.2 02-Aug-1999  thorpej Update from trunk.
 1.24.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.29.10.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.29.10.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.29.2.4 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.29.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.29.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.29.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.32.4.2 17-Oct-2000  scw Pullup 1.34 - 1.35 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.32.4.1 22-Jul-2000  scw Pullup from trunk: 1.33
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.42.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.45.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.45.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.45.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.45.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.45.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.45.2.1 03-Aug-2001  lukem update to -current
 1.47.6.6 11-Nov-2002  nathanw Catch up to -current
 1.47.6.5 17-Sep-2002  nathanw Catch up to -current.
 1.47.6.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.47.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.47.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.47.6.1 12-Aug-2001  nathanw file files.mvme68k was added on branch nathanw_sa on 2002-01-08 00:26:32 +0000
 1.51.2.2 17-May-2002  gehenna Remove old block majors list.
 1.51.2.1 16-May-2002  gehenna Include the list of block/character major numbers.
 1.57.2.4 29-Nov-2004  skrll Sync with HEAD.
 1.57.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.57.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.57.2.1 03-Aug-2004  skrll Sync with HEAD
 1.59.12.1 07-Dec-2007  yamt sync with head
 1.60.56.1 08-Dec-2007  mjf Sync with HEAD.
 1.60.50.1 09-Jan-2008  matt sync with HEAD
 1.60.48.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.60.30.1 03-Dec-2007  ad Sync with HEAD.
 1.61.50.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.61.40.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.62.54.1 10-Jun-2019  christos Sync with HEAD
 1.62.52.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.23 04-Apr-2020  jdolecek mark nsmb major obsolete
 1.22 28-Jan-2019  dholland Systematize handling of removed drivers.

- Every driver that was removed and whose number hasn't already been
reused is now listed with a commented-out "obsolete" line.
- The format of these has been systematized. Future format changes can
probably be safely done with a script.
- This does not include a few cases of assignments that only lasted a
couple days, or stuff from before major reorgs. Some of these may
be included nonetheless, because there was a lot of ground to cover
and therefore not a lot of time to dig into history in detail.

Note that the obsolete listings do not mean the major numbers can
never be reused; that's up to portmasters and/or core. It does mean
that they won't be reused by accident, however, which in some cases
(depending on the driver, how widely used it was, its family of device
nodes, their default permissions, etc.) can be quite dangerous.

Note that some of the things now explicitly listed as obsolete are
really ancient history. My scan went back as far as when the majors
files were added. (But not before that.)
 1.21 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.20 30-Jun-2011  wiz branches: 1.20.52; 1.20.54;
dependant -> dependent
 1.19 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.18 31-Dec-2007  ad branches: 1.18.6; 1.18.10; 1.18.16; 1.18.18;
Remove systrace. Ok core@.
 1.17 24-Nov-2006  wiz branches: 1.17.28; 1.17.34; 1.17.42;
s/independant/independent/, from Zafer.
 1.16 11-Dec-2005  christos branches: 1.16.20; 1.16.22;
merge ktrace-lwp.
 1.15 17-Sep-2005  yamt make VMSWAP optional again.
 1.14 31-Jul-2005  yamt revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
 1.13 30-Jul-2005  yamt defflag VMSWAP.
 1.12 10-May-2005  jdolecek branches: 1.12.2;
assign major for nsmb(4)
 1.11 10-Dec-2003  jmc Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
 1.10 24-Oct-2003  jdolecek add major for 'ses' for archs which have the other scsi devices
 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.mvme68k was initially added on branch gehenna-devsw.
 1.1.2.3 14-Jul-2002  gehenna catch up with -current.
 1.1.2.2 30-May-2002  gehenna Add $NetBSD$
 1.1.2.1 16-May-2002  gehenna Add the list of block/character majors.
 1.2.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.2.2.1 06-Sep-2002  nathanw file majors.mvme68k was added on branch nathanw_sa on 2002-09-17 21:16:03 +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.mvme68k was added on branch kqueue on 2002-10-10 18:34:17 +0000
 1.4.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.2.3 21-Jan-2008  yamt sync with head
 1.12.2.2 30-Dec-2006  yamt sync with head.
 1.12.2.1 21-Jun-2006  yamt sync with head.
 1.16.22.1 10-Dec-2006  yamt sync with head.
 1.16.20.1 12-Jan-2007  ad Sync with head.
 1.17.42.1 02-Jan-2008  bouyer Sync with HEAD
 1.17.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.17.28.1 09-Jan-2008  matt sync with HEAD
 1.18.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.18.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.18.10.1 04-May-2009  yamt sync with head.
 1.18.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.20.54.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.20.54.1 10-Jun-2019  christos Sync with HEAD
 1.20.52.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.14 19-Sep-2010  tsutsui - add m68k/conf/std.m68k, which includes common standard options for m68k,
options EXEC_ELF32, EXEC_SCRIPTS, and CPU_IN_CKSUM for md cpu_in_cksum.c
- make all m68k ports include common arch/m68k/conf/std.m68k
from MD std.${MACHINE}
 1.13 11-Dec-2005  christos branches: 1.13.78; 1.13.98; 1.13.100;
merge ktrace-lwp.
 1.12 17-Sep-2005  yamt include "conf/std".
 1.11 30-Jan-2004  he branches: 1.11.16;
Omit declaration of "device lpt" in files.mvme; this is now done by
the recently introduced files.ppbus.
Also, let the mvme68k port use it's own lpt implementation for now,
so define USE_ALT_LPT option in std.memv68k.
This makes the mvme68k kernels configure and build again.
 1.10 12-Aug-2001  scw branches: 1.10.6; 1.10.22;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.9 30-Nov-2000  scw branches: 1.9.4;
Add EXEC_ELF32
 1.8 22-Jun-2000  fvdl Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC.
 1.7 15-Nov-1999  fvdl branches: 1.7.6;
Add

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

to all std.* files, so that soft dependencies can be activated using
"options SOFTDEP".
 1.6 12-Sep-1999  chs branches: 1.6.2; 1.6.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.5 24-Mar-1999  mrg clean up kernel/config files files for machVM lossage.
 1.4 04-May-1998  thorpej Switch to UVM.
 1.3 12-Oct-1997  scw Move MACHINE_NONCONTIG from std.mvme68k to <machine/vmparam.h> as per
Jason's request.
 1.2 09-Oct-1997  scw Added support for VMEbus RAM cards via MACHINE_NONCONTIG.
The kernel should still compile and run without it, but I've
put the config option in std.mvme68k so it's built like this
as standard.
 1.1 18-Mar-1997  thorpej branches: 1.1.4;
Use std.mvme68k, which contains non-optional "options" (a'la other ports).
 1.1.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.6.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.6.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.6.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.9.4.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.10.22.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.22.1 03-Aug-2004  skrll Sync with HEAD
 1.10.6.2 12-Aug-2001  scw Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.10.6.1 12-Aug-2001  scw file std.mvme68k was added on branch nathanw_sa on 2001-08-12 18:33:13 +0000
 1.11.16.1 21-Jun-2006  yamt sync with head.
 1.13.100.1 05-Mar-2011  rmind sync with head
 1.13.98.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.13.78.1 09-Oct-2010  yamt sync with head
 1.8 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.7 31-May-2001  scw branches: 1.7.2; 1.7.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.6 24-Nov-2000  scw branches: 1.6.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.5 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.4 20-Jul-2000  scw Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.3 18-Mar-2000  scw branches: 1.3.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 13-Feb-1999  scw branches: 1.1.2;
file clmpcc_pcctwo.c was initially added on branch scw-mvme167.
 1.1.2.1 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.2.16.3 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.2.16.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.4.2 17-Oct-2000  scw Pullup 1.4 - 1.5 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.3.4.1 22-Jul-2000  scw Pullup from trunk: 1.4
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.6.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.7.8.1 31-May-2001  nathanw file clmpcc_pcctwo.c was added on branch nathanw_sa on 2002-02-28 04:10:49 +0000
 1.7.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.20 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.19 28-Apr-2008  martin branches: 1.19.34; 1.19.44;
Remove clause 3 and 4 from TNF licenses
 1.18 12-Jan-2008  tsutsui branches: 1.18.6; 1.18.8; 1.18.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.17 07-Jan-2008  tsutsui Add timecounter(9) support for mvme68k.

Based on a patch from Garrett D'Amore and several tweaks by me.
Compile tested only, but reviewed by joerg@ and
no objection from scw@ on port-mvme68k.
 1.16 11-Dec-2005  christos branches: 1.16.50; 1.16.56; 1.16.64;
merge ktrace-lwp.
 1.15 03-Jun-2005  scw branches: 1.15.2;
Placate -Wshadow
 1.14 15-Jul-2003  lukem __KERNEL_RCSID()
 1.13 02-Oct-2002  thorpej branches: 1.13.6;
Use CFATTACH_DECL().
 1.12 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.11 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.10 12-Aug-2001  scw branches: 1.10.6;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.9 06-Jul-2001  scw branches: 1.9.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.8 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.7 14-Apr-2001  scw Implement a real microtime() by reading the timer counter register.
On mvme147 this gives 6.25uS resolution, and 1uS on all other boards.
 1.6 18-Mar-2000  scw branches: 1.6.6;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.5 12-Jan-1998  thorpej branches: 1.5.16; 1.5.24;
Update for changes to config.
 1.4 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.3 19-Mar-1997  gwr branches: 1.3.4;
Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.2 12-Sep-1996  thorpej Grab the stat clock stuff from the SPARC port, and glue it to the
second timer on the PCC.
 1.1 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.3.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.24.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.5.24.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.5.16.2 21-Apr-2001  bouyer Sync with HEAD
 1.5.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.6.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.9.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.10.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.10.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.10.6.1 12-Aug-2001  nathanw file clock_pcc.c was added on branch nathanw_sa on 2002-02-28 04:10:49 +0000
 1.13.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.13.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.6.1 03-Aug-2004  skrll Sync with HEAD
 1.15.2.1 21-Jan-2008  yamt sync with head
 1.16.64.2 19-Jan-2008  bouyer Sync with HEAD
 1.16.64.1 08-Jan-2008  bouyer Sync with HEAD
 1.16.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.16.50.2 23-Mar-2008  matt sync with HEAD
 1.16.50.1 09-Jan-2008  matt sync with HEAD
 1.18.10.1 16-May-2008  yamt sync with head.
 1.18.8.1 18-May-2008  yamt sync with head.
 1.18.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.19.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.34.1 30-Oct-2012  yamt sync with head
 1.9 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.8 12-Aug-2001  scw branches: 1.8.6;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.7 06-Jul-2001  scw branches: 1.7.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.6 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.5 14-Apr-2001  scw Implement a real microtime() by reading the timer counter register.
On mvme147 this gives 6.25uS resolution, and 1uS on all other boards.
 1.4 06-Sep-2000  scw branches: 1.4.2;
Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.3 18-Mar-2000  scw branches: 1.3.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file clock_pcctwo.c was initially added on branch scw-mvme167.
 1.1.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.16.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.8.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.4.1 17-Oct-2000  scw Pullup 1.3 - 1.4 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.7.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.8.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.8.6.1 12-Aug-2001  nathanw file clock_pcctwo.c was added on branch nathanw_sa on 2002-02-28 04:10:49 +0000
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 18-Apr-1996  chuck branches: 1.1.68;
new driver: SCSI for VME147
contributed by: Steve Woodford <steve@mctavish.demon.co.uk>

this driver is based on the amiga sbic/33C93 driver. Steve has
cleaned it up and fixed lots of bugs. Note that the original driver
used features which require at least a WD33C93A (the vme147 has the
original WD33C93 chip <no 'A' suffix>). Steve has also written
the DMA routines for the 147 to get things really going. Hardware
scatter-gather DMA and sync. SCSI are not supported (yet). tested
on several disk drives and a tape drive. CD-ROM untested, but
should work.
 1.1.68.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.68.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.68.1 03-Aug-2004  skrll Sync with HEAD
 1.14 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.13 26-Nov-2001  fredette Added macros for the bits in the SYSBUS byte, and macros
for the i82596 PORT access interface, from the documentation
for that chip. These help clarify writes to the SYSBUS
part of the SCP, and PORT usage by i82596-aware drivers.
 1.12 07-Jul-2001  scw branches: 1.12.2; 1.12.8;
bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
 1.11 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.10 11-Mar-2001  scw Make this compile again; chan_attn() prototype has changed.
 1.9 22-Jan-2001  bjh21 branches: 1.9.2;
Patch from PR kern/8001, submitted by Rafal Boni.

This adds support for EtherExpress/16 cards with 16k of RAM, and in the
process adds general support for PIO mode on these cards. This entails
changing the way the i82586 driver handles bus barriers, since it doesn't
allow for strange cases like this.

This has been tested on the i386 port with the 'ix' driver in both
16KB (which was the source of the problem) and 32KB modes, as well
as with the 'ef' driver. I've tested it (briefly) with 'ei' on arm26
as well. In theory, drivers other than 'ix' should follow precisely the
same code paths as before.
 1.8 15-Sep-2000  scw Use the complete ethernet address stored in nvram on mvme162/mvme167
instead of faking the first 5 nibbles a'la mvme147.

Apparently recent mvme16x boards have a new 5 nibble prefix...
 1.7 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.6 25-Jul-2000  scw Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER.
 1.5 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.4 18-Mar-2000  scw branches: 1.4.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 08-Jul-1999  thorpej branches: 1.3.2; 1.3.10;
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.2 14-Feb-1999  scw branches: 1.2.4;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file if_ie.c was initially added on branch scw-mvme167.
 1.1.2.4 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.3 31-Jan-1999  scw Add mvme68k/machdep.h and start populating with external
declarations for a couple of mvme68k globals.
Include the above file where necessary.
 1.1.2.2 31-Jan-1999  scw Make the ethernet packet buffer shared between the Lance and i82596
drivers.

While I'm here, make the packet buffer size adjustable, either with
a config file option or by patching a variable. Make sure to mark all
packet buffer pages as non-cacheable.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.4.1 02-Aug-1999  thorpej Update from trunk.
 1.3.10.5 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.3.10.4 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.3.10.3 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.3.10.2 13-Mar-2000  scw Add constraints for bus_dmamem_map() to allow allocation from onboard
RAM only, and/or restricting physical addresses to 24-bits.

Also make bus_dmamem_map() actually honour the BUS_DMA_COHERENT flag.
 1.3.10.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.3.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.3.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.3.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested 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.4.1 17-Oct-2000  scw Pullup 1.6 - 1.8 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.9.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.9.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.12.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.12.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.12.8.1 07-Jul-2001  nathanw file if_ie.c was added on branch nathanw_sa on 2002-01-08 00:26:33 +0000
 1.12.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.12.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.4 26-Nov-2001  fredette Added macros for the bits in the SYSBUS byte, and macros
for the i82596 PORT access interface, from the documentation
for that chip. These help clarify writes to the SYSBUS
part of the SCP, and PORT usage by i82596-aware drivers.
 1.3 18-Mar-2000  scw branches: 1.3.8; 1.3.12;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 13-Feb-1999  scw branches: 1.1.2;
file if_iereg.h was initially added on branch scw-mvme167.
 1.1.2.1 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 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.12.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.12.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.3.8.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.37 29-May-2022  rin le(4): Fix resource leaks for error paths.

XXX
Compile test only (at least one arch per driver).
 1.36 19-Jan-2010  pooka Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.35 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.34 04-Apr-2008  tsutsui branches: 1.34.2; 1.34.4;
Split device_t/softc for le(4) and variants and misc cosmetic changes.
 1.33 12-Jan-2008  tsutsui branches: 1.33.6;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.32 04-Mar-2007  christos branches: 1.32.20; 1.32.26; 1.32.32;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.31 11-Dec-2005  christos branches: 1.31.26;
merge ktrace-lwp.
 1.30 07-Aug-2003  agc branches: 1.30.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.29 15-Jul-2003  lukem __KERNEL_RCSID()
 1.28 02-Apr-2003  thorpej branches: 1.28.2;
Use PAGE_SIZE rather than NBPG.
 1.27 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.26 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.25 31-May-2001  scw branches: 1.25.2; 1.25.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.24 30-May-2001  mrg use _KERNEL_OPT
 1.23 15-Sep-2000  scw branches: 1.23.2;
Use the complete ethernet address stored in nvram on mvme162/mvme167
instead of faking the first 5 nibbles a'la mvme147.

Apparently recent mvme16x boards have a new 5 nibble prefix...
 1.22 25-Jul-2000  scw Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER.
 1.21 18-Mar-2000  scw branches: 1.21.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.20 14-Feb-1999  scw branches: 1.20.8; 1.20.16;
Merge support for mvme167 into main tree.
 1.19 22-Aug-1998  scw branches: 1.19.6;
vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.18 15-Aug-1998  mycroft Assign my copyrights to TNF.
 1.17 21-Jul-1998  drochner adapt to LANCE driver split
 1.16 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.15 12-Jan-1998  thorpej Update for changes to config.
 1.14 19-Mar-1997  gwr Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.13 17-Mar-1997  thorpej #include <net/if_media.h>
 1.12 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.11 31-Jan-1997  thorpej branches: 1.11.4;
bootdv -> booted_device
 1.10 29-May-1996  chuck branches: 1.10.2;
detect if we are the boot device (to fix generic kernel)
 1.9 08-May-1996  thorpej branches: 1.9.4;
RCS id police.
 1.8 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.7 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.6 22-Apr-1996  christos Add a hardware dependent initialization function lehwinit()
 1.5 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.4 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.3 03-Feb-1996  mycroft Make sure to pull in the MI code.
 1.2 11-Dec-1995  mycroft Use the MI LANCE code.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.9.4.1 29-May-1996  chuck import generic boot bug fix
 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.11.4.2 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.11.4.1 05-Mar-1997  is Change to new ARP code.
 1.19.6.2 31-Jan-1999  scw Add mvme68k/machdep.h and start populating with external
declarations for a couple of mvme68k globals.
Include the above file where necessary.
 1.19.6.1 31-Jan-1999  scw Make the ethernet packet buffer shared between the Lance and i82596
drivers.

While I'm here, make the packet buffer size adjustable, either with
a config file option or by patching a variable. Make sure to mark all
packet buffer pages as non-cacheable.
 1.20.16.3 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.20.16.2 13-Mar-2000  scw Add constraints for bus_dmamem_map() to allow allocation from onboard
RAM only, and/or restricting physical addresses to 24-bits.

Also make bus_dmamem_map() actually honour the BUS_DMA_COHERENT flag.
 1.20.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.20.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.21.4.1 17-Oct-2000  scw Pullup 1.22 - 1.23 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.23.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.25.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.25.8.1 31-May-2001  nathanw file if_le.c was added on branch nathanw_sa on 2002-10-18 02:38:57 +0000
 1.25.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.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.30.16.2 21-Jan-2008  yamt sync with head
 1.30.16.1 03-Sep-2007  yamt sync with head.
 1.31.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.32.32.1 19-Jan-2008  bouyer Sync with HEAD
 1.32.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.32.20.1 23-Mar-2008  matt sync with HEAD
 1.33.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.34.4.2 11-Mar-2010  yamt sync with head
 1.34.4.1 16-May-2008  yamt sync with head.
 1.34.2.1 18-May-2008  yamt sync with head.
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.4 18-Mar-2000  scw branches: 1.4.28;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 08-May-1996  thorpej branches: 1.3.32; 1.3.40;
RCS id police.
 1.2 11-Dec-1995  mycroft Use the MI LANCE code.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.3.40.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 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.28.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.28.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.28.1 03-Aug-2004  skrll Sync with HEAD
 1.8 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.7 11-Dec-2005  christos branches: 1.7.74; 1.7.76; 1.7.78;
merge ktrace-lwp.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.5 31-May-2001  scw branches: 1.5.8; 1.5.24;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.4 18-Mar-2000  scw branches: 1.4.6;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 15-Aug-1998  mycroft branches: 1.3.14; 1.3.22;
Assign my copyrights to TNF.
 1.2 07-May-1996  thorpej Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.

Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.1 11-Dec-1995  mycroft Use the MI LANCE code.
 1.3.22.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.3.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.24.1 03-Aug-2004  skrll Sync with HEAD
 1.5.8.2 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.5.8.1 31-May-2001  scw file if_levar.h was added on branch nathanw_sa on 2001-05-31 18:46:08 +0000
 1.7.78.1 16-May-2008  yamt sync with head.
 1.7.76.1 18-May-2008  yamt sync with head.
 1.7.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.4 26-Apr-1996  chuck remove iio files; replaced by jason's new autoconfig scheme
 1.3 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.2 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2 26-Apr-1996  chuck remove iio files; replaced by jason's new autoconfig scheme
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.8 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.7 23-Mar-2000  thorpej branches: 1.7.6; 1.7.8; 1.7.12;
New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.6 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.5 14-Feb-1999  scw branches: 1.5.8; 1.5.14; 1.5.16;
Merge support for mvme167 into main tree.
 1.4 15-Aug-1998  mycroft branches: 1.4.6;
Make copyright notices with my name consistent.
 1.3 12-Jan-1998  thorpej Update for changes to config.
 1.2 19-Mar-1997  gwr Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.1 09-Nov-1996  chuck - new lpt driver, contributed by Steve Woodford <steve@mctavish.demon.co.uk>
- added 1.1 and 1.2 compat to VME147 config file
 1.4.6.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.4.6.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.5.16.2 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.5.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.5.14.1 21-Dec-1999  wrstuden Initial commit of recent changes to make DEV_BSIZE go away.

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

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

Non 2**n block support is automatic for LKM's and conditional for kernels
on "options NON_PO2_BLOCKS".
 1.5.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.7.8.1 16-Mar-2002  jdolecek Catch up with -current.
 1.7.6.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.12 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.11 07-Mar-2008  cube branches: 1.11.2; 1.11.4;
Split the softc from the device_t for all lpt(4) variants and attachments
except the ppbus stuff (which doesn't compile) and ulpt(4) which is
unrelated and can be dealt with separately.

As usual, it comes with related cosmetic changes.
 1.10 12-Jan-2008  tsutsui branches: 1.10.2; 1.10.6;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.9 11-Dec-2005  christos branches: 1.9.50; 1.9.56; 1.9.64;
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 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.4 31-May-2001  scw branches: 1.4.2; 1.4.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.3 18-Mar-2000  scw branches: 1.3.6;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file lpt_pcc.c was initially added on branch scw-mvme167.
 1.1.2.3 14-Feb-1999  scw Fix typo.
 1.1.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.16.2 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 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.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.8.1 31-May-2001  nathanw file lpt_pcc.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.4.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.7.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.2 17-Mar-2008  yamt sync with head.
 1.8.16.1 21-Jan-2008  yamt sync with head
 1.9.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.9.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.9.50.1 23-Mar-2008  matt sync with HEAD
 1.10.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.10.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.10.2.1 24-Mar-2008  keiichi sync with head.
 1.11.4.1 16-May-2008  yamt sync with head.
 1.11.2.1 18-May-2008  yamt sync with head.
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 18-Mar-2000  scw branches: 1.3.130; 1.3.132; 1.3.134;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file lpt_pccreg.h was initially added on branch scw-mvme167.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 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.134.1 16-May-2008  yamt sync with head.
 1.3.132.1 18-May-2008  yamt sync with head.
 1.3.130.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.5 31-May-2001  scw branches: 1.5.2; 1.5.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.4 06-Sep-2000  scw branches: 1.4.2;
Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.3 18-Mar-2000  scw branches: 1.3.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file lpt_pcctwo.c was initially added on branch scw-mvme167.
 1.1.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.16.3 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.2.16.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 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.4.1 17-Oct-2000  scw Pullup 1.3 - 1.4 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.5.8.1 31-May-2001  nathanw file lpt_pcctwo.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.5.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.2 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.1 09-Nov-1996  chuck branches: 1.1.22;
- new lpt driver, contributed by Steve Woodford <steve@mctavish.demon.co.uk>
- added 1.1 and 1.2 compat to VME147 config file
 1.1.22.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.6 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.5 31-May-2001  scw branches: 1.5.2; 1.5.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.4 23-Mar-2000  thorpej branches: 1.4.6;
New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.3 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file lptvar.h was initially added on branch scw-mvme167.
 1.1.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 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.4.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.5.8.1 31-May-2001  nathanw file lptvar.h was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.5.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.24 18-Jan-2024  thorpej Don't put the MVME1xx model defines into IDENT, make them defflag options and
put them in opt_mvmeconf.h. Make these options depend on the appropriate
M680x0 option (MVME147 -> M68030, MVME16[27] -> M68040, MVME17[27] -> M68060)
so that the CPU option appears correctly in opt_m68k_arch.h.
 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 05-Jun-2011  matt branches: 1.21.68;
struct device * -> device_t, struct cfdata * -> cfdata_t
CFATTACH_DECL(*, sizeof(struct device), -> CFATTACH_DECL_NEW(&, 0
 1.20 28-Apr-2008  martin branches: 1.20.22; 1.20.28; 1.20.32;
Remove clause 3 and 4 from TNF licenses
 1.19 12-Jan-2008  tsutsui branches: 1.19.6; 1.19.8; 1.19.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.18 11-Dec-2005  christos branches: 1.18.50; 1.18.56; 1.18.64;
merge ktrace-lwp.
 1.17 15-Jul-2003  lukem branches: 1.17.16;
__KERNEL_RCSID()
 1.16 01-Jan-2003  thorpej branches: 1.16.2;
Use aprint_normal() for cfprint routines.
 1.15 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.14 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.13 24-Mar-2002  scw Fix a botch from the dev/mvme split for kernels with no vmetwo in
the config file.
 1.12 17-Mar-2002  scw Fix an include file botch when there is no vmetwo device in the
kernel config.
 1.11 12-Aug-2001  scw branches: 1.11.6;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.10 27-Jul-2001  scw Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.9 06-Jul-2001  scw branches: 1.9.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.8 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.7 03-Dec-2000  scw branches: 1.7.2;
Revert the previous change, after discussion with thorpej and cgd.
 1.6 30-Nov-2000  scw Only try to attach those devices which have been configured
in the kernel config file.
 1.5 24-Nov-2000  scw Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.4 20-Nov-2000  scw branches: 1.4.2;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.3 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.2 18-Mar-2000  scw branches: 1.2.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 11-Mar-2000  scw branches: 1.1.2;
file mainbus.c was initially added on branch scw_mvme68k_bus_space.
 1.1.2.3 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.1.2.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.1.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.4.1 17-Oct-2000  scw Pullup 1.2 - 1.3 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.4.2.4 08-Dec-2000  bouyer Sync with HEAD.
 1.4.2.3 22-Nov-2000  bouyer Sync with HEAD.
 1.4.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.2.1 20-Nov-2000  bouyer file mainbus.c was added on branch thorpej_scsipi on 2000-11-20 20:15:17 +0000
 1.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.9.2.1 03-Aug-2001  lukem update to -current
 1.11.6.4 03-Jan-2003  thorpej Sync with HEAD.
 1.11.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.11.6.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.11.6.1 12-Aug-2001  nathanw file mainbus.c was added on branch nathanw_sa on 2002-04-01 07:41:20 +0000
 1.16.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.16.1 21-Jan-2008  yamt sync with head
 1.18.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.18.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.18.50.1 23-Mar-2008  matt sync with HEAD
 1.19.10.1 16-May-2008  yamt sync with head.
 1.19.8.1 18-May-2008  yamt sync with head.
 1.19.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.20.32.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.20.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.20.22.1 12-Jun-2011  rmind sync with head
 1.21.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.22.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 12-Aug-2001  scw branches: 1.6.6; 1.6.124; 1.6.126; 1.6.128;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.5 27-Jul-2001  scw Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.4 31-May-2001  scw branches: 1.4.2;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.3 24-Nov-2000  scw branches: 1.3.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.2 18-Mar-2000  scw branches: 1.2.6;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 11-Mar-2000  scw branches: 1.1.2;
file mainbus.h was initially added on branch scw_mvme68k_bus_space.
 1.1.2.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.1.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.6.3 08-Dec-2000  bouyer Sync with HEAD.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 18-Mar-2000  bouyer file mainbus.h was added on branch thorpej_scsipi on 2000-11-20 20:15:17 +0000
 1.3.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.4.2.1 03-Aug-2001  lukem update to -current
 1.6.128.1 16-May-2008  yamt sync with head.
 1.6.126.1 18-May-2008  yamt sync with head.
 1.6.124.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.6.2 12-Aug-2001  scw Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.6.6.1 12-Aug-2001  scw file mainbus.h was added on branch nathanw_sa on 2001-08-12 18:33:14 +0000
 1.10 24-Nov-2000  scw Use the MI md_root.c.
 1.9 22-Jul-2000  scw Include <sys/systm.h>, if only for printf() prototype.
 1.8 18-Mar-2000  scw branches: 1.8.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.7 17-Mar-1999  sommerfe branches: 1.7.8; 1.7.16;
defopt MINIROOTSIZE
 1.6 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.5 28-Dec-1996  pk branches: 1.5.10;
rename: ramdisk => md
 1.4 09-Dec-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.3 13-Oct-1996  christos backout previous kprintf change
 1.2 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.1 20-May-1996  chuck import rd_root from sun3
 1.5.10.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7.16.1 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.7.8.2 08-Dec-2000  bouyer Sync with HEAD.
 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.4.1 22-Jul-2000  scw Pullup from trunk: 1.9
Approved by: thorpej

Need to include <sys/systm.h> for printf() prototype.
 1.10 17-Mar-2002  scw G/C. These should have been deleted as part of the move to sys/dev/mvme.
 1.9 28-Jul-2001  scw branches: 1.9.6;
Hook the error interrupt only once, otherwise we'd fail when hooking
the interrupt for the 2nd DRAM board where two boards are present.
 1.8 27-Jul-2001  scw Blah, yet another nit: s/irq/ipl/
 1.7 27-Jul-2001  scw Don't bother trying to initiate a DRAM scrub on startup as it requires
frobbing with registers which are marked as "For Test Purposes [only]".
 1.6 27-Jul-2001  scw Remove Mistakenly Left In comments around some `#ifdef DIAGNOSTIC' tests.
 1.5 27-Jul-2001  scw Forgot to shift the DRAM Bank identifiers by four.
 1.4 27-Jul-2001  scw Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.3 31-May-2001  scw branches: 1.3.2;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.2 30-Nov-2000  scw branches: 1.2.2; 1.2.4;
Print some more details of the memory managed by each ASIC.
 1.1 24-Nov-2000  scw First cut of a driver for the Memory Controller ASICs found
on mvme16x and mvme17x boards.
 1.2.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.2.2.1 30-Nov-2000  bouyer file memc.c was added on branch thorpej_scsipi on 2000-12-08 09:28:30 +0000
 1.3.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.1 03-Aug-2001  lukem update to -current
 1.9.6.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.9.6.1 28-Jul-2001  nathanw file memc.c was added on branch nathanw_sa on 2002-04-01 07:41:20 +0000
 1.9 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.8 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.7 28-Apr-2008  martin branches: 1.7.34; 1.7.44;
Remove clause 3 and 4 from TNF licenses
 1.6 12-Jan-2008  tsutsui branches: 1.6.6; 1.6.8; 1.6.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.5 11-Dec-2005  christos branches: 1.5.50; 1.5.56; 1.5.64;
merge ktrace-lwp.
 1.4 15-Jul-2003  lukem branches: 1.4.16;
__KERNEL_RCSID()
 1.3 02-Oct-2002  thorpej branches: 1.3.6;
Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 12-Feb-2002  scw branches: 1.1.2; 1.1.8;
Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.1.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.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 12-Feb-2002  jdolecek file memc_68k.c was added on branch kqueue on 2002-03-16 15:58:52 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 12-Feb-2002  nathanw file memc_68k.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.1 21-Jan-2008  yamt sync with head
 1.5.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.5.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.5.50.1 23-Mar-2008  matt sync with HEAD
 1.6.10.1 16-May-2008  yamt sync with head.
 1.6.8.1 18-May-2008  yamt sync with head.
 1.6.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7.34.1 30-Oct-2012  yamt sync with head
 1.3 17-Mar-2002  scw G/C. These should have been deleted as part of the move to sys/dev/mvme.
 1.2 27-Jul-2001  scw branches: 1.2.6;
Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.1 24-Nov-2000  scw branches: 1.1.2; 1.1.6;
First cut of a driver for the Memory Controller ASICs found
on mvme16x and mvme17x boards.
 1.1.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.1 03-Aug-2001  lukem update to -current
 1.1.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.1.2.1 24-Nov-2000  bouyer file memcreg.h was added on branch thorpej_scsipi on 2000-12-08 09:28:30 +0000
 1.2.6.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.6.1 27-Jul-2001  nathanw file memcreg.h was added on branch nathanw_sa on 2002-04-01 07:41:20 +0000
 1.9 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.8 07-Aug-2001  scw branches: 1.8.6;
Change a post-decrement to a pre-decrement.
 1.7 31-May-2001  scw branches: 1.7.2;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.6 24-Nov-2000  scw branches: 1.6.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.5 19-Sep-2000  scw branches: 1.5.2;
Pass the requested cpu irq priority through to the VME chipset-specific
backend.

The VME2chip can use this to translate a VMEbus irq to a cpu irq.

The VMEchip (on mvme147) can't deal with the VMEbus irq and cpu irq
being different so we just panic in that case for now.
 1.4 21-Aug-2000  scw A VMEbus RAM board configured for use by mvme68k can now be
treated as just another available VMEbus slave image as far as
bus_dma(9) is concerned.

To preserve faster onboard memory, mvmebus_dmamem_alloc() will
allocate first from the offboard VMEbus RAM slave image if present,
and assuming its address modifier matches the caller's constraints.
This can be overidden by specifying the BUS_DMA_ONBOARD_RAM flag.
 1.3 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.2 20-Aug-2000  scw Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
. Get VMEbus slave mode going on mvme147. This should be easy.
. Fix up the A16 slave mappings.
. Bounce buffer support. (Messy, but pretty much a `must have'.)
. Figure out how to deal with `location monitor' interrupts
within the framework. (Useful for Busnet, among other things.)
. It would be nice to make use of the VMEchip2's DMA facilities...
 1.1 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.5.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.5.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.2.1 19-Sep-2000  bouyer file mvmebus.c was added on branch thorpej_scsipi on 2000-11-20 20:15:17 +0000
 1.6.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.7.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.8.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.8.6.1 07-Aug-2001  nathanw file mvmebus.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.7 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.6 31-May-2001  scw branches: 1.6.2; 1.6.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.5 24-Nov-2000  scw branches: 1.5.2;
Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.4 19-Sep-2000  scw branches: 1.4.2;
Pass the requested cpu irq priority through to the VME chipset-specific
backend.

The VME2chip can use this to translate a VMEbus irq to a cpu irq.

The VMEchip (on mvme147) can't deal with the VMEbus irq and cpu irq
being different so we just panic in that case for now.
 1.3 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.2 20-Aug-2000  scw Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
. Get VMEbus slave mode going on mvme147. This should be easy.
. Fix up the A16 slave mappings.
. Bounce buffer support. (Messy, but pretty much a `must have'.)
. Figure out how to deal with `location monitor' interrupts
within the framework. (Useful for Busnet, among other things.)
. It would be nice to make use of the VMEchip2's DMA facilities...
 1.1 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.4.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.4.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.2.1 19-Sep-2000  bouyer file mvmebus.h was added on branch thorpej_scsipi on 2000-11-20 20:15:17 +0000
 1.5.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.6.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.6.8.1 31-May-2001  nathanw file mvmebus.h was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.6.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.12 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.11 31-May-2001  scw branches: 1.11.2; 1.11.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.10 03-May-2001  scw G/C a printf which has moved to the MI code.
 1.9 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.8 25-Apr-2001  bouyer Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.7 20-Nov-2000  scw branches: 1.7.2;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.6 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.5 25-Jul-2000  scw Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER.
 1.4 18-Mar-2000  scw branches: 1.4.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 26-Feb-2000  scw branches: 1.3.2;
Include <machine/cpu.h> to make these compile again.
 1.2 21-Feb-1999  scw branches: 1.2.8;
Move scsi_nosync declaration into ncrsc_pcctwo since I've permanently
disabled sync negotiation in the 147's SBIC driver. (I could never make
it work). Also, don't enable bus-snooping with a 68060 based board.
 1.1 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.2.8.3 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.2.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.2.4 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.3.2.3 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.3.2.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.3.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.4.4.1 17-Oct-2000  scw Pullup 1.5 - 1.6 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.11.8.1 31-May-2001  nathanw file ncrsc_pcctwo.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.11.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.35 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.34 24-Apr-2021  thorpej branches: 1.34.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.33 29-Oct-2012  chs branches: 1.33.52;
fix device/softc split errors.
 1.32 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.31 01-Feb-2011  chuck branches: 1.31.4; 1.31.14;
udpate license clauses on my code to match the new-style BSD licenses.
remove no-longer-valid wustl email address for me.
based on diff that rmind@ sent me.

no functional change with this commit.
 1.30 28-Apr-2008  martin branches: 1.30.22; 1.30.28; 1.30.30;
Remove clause 3 and 4 from TNF licenses
 1.29 12-Jan-2008  tsutsui branches: 1.29.6; 1.29.8; 1.29.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.28 03-Dec-2007  ad branches: 1.28.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.27 11-Dec-2005  christos branches: 1.27.30; 1.27.48; 1.27.50; 1.27.56;
merge ktrace-lwp.
 1.26 03-Jun-2005  scw branches: 1.26.2;
Fix const fallout.
 1.25 15-Jul-2003  lukem __KERNEL_RCSID()
 1.24 06-Jan-2003  wiz branches: 1.24.2;
interrupt with two rs.
 1.23 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.22 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.21 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.20 12-Aug-2001  scw branches: 1.20.6;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.19 06-Jul-2001  scw branches: 1.19.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.18 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.17 03-Dec-2000  scw branches: 1.17.2;
Revert the previous change, after discussion with thorpej and cgd.
 1.16 30-Nov-2000  scw Only try to attach those devices which have been configured
in the kernel config file.
 1.15 24-Nov-2000  scw Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.14 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.13 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.12 14-Feb-1999  scw branches: 1.12.8; 1.12.16;
Merge support for mvme167 into main tree.
 1.11 12-Jan-1998  thorpej branches: 1.11.8;
Update for changes to config.
 1.10 05-Oct-1997  thorpej Copyright assigned to The NetBSD Foundation.
 1.9 19-Mar-1997  gwr branches: 1.9.4;
Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.8 13-Oct-1996  christos backout previous kprintf change
 1.7 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.6 12-Sep-1996  thorpej Update to use the new badaddr(); simplifies the code that attaches
pcc children somewhat.
 1.5 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.4 08-May-1996  thorpej RCS id police.
 1.3 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.2 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.9.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.11.8.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.12.16.4 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.12.16.3 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.12.16.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.12.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.12.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.12.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.17.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.19.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.19.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.20.6.4 07-Jan-2003  thorpej Sync with HEAD.
 1.20.6.3 03-Jan-2003  thorpej Sync with HEAD.
 1.20.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.20.6.1 12-Aug-2001  nathanw file pcc.c was added on branch nathanw_sa on 2002-10-18 02:38:57 +0000
 1.24.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.24.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.24.2.1 03-Aug-2004  skrll Sync with HEAD
 1.26.2.2 21-Jan-2008  yamt sync with head
 1.26.2.1 07-Dec-2007  yamt sync with head
 1.27.56.2 18-Feb-2008  mjf Sync with HEAD.
 1.27.56.1 08-Dec-2007  mjf Sync with HEAD.
 1.27.50.2 23-Mar-2008  matt sync with HEAD
 1.27.50.1 09-Jan-2008  matt sync with HEAD
 1.27.48.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.27.30.2 03-Dec-2007  ad Sync with HEAD.
 1.27.30.1 03-Dec-2007  ad Sync with HEAD.
 1.28.6.1 19-Jan-2008  bouyer Sync with HEAD
 1.29.10.1 16-May-2008  yamt sync with head.
 1.29.8.1 18-May-2008  yamt sync with head.
 1.29.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.30.30.1 08-Feb-2011  bouyer Sync with HEAD
 1.30.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.30.22.1 05-Mar-2011  rmind sync with head
 1.31.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.31.4.1 30-Oct-2012  yamt sync with head
 1.33.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.34.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.11 01-Feb-2011  chuck udpate license clauses on my code to match the new-style BSD licenses.
remove no-longer-valid wustl email address for me.
based on diff that rmind@ sent me.

no functional change with this commit.
 1.10 07-Jan-2008  tsutsui branches: 1.10.32; 1.10.38; 1.10.40;
Add timecounter(9) support for mvme68k.

Based on a patch from Garrett D'Amore and several tweaks by me.
Compile tested only, but reviewed by joerg@ and
no objection from scw@ on port-mvme68k.
 1.9 12-Aug-2001  scw branches: 1.9.6; 1.9.38; 1.9.100; 1.9.106; 1.9.114;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.8 14-Apr-2001  scw branches: 1.8.2;
Implement a real microtime() by reading the timer counter register.
On mvme147 this gives 6.25uS resolution, and 1uS on all other boards.
 1.7 20-Aug-2000  scw branches: 1.7.2;
Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.6 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.5 12-Sep-1996  thorpej branches: 1.5.30; 1.5.38;
Correct a comment, and add timer priming macros.
 1.4 08-May-1996  thorpej RCS id police.
 1.3 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.2 18-Apr-1996  chuck add PCC_ICLEAR
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.5.38.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.5.38.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.5.30.2 21-Apr-2001  bouyer Sync with HEAD
 1.5.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.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.9.114.1 08-Jan-2008  bouyer Sync with HEAD
 1.9.106.1 18-Feb-2008  mjf Sync with HEAD.
 1.9.100.1 09-Jan-2008  matt sync with HEAD
 1.9.38.1 21-Jan-2008  yamt sync with head
 1.9.6.2 12-Aug-2001  scw Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.9.6.1 12-Aug-2001  scw file pccreg.h was added on branch nathanw_sa on 2001-08-12 18:33:14 +0000
 1.10.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.10.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.32.1 05-Mar-2011  rmind sync with head
 1.17 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.16 12-Aug-2001  scw branches: 1.16.6;
Fix the clock device offset. (Overlooked in last commit)
 1.15 12-Aug-2001  scw Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.14 27-Jul-2001  scw Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.13 06-Jul-2001  scw branches: 1.13.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.12 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.11 03-May-2001  scw Attach `osiop' at pcctwo instead of `ncrsc'.
 1.10 01-May-2001  scw Match `osiop' instead of `ncrsc' now.
 1.9 03-Dec-2000  scw branches: 1.9.2;
Revert the previous change, after discussion with thorpej and cgd.
 1.8 30-Nov-2000  scw Only try to attach those devices which have been configured
in the kernel config file.
 1.7 24-Nov-2000  scw First cut of a driver for the Memory Controller ASICs found
on mvme16x and mvme17x boards.
 1.6 24-Nov-2000  scw Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.5 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.4 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.3 18-Mar-2000  scw branches: 1.3.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file pcctwo.c was initially added on branch scw-mvme167.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.16.4 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.2.16.3 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.2.16.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.8.3 08-Dec-2000  bouyer Sync with HEAD.
 1.2.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.4.1 17-Oct-2000  scw Pullup 1.3 - 1.4 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.9.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.13.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.13.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.13.2.1 03-Aug-2001  lukem update to -current
 1.16.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.16.6.1 12-Aug-2001  nathanw file pcctwo.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.12 19-Jan-2024  thorpej Make sure to include opt_mvmeconf.h.
 1.11 13-Mar-2019  martin Fix small (but fatal) oversight in device/softc split.
 1.10 27-Oct-2012  chs branches: 1.10.12; 1.10.30; 1.10.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.9 28-Apr-2008  martin branches: 1.9.34; 1.9.44;
Remove clause 3 and 4 from TNF licenses
 1.8 12-Jan-2008  tsutsui branches: 1.8.6; 1.8.8; 1.8.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.7 03-Dec-2007  ad branches: 1.7.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.6 11-Dec-2005  christos branches: 1.6.30; 1.6.48; 1.6.50; 1.6.56;
merge ktrace-lwp.
 1.5 03-Jun-2005  scw branches: 1.5.2;
Fix const fallout.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 02-Oct-2002  thorpej branches: 1.3.6;
Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 12-Feb-2002  scw branches: 1.1.2; 1.1.8;
Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.1.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.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 12-Feb-2002  jdolecek file pcctwo_68k.c was added on branch kqueue on 2002-03-16 15:58:53 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 12-Feb-2002  nathanw file pcctwo_68k.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.3.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.5.2.2 21-Jan-2008  yamt sync with head
 1.5.2.1 07-Dec-2007  yamt sync with head
 1.6.56.2 18-Feb-2008  mjf Sync with HEAD.
 1.6.56.1 08-Dec-2007  mjf Sync with HEAD.
 1.6.50.2 23-Mar-2008  matt sync with HEAD
 1.6.50.1 09-Jan-2008  matt sync with HEAD
 1.6.48.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.6.30.2 03-Dec-2007  ad Sync with HEAD.
 1.6.30.1 03-Dec-2007  ad Sync with HEAD.
 1.7.6.1 19-Jan-2008  bouyer Sync with HEAD
 1.8.10.1 16-May-2008  yamt sync with head.
 1.8.8.1 18-May-2008  yamt sync with head.
 1.8.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.34.1 30-Oct-2012  yamt sync with head
 1.10.38.1 10-Jun-2019  christos Sync with HEAD
 1.10.30.1 13-Mar-2019  msaitoh Pull up following revision(s) (requested by martin in ticket #1213):
sys/arch/mvme68k/dev/pcctwo_68k.c: revision 1.11
Fix small (but fatal) oversight in device/softc split.
 1.10.12.1 13-Mar-2019  msaitoh Pull up following revision(s) (requested by martin in ticket #1685):
sys/arch/mvme68k/dev/pcctwo_68k.c: revision 1.11
Fix small (but fatal) oversight in device/softc split.
 1.11 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.10 12-Aug-2001  scw branches: 1.10.6;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.9 27-Jul-2001  scw Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.8 14-Apr-2001  scw branches: 1.8.2;
Implement a real microtime() by reading the timer counter register.
On mvme147 this gives 6.25uS resolution, and 1uS on all other boards.
 1.7 24-Nov-2000  scw branches: 1.7.2;
First cut of a driver for the Memory Controller ASICs found
on mvme16x and mvme17x boards.
 1.6 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.5 25-Jul-2000  scw Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER.
 1.4 18-Mar-2000  scw branches: 1.4.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 20-Feb-1999  scw branches: 1.3.8; 1.3.16;
Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.2 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file pcctworeg.h was initially added on branch scw-mvme167.
 1.1.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.3.16.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.3.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.3.8.3 21-Apr-2001  bouyer Sync with HEAD
 1.3.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.3.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.4.1 17-Oct-2000  scw Pullup 1.5 - 1.6 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.8.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.8.2.1 03-Aug-2001  lukem update to -current
 1.10.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.10.6.1 12-Aug-2001  nathanw file pcctworeg.h was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.6 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.5 31-May-2001  scw branches: 1.5.2; 1.5.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.4 24-Nov-2000  scw branches: 1.4.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.3 06-Sep-2000  scw branches: 1.3.2;
Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.2 18-Mar-2000  scw branches: 1.2.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 11-Mar-2000  scw branches: 1.1.2;
file pcctwovar.h was initially added on branch scw_mvme68k_bus_space.
 1.1.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.4.1 17-Oct-2000  scw Pullup 1.2 - 1.3 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.3.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.3.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.2.1 06-Sep-2000  bouyer file pcctwovar.h was added on branch thorpej_scsipi on 2000-11-20 20:15:18 +0000
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.5.8.1 31-May-2001  nathanw file pcctwovar.h was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.5.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.11 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.10 28-Apr-2008  martin branches: 1.10.34; 1.10.44;
Remove clause 3 and 4 from TNF licenses
 1.9 12-Jan-2008  tsutsui branches: 1.9.6; 1.9.8; 1.9.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.8 31-May-2001  scw branches: 1.8.8; 1.8.40; 1.8.102; 1.8.108; 1.8.116;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.7 24-Nov-2000  scw branches: 1.7.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.6 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.5 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.4 14-Feb-1999  scw branches: 1.4.8; 1.4.16;
Merge support for mvme167 into main tree.
 1.3 09-Oct-1997  jtc branches: 1.3.10;
Fix tipo inherited from old version of TNF copyright template.
 1.2 17-Jul-1997  jtk branches: 1.2.2;
use locator defines in "locators.h" to index cf_loc[]
 1.1 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.2.2.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.10.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.4.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.4.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.4.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.116.1 19-Jan-2008  bouyer Sync with HEAD
 1.8.108.1 18-Feb-2008  mjf Sync with HEAD.
 1.8.102.1 23-Mar-2008  matt sync with HEAD
 1.8.40.1 21-Jan-2008  yamt sync with head
 1.8.8.2 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.8.8.1 31-May-2001  scw file pccvar.h was added on branch nathanw_sa on 2001-05-31 18:46:09 +0000
 1.9.10.1 16-May-2008  yamt sync with head.
 1.9.8.1 18-May-2008  yamt sync with head.
 1.9.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.10.34.1 30-Oct-2012  yamt sync with head
 1.5 28-Dec-1996  pk rename: ramdisk => md
 1.4 09-Dec-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.3 13-Oct-1996  christos backout previous kprintf change
 1.2 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.1 20-May-1996  chuck import rd_root from sun3
 1.37 08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.36 09-Feb-2022  andvar branches: 1.36.10;
fix various typos in comments.
 1.35 08-Mar-2018  mrg fix various gcc6 m68k issues:
- bad indentation. next68k en.c and mvme68k le_poll.c fixes real issues
in error handling, the rest are NFCI.
- pass 68030 flags as appropriate for mvme68k.
- next68k nextrom.c has -Warray-bounds ignored for an odd expression
that appears to run before relocation, and needs manual offsets
added which trips bounds array checking.

with this all m68k ports build with GCC 6.
 1.34 24-Mar-2014  christos branches: 1.34.28;
use cpu_{g,s}etmodel
fix unused
 1.33 27-Oct-2012  chs branches: 1.33.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.32 12-Jan-2008  tsutsui branches: 1.32.44; 1.32.54;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.31 17-Oct-2007  garbled branches: 1.31.2; 1.31.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.30 09-Jul-2007  ad branches: 1.30.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.29 04-Mar-2007  christos branches: 1.29.2; 1.29.4; 1.29.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.28 08-Mar-2006  lukem branches: 1.28.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.27 11-Dec-2005  christos branches: 1.27.4; 1.27.6; 1.27.8; 1.27.10;
merge ktrace-lwp.
 1.26 03-Jun-2005  scw branches: 1.26.2;
Fix const fallout.
 1.25 01-Nov-2003  scw Quell an uninitialised variable warning.
 1.24 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.23 15-Jul-2003  lukem __KERNEL_RCSID()
 1.22 18-Jun-2003  drochner branches: 1.22.2;
don't #include <sys/dkstat.h> where it is (appearently) unused
 1.21 03-May-2003  wiz DMA, not dma nor Dma.
 1.20 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.19 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.18 22-Jul-2001  wiz branches: 1.18.6;
seperate -> separate
 1.17 07-Jul-2001  scw branches: 1.17.2;
bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
 1.16 25-Apr-2001  bouyer Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.15 29-Jun-2000  mrg branches: 1.15.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.14 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.13 23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.12 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.11 13-Nov-1999  scw branches: 1.11.2;
Make this work with the new scsibus mid-layer, using Ignatios' Amiga
fix as a reference.
 1.10 30-Sep-1999  thorpej branches: 1.10.2; 1.10.4; 1.10.8;
Update for SCSIPI changes.
 1.9 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.8 22-Aug-1998  scw vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.7 04-Jul-1998  jonathan defopt DDB.
 1.6 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.5 13-Oct-1996  christos branches: 1.5.8; 1.5.10;
backout previous kprintf change
 1.4 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.3 26-Aug-1996  thorpej Old-style disk instrumentation is long gone, buster!
 1.2 23-Apr-1996  chuck patch from: Steve Woodford <steve@mctavish.demon.co.uk>
fixes the following problems:
- Timeout on START/STOP unit command (ie. when spinning up the drive)
Side effect of this fix is to reduce the busy-wait time in CMD phase.

- Occasionally, the driver would lose an SBIC interrupt, especially when
a tape drive was re-selecting on a busy SCSI bus.
 1.1 18-Apr-1996  chuck new driver: SCSI for VME147
contributed by: Steve Woodford <steve@mctavish.demon.co.uk>

this driver is based on the amiga sbic/33C93 driver. Steve has
cleaned it up and fixed lots of bugs. Note that the original driver
used features which require at least a WD33C93A (the vme147 has the
original WD33C93 chip <no 'A' suffix>). Steve has also written
the DMA routines for the 147 to get things really going. Hardware
scatter-gather DMA and sync. SCSI are not supported (yet). tested
on several disk drives and a tape drive. CD-ROM untested, but
should work.
 1.5.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.10.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.4.1 15-Nov-1999  fvdl Sync with -current
 1.10.2.3 29-Mar-2001  bouyer Pass compile-test on i386
 1.10.2.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.10.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.11.2.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.15.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.17.2.1 03-Aug-2001  lukem update to -current
 1.18.6.2 11-Nov-2002  nathanw Catch up to -current
 1.18.6.1 22-Jul-2001  nathanw file sbic.c was added on branch nathanw_sa on 2002-11-11 22:01:23 +0000
 1.22.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.22.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.22.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.22.2.1 03-Aug-2004  skrll Sync with HEAD
 1.26.2.3 21-Jan-2008  yamt sync with head
 1.26.2.2 03-Sep-2007  yamt sync with head.
 1.26.2.1 21-Jun-2006  yamt sync with head.
 1.27.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.27.8.1 13-Mar-2006  yamt sync with head.
 1.27.6.1 22-Apr-2006  simonb Sync with head.
 1.27.4.1 09-Sep-2006  rpaulo sync with head
 1.28.16.1 12-Mar-2007  rmind Sync with HEAD.
 1.29.10.1 03-Oct-2007  garbled Sync with HEAD
 1.29.4.1 11-Jul-2007  mjf Sync with head.
 1.29.2.1 15-Jul-2007  ad Sync with head.
 1.30.10.2 23-Mar-2008  matt sync with HEAD
 1.30.10.1 06-Nov-2007  matt sync with HEAD
 1.31.8.1 19-Jan-2008  bouyer Sync with HEAD
 1.31.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.32.54.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.54.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.32.44.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.32.44.1 30-Oct-2012  yamt sync with head
 1.33.2.1 18-May-2014  rmind sync with head
 1.34.28.1 15-Mar-2018  pgoyette Synch with HEAD
 1.36.10.1 02-Aug-2025  perseant Sync with HEAD
 1.6 16-Sep-2021  andvar fix various typos, mainly in comments.
 1.5 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.4 08-Mar-2006  lukem branches: 1.4.40; 1.4.46; 1.4.54;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.6; 1.3.8; 1.3.10;
merge ktrace-lwp.
 1.2 07-Aug-2003  agc branches: 1.2.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 18-Apr-1996  chuck branches: 1.1.68;
new driver: SCSI for VME147
contributed by: Steve Woodford <steve@mctavish.demon.co.uk>

this driver is based on the amiga sbic/33C93 driver. Steve has
cleaned it up and fixed lots of bugs. Note that the original driver
used features which require at least a WD33C93A (the vme147 has the
original WD33C93 chip <no 'A' suffix>). Steve has also written
the DMA routines for the 147 to get things really going. Hardware
scatter-gather DMA and sync. SCSI are not supported (yet). tested
on several disk drives and a tape drive. CD-ROM untested, but
should work.
 1.1.68.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.68.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.68.1 03-Aug-2004  skrll Sync with HEAD
 1.2.16.2 21-Jan-2008  yamt sync with head
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.3.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.3.8.1 13-Mar-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.54.1 19-Jan-2008  bouyer Sync with HEAD
 1.4.46.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.40.1 23-Mar-2008  matt sync with HEAD
 1.18 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.17 01-Jan-2022  andvar fix typos in comments, mainly basicly -> basically.
 1.16 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.15 27-Oct-2012  chs branches: 1.15.54;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.14 12-Jan-2008  tsutsui branches: 1.14.44; 1.14.54;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.13 11-Dec-2005  christos branches: 1.13.50; 1.13.56; 1.13.64;
merge ktrace-lwp.
 1.12 07-Dec-2004  thorpej branches: 1.12.10;
Use "struct scsipi_command" in internal command structures so that
we have enough space for 16-byte CDBs.
 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 03-May-2003  wiz branches: 1.10.2;
DMA, not dma nor Dma.
 1.9 14-May-2002  matt Eliminate commons (including many used ones). Clean up variable references.
 1.8 25-Apr-2001  bouyer branches: 1.8.2; 1.8.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.7 23-Mar-2000  thorpej branches: 1.7.6;
New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.6 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.5 19-Nov-1998  thorpej branches: 1.5.12; 1.5.20;
Adapt to the new scsipi_adapter interface.
 1.4 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.3 08-May-1996  thorpej branches: 1.3.10; 1.3.12;
RCS id police.
 1.2 26-Apr-1996  chuck nuke old isr structure (no longer use)
 1.1 18-Apr-1996  chuck new driver: SCSI for VME147
contributed by: Steve Woodford <steve@mctavish.demon.co.uk>

this driver is based on the amiga sbic/33C93 driver. Steve has
cleaned it up and fixed lots of bugs. Note that the original driver
used features which require at least a WD33C93A (the vme147 has the
original WD33C93 chip <no 'A' suffix>). Steve has also written
the DMA routines for the 147 to get things really going. Hardware
scatter-gather DMA and sync. SCSI are not supported (yet). tested
on several disk drives and a tape drive. CD-ROM untested, but
should work.
 1.3.12.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.10.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.5.20.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.5.20.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.5.12.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.5.12.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.8.8.1 25-Apr-2001  nathanw file sbicvar.h was added on branch nathanw_sa on 2002-06-20 03:39:59 +0000
 1.8.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.10.2.4 18-Dec-2004  skrll Sync with HEAD.
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.10.1 21-Jan-2008  yamt sync with head
 1.13.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.13.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.13.50.1 23-Mar-2008  matt sync with HEAD
 1.14.54.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.44.1 30-Oct-2012  yamt sync with head
 1.15.54.1 01-Aug-2021  thorpej Sync with HEAD.
 1.2 26-Apr-1996  chuck switched to MI driver
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.7 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.6 25-Apr-2001  bouyer Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.5 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.4 26-Feb-2000  scw branches: 1.4.2;
Include <machine/cpu.h> to make these compile again.
 1.3 30-Sep-1999  thorpej branches: 1.3.2;
Update for SCSIPI changes.
 1.2 10-Apr-1999  scw Put some delays around the SCSI bus reset code.
 1.1 20-Feb-1999  scw branches: 1.1.2;
Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.1.2.1 13-Apr-1999  scw branches: 1.1.2.1.2;
Pullup 1.2: Add some delay()s around the scsibus reset code.
 1.1.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3.2.3 29-Mar-2001  bouyer Pass compile-test on i386
 1.3.2.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 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.2.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.2 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.1 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.2 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.1 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.2 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.1 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.4 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.3 25-Apr-2001  bouyer Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.2 21-Feb-1999  scw branches: 1.2.8;
Remove a comment of mine which no longer applies.
 1.1 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.2.8.1 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.13 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.12 29-Mar-2008  tsutsui branches: 1.12.2; 1.12.4;
Don't forget to initialize sc_dev.
 1.11 28-Mar-2008  tsutsui Split device_t and softc for MI mk48txx(4) and intersil7170(4) clocks,
and other related misc cosmetics.
 1.10 10-Jan-2008  tsutsui branches: 1.10.6;
- move todr_attach(9) calls from each MD attachment to MI mk48txx_attach()
- don't clear todr_setwen in mk48txx_attach() since it might be set by
MD attachments
 1.9 11-Dec-2005  christos branches: 1.9.50; 1.9.56; 1.9.64;
merge ktrace-lwp.
 1.8 01-Nov-2003  tsutsui branches: 1.8.16;
Adapt MI mk48txx(4) changes. (compiles but untested)
 1.7 18-Jul-2003  thorpej Rename clock_rtc_config() to todr_attach().
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 23-Feb-2002  scw Allow MD code to provide functions for reading/writing NVRAM/RTC
locations. If passed NULL, the old behaviour using bus_space_{read,write}_1()
is used. Otherwise, all access to the chip goes via the MD functions.

This is necessary for mvmeppc boards where the mk48txx NVRAM/RTC is not
directly addressable.
 1.2 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.1 12-Aug-2001  scw branches: 1.1.2; 1.1.8;
Time Keeper NVRAM driver.
 1.1.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.8.1 12-Aug-2001  nathanw file timekeeper.c was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.1.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.1.2.1 12-Aug-2001  thorpej file timekeeper.c was added on branch kqueue on 2001-08-25 06:15:36 +0000
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.1 21-Jan-2008  yamt sync with head
 1.9.64.1 10-Jan-2008  bouyer Sync with HEAD
 1.9.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.9.50.1 23-Mar-2008  matt sync with HEAD
 1.10.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.10.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.12.4.1 16-May-2008  yamt sync with head.
 1.12.2.1 18-May-2008  yamt sync with head.
 1.9 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.8 12-Jan-1998  thorpej branches: 1.8.16; 1.8.24;
Update for changes to config.
 1.7 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.6 19-Mar-1997  gwr branches: 1.6.4;
Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.5 09-Dec-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.4 13-Oct-1996  christos backout previous kprintf change
 1.3 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.2 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.1 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.6.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.8.24.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.8.16.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.27 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.26 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.25 16-Mar-2009  dsl branches: 1.25.12; 1.25.22;
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 28-Apr-2008  martin branches: 1.22.8; 1.22.14;
Remove clause 3 and 4 from TNF licenses
 1.21 12-Jan-2008  tsutsui branches: 1.21.6; 1.21.8; 1.21.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.20 11-Dec-2005  christos branches: 1.20.50; 1.20.56; 1.20.64;
merge ktrace-lwp.
 1.19 13-Feb-2004  wiz branches: 1.19.16;
Uppercase CPU, plural is CPUs.
 1.18 15-Jul-2003  lukem __KERNEL_RCSID()
 1.17 02-Oct-2002  thorpej branches: 1.17.6;
Use CFATTACH_DECL().
 1.16 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.15 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.14 31-May-2001  scw branches: 1.14.2; 1.14.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.13 24-Nov-2000  scw branches: 1.13.2;
Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.12 19-Sep-2000  scw Pass the requested cpu irq priority through to the VME chipset-specific
backend.

The VME2chip can use this to translate a VMEbus irq to a cpu irq.

The VMEchip (on mvme147) can't deal with the VMEbus irq and cpu irq
being different so we just panic in that case for now.
 1.11 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.10 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.9 24-Jun-2000  scw Make these compile when DIAGNOSTIC isn't defined.
 1.8 04-Jun-2000  cgd branches: 1.8.2;
Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.7 18-Mar-2000  scw branches: 1.7.2;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.6 12-Jan-1998  thorpej branches: 1.6.16; 1.6.24;
Update for changes to config.
 1.5 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.4 19-Mar-1997  gwr branches: 1.4.4;
Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.3 13-Oct-1996  christos backout previous kprintf change
 1.2 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.1 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.4.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.6.24.6 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.6.24.5 18-Mar-2000  scw Fix local-bus offset of VMEbus windows.
 1.6.24.4 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.6.24.3 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.6.24.2 13-Mar-2000  scw One step closer to getting the VMEbus glue working on mvme167 ...
 1.6.24.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.6.16.2 08-Dec-2000  bouyer Sync with HEAD.
 1.6.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.7.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.8.2.1 25-Jun-2000  scw Pullup from trunk: 1.8-1.9
Authorised by: thorpej

GC an unused variable when DIAGNOSTIC and M68040 are undefined.
 1.13.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.14.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.14.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.14.8.1 31-May-2001  nathanw file vme_pcc.c was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.14.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.14.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.17.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.6.1 03-Aug-2004  skrll Sync with HEAD
 1.19.16.1 21-Jan-2008  yamt sync with head
 1.20.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.20.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.20.50.1 23-Mar-2008  matt sync with HEAD
 1.21.10.2 04-May-2009  yamt sync with head.
 1.21.10.1 16-May-2008  yamt sync with head.
 1.21.8.1 18-May-2008  yamt sync with head.
 1.21.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.22.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.22.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.25.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.25.12.1 30-Oct-2012  yamt sync with head
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 24-Nov-2000  scw branches: 1.5.126; 1.5.128; 1.5.130;
Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.4 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.3 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 09-Oct-1997  jtc branches: 1.2.18; 1.2.26;
Fix tipo inherited from old version of TNF copyright template.
 1.1 26-Apr-1996  chuck branches: 1.1.12;
- zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.1.12.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.2.26.2 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.2.26.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.18.2 08-Dec-2000  bouyer Sync with HEAD.
 1.2.18.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.130.1 16-May-2008  yamt sync with head.
 1.5.128.1 18-May-2008  yamt sync with head.
 1.5.126.1 02-Jun-2008  mjf Sync with HEAD.
 1.8 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.7 24-Nov-2000  scw branches: 1.7.126; 1.7.128; 1.7.130;
Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.6 21-Aug-2000  scw branches: 1.6.2;
A VMEbus RAM board configured for use by mvme68k can now be
treated as just another available VMEbus slave image as far as
bus_dma(9) is concerned.

To preserve faster onboard memory, mvmebus_dmamem_alloc() will
allocate first from the offboard VMEbus RAM slave image if present,
and assuming its address modifier matches the caller's constraints.
This can be overidden by specifying the BUS_DMA_ONBOARD_RAM flag.
 1.5 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.4 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.3 04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.2 18-Mar-2000  scw branches: 1.2.2;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 11-Mar-2000  scw branches: 1.1.2;
file vme_pccvar.h was initially added on branch scw_mvme68k_bus_space.
 1.1.2.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.1.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.6.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.6.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.2.1 21-Aug-2000  bouyer file vme_pccvar.h was added on branch thorpej_scsipi on 2000-11-20 20:15:19 +0000
 1.7.130.1 16-May-2008  yamt sync with head.
 1.7.128.1 18-May-2008  yamt sync with head.
 1.7.126.1 02-Jun-2008  mjf Sync with HEAD.
 1.15 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.14 06-Jul-2001  scw branches: 1.14.2; 1.14.8;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.13 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.12 24-Nov-2000  scw branches: 1.12.2;
Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.11 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.10 19-Sep-2000  scw Pass the requested cpu irq priority through to the VME chipset-specific
backend.

The VME2chip can use this to translate a VMEbus irq to a cpu irq.

The VMEchip (on mvme147) can't deal with the VMEbus irq and cpu irq
being different so we just panic in that case for now.
 1.9 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.8 23-Aug-2000  scw Though the VMEchip2 documentation is not explicit on the subject, a
VMEbus analyser confirms that D8 transfers are possible on all the
master ranges.
 1.7 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.6 20-Aug-2000  scw Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
. Get VMEbus slave mode going on mvme147. This should be easy.
. Fix up the A16 slave mappings.
. Bounce buffer support. (Messy, but pretty much a `must have'.)
. Figure out how to deal with `location monitor' interrupts
within the framework. (Useful for Busnet, among other things.)
. It would be nice to make use of the VMEchip2's DMA facilities...
 1.5 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.4 23-Jun-2000  scw Fix the `evcnt' prototypes.
 1.3 04-Jun-2000  cgd branches: 1.3.2;
Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.2 18-Mar-2000  scw branches: 1.2.2;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 20-Feb-1999  scw branches: 1.1.8; 1.1.16;
Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.1.16.6 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.1.16.5 18-Mar-2000  scw Fix local-bus offset of VMEbus windows.
 1.1.16.4 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.1.16.3 14-Mar-2000  scw VMEbus support on mvme167 is now pretty much coded for.
Now all I need to do is test it... ;-)
 1.1.16.2 13-Mar-2000  scw One step closer to getting the VMEbus glue working on mvme167 ...
 1.1.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.1.8.3 08-Dec-2000  bouyer Sync with HEAD.
 1.1.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.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.2.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.2.2 17-Oct-2000  scw Pullup 1.8 - 1.9 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.3.2.1 27-Jun-2000  scw Pullup from trunk: 1.3 - 1.4
Approved by: thorpej

Fix some prototype tyops introduced when the generic event counting
code was added.
 1.12.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.14.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.14.8.1 06-Jul-2001  nathanw file vme_two.c was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.14.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.10 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.9 28-Apr-2008  martin branches: 1.9.34; 1.9.44;
Remove clause 3 and 4 from TNF licenses
 1.8 12-Jan-2008  tsutsui branches: 1.8.6; 1.8.8; 1.8.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.7 11-Dec-2005  christos branches: 1.7.50; 1.7.56; 1.7.64;
merge ktrace-lwp.
 1.6 15-Jul-2003  lukem branches: 1.6.16;
__KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 14-May-2002  matt Eliminate commons (including many used ones). Clean up variable references.
 1.2 24-Mar-2002  scw Fix a botch from the dev/mvme split for kernels with no vmetwo in
the config file.
 1.1 12-Feb-2002  scw branches: 1.1.2; 1.1.8;
Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.1.8.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.8.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 12-Feb-2002  jdolecek file vme_two_68k.c was added on branch kqueue on 2002-03-16 15:58:54 +0000
 1.1.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.4 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 12-Feb-2002  nathanw file vme_two_68k.c was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.1 21-Jan-2008  yamt sync with head
 1.7.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.7.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.7.50.1 23-Mar-2008  matt sync with HEAD
 1.8.10.1 16-May-2008  yamt sync with head.
 1.8.8.1 18-May-2008  yamt sync with head.
 1.8.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.34.1 30-Oct-2012  yamt sync with head
 1.4 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.3 31-Jul-2001  chs branches: 1.3.6;
fix typo in previous.
 1.2 27-Jul-2001  scw Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.1 06-Jul-2001  scw branches: 1.1.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.1.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.3.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.6.1 31-Jul-2001  nathanw file vme_two_isr.c was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.5 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.4 24-Nov-2000  scw branches: 1.4.4; 1.4.8;
Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.3 20-Aug-2000  scw Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
. Get VMEbus slave mode going on mvme147. This should be easy.
. Fix up the A16 slave mappings.
. Bounce buffer support. (Messy, but pretty much a `must have'.)
. Figure out how to deal with `location monitor' interrupts
within the framework. (Useful for Busnet, among other things.)
. It would be nice to make use of the VMEchip2's DMA facilities...
 1.2 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 20-Feb-1999  scw branches: 1.1.8; 1.1.16;
Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.1.16.6 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.1.16.5 18-Mar-2000  scw Fix local-bus offset of VMEbus windows.
 1.1.16.4 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.1.16.3 14-Mar-2000  scw VMEbus support on mvme167 is now pretty much coded for.
Now all I need to do is test it... ;-)
 1.1.16.2 13-Mar-2000  scw One step closer to getting the VMEbus glue working on mvme167 ...
 1.1.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.1.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.1.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.11 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.10 27-Jul-2001  scw branches: 1.10.6;
Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.9 06-Jul-2001  scw branches: 1.9.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.8 24-Nov-2000  scw Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.7 21-Aug-2000  scw A VMEbus RAM board configured for use by mvme68k can now be
treated as just another available VMEbus slave image as far as
bus_dma(9) is concerned.

To preserve faster onboard memory, mvmebus_dmamem_alloc() will
allocate first from the offboard VMEbus RAM slave image if present,
and assuming its address modifier matches the caller's constraints.
This can be overidden by specifying the BUS_DMA_ONBOARD_RAM flag.
 1.6 20-Aug-2000  scw Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
. Get VMEbus slave mode going on mvme147. This should be easy.
. Fix up the A16 slave mappings.
. Bounce buffer support. (Messy, but pretty much a `must have'.)
. Figure out how to deal with `location monitor' interrupts
within the framework. (Useful for Busnet, among other things.)
. It would be nice to make use of the VMEchip2's DMA facilities...
 1.5 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.4 23-Jun-2000  scw Fix the `evcnt' prototypes.
 1.3 04-Jun-2000  cgd branches: 1.3.2;
Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.2 18-Mar-2000  scw branches: 1.2.2;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 20-Feb-1999  scw branches: 1.1.8; 1.1.16;
Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.1.16.4 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.1.16.3 14-Mar-2000  scw VMEbus support on mvme167 is now pretty much coded for.
Now all I need to do is test it... ;-)
 1.1.16.2 13-Mar-2000  scw One step closer to getting the VMEbus glue working on mvme167 ...
 1.1.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.1.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.1.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.2.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.2.1 27-Jun-2000  scw Pullup from trunk: 1.3 - 1.4
Approved by: thorpej

Fix some prototype tyops introduced when the generic event counting
code was added.
 1.9.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.9.2.1 03-Aug-2001  lukem update to -current
 1.10.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.10.6.1 27-Jul-2001  nathanw file vme_twovar.h was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.4 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 12-Jan-1998  thorpej branches: 1.3.16; 1.3.24;
Update for changes to config.
 1.2 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.1 26-Apr-1996  chuck branches: 1.1.12;
- zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.1.12.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.24.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.3.16.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.35 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.34 24-Apr-2021  thorpej branches: 1.34.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.33 12-Nov-2019  msaitoh branches: 1.33.10;
Add missing initialization of sc_dev.
 1.32 27-Oct-2012  chs branches: 1.32.30; 1.32.38; 1.32.42;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.31 28-Apr-2008  martin branches: 1.31.34; 1.31.44;
Remove clause 3 and 4 from TNF licenses
 1.30 12-Jan-2008  tsutsui branches: 1.30.6; 1.30.8; 1.30.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.29 11-Dec-2005  christos branches: 1.29.50; 1.29.56; 1.29.64;
merge ktrace-lwp.
 1.28 28-Mar-2004  scw branches: 1.28.16;
Assign my license to TNF.
 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 15-Jul-2003  lukem __KERNEL_RCSID()
 1.25 14-May-2003  wiz branches: 1.25.2;
Spell everything with an r.
 1.24 03-May-2003  wiz DMA, not dma nor Dma.
 1.23 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.22 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.21 31-May-2001  scw branches: 1.21.2; 1.21.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.20 25-Apr-2001  bouyer Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.19 12-Aug-2000  scw branches: 1.19.2;
G/C an unused variable.
 1.18 25-Jul-2000  scw Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER.
 1.17 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.16 26-Feb-2000  scw branches: 1.16.2;
Need <machine/cpu.h> for IIOV definition.
 1.15 20-Feb-1999  scw branches: 1.15.8;
Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.14 05-Dec-1998  mjacob Update HBAs to incorporate the new max_lun property.
 1.13 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.12 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

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

Inspired by PR #6090, from Matt Jacob.
 1.11 12-Jan-1998  thorpej Update for changes to config.
 1.10 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.9 19-Mar-1997  gwr branches: 1.9.2; 1.9.4;
Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.8 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.7 13-Oct-1996  christos backout previous kprintf change
 1.6 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.5 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.4 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.3 29-May-1996  chuck note if we are the boot device (for fixing generic boot)
 1.2 26-Apr-1996  chuck branches: 1.2.4;
- zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.1 18-Apr-1996  chuck new driver: SCSI for VME147
contributed by: Steve Woodford <steve@mctavish.demon.co.uk>

this driver is based on the amiga sbic/33C93 driver. Steve has
cleaned it up and fixed lots of bugs. Note that the original driver
used features which require at least a WD33C93A (the vme147 has the
original WD33C93 chip <no 'A' suffix>). Steve has also written
the DMA routines for the 147 to get things really going. Hardware
scatter-gather DMA and sync. SCSI are not supported (yet). tested
on several disk drives and a tape drive. CD-ROM untested, but
should work.
 1.2.4.1 29-May-1996  chuck import generic boot bug fix
 1.9.4.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.9.2.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.15.8.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.15.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.16.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.19.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.21.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.21.8.1 31-May-2001  nathanw file wdsc.c was added on branch nathanw_sa on 2002-10-18 02:38:58 +0000
 1.21.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.25.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.25.2.1 03-Aug-2004  skrll Sync with HEAD
 1.28.16.1 21-Jan-2008  yamt sync with head
 1.29.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.29.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.29.50.1 23-Mar-2008  matt sync with HEAD
 1.30.10.1 16-May-2008  yamt sync with head.
 1.30.8.1 18-May-2008  yamt sync with head.
 1.30.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.31.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.31.34.1 30-Oct-2012  yamt sync with head
 1.32.42.1 14-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #425):

sys/dev/sbus/sio16.c: revision 1.25
sys/dev/gpib/mt.c: revision 1.33
sys/arch/mvme68k/dev/wdsc.c: revision 1.33
sys/dev/gpib/ct.c: revision 1.31
sys/dev/isa/mcd.c: revision 1.119
sys/dev/pci/if_stge.c: revision 1.73
sys/dev/gpib/ppi.c: revision 1.25
sys/dev/pcmcia/if_tr_pcmcia.c: revision 1.29
sys/arch/amiga/dev/zssc.c: revision 1.46
sys/arch/mac68k/obio/iwm_fd.c: revision 1.57
sys/arch/amiga/dev/if_qn.c: revision 1.48
sys/dev/isa/tcic2_isa.c: revision 1.28
sys/dev/isa/uha_isa.c: revision 1.42
sys/dev/pci/neo.c: revision 1.55
sys/arch/next68k/dev/nextdisplay.c: revision 1.22
sys/dev/isa/if_iy.c: revision 1.111

Add missing initialization of sc_dev.

Initialize sc_dev correctly to avoid null pointer dereference when
bus_space_map() failed.

Add missing initialization of sc_dev.
 1.32.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.32.30.1 14-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1439):

sys/dev/sbus/sio16.c: revision 1.25
sys/dev/gpib/mt.c: revision 1.33
sys/arch/mvme68k/dev/wdsc.c: revision 1.33
sys/dev/gpib/ct.c: revision 1.31
sys/dev/isa/mcd.c: revision 1.119
sys/dev/pci/if_stge.c: revision 1.73
sys/dev/gpib/ppi.c: revision 1.25
sys/dev/pcmcia/if_tr_pcmcia.c: revision 1.29
sys/arch/amiga/dev/zssc.c: revision 1.46
sys/arch/mac68k/obio/iwm_fd.c: revision 1.57
sys/arch/amiga/dev/if_qn.c: revision 1.48
sys/dev/isa/tcic2_isa.c: revision 1.28
sys/dev/isa/uha_isa.c: revision 1.42
sys/dev/pci/neo.c: revision 1.55
sys/arch/next68k/dev/nextdisplay.c: revision 1.22
sys/dev/isa/if_iy.c: revision 1.111

Add missing initialization of sc_dev.


Initialize sc_dev correctly to avoid null pointer dereference when
bus_space_map() failed.


Add missing initialization of sc_dev.
 1.33.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.34.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.2 08-May-1996  thorpej branches: 1.2.68;
RCS id police.
 1.1 18-Apr-1996  chuck new driver: SCSI for VME147
contributed by: Steve Woodford <steve@mctavish.demon.co.uk>

this driver is based on the amiga sbic/33C93 driver. Steve has
cleaned it up and fixed lots of bugs. Note that the original driver
used features which require at least a WD33C93A (the vme147 has the
original WD33C93 chip <no 'A' suffix>). Steve has also written
the DMA routines for the 147 to get things really going. Hardware
scatter-gather DMA and sync. SCSI are not supported (yet). tested
on several disk drives and a tape drive. CD-ROM untested, but
should work.
 1.2.68.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.68.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.68.1 03-Aug-2004  skrll Sync with HEAD
 1.46 18-Jan-2024  thorpej Don't put the MVME1xx model defines into IDENT, make them defflag options and
put them in opt_mvmeconf.h. Make these options depend on the appropriate
M680x0 option (MVME147 -> M68030, MVME16[27] -> M68040, MVME17[27] -> M68060)
so that the CPU option appears correctly in opt_m68k_arch.h.
 1.45 11-Sep-2021  andvar Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
 1.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 11-Apr-2009  scw branches: 1.42.78;
Invoke zs_lock_init() _after_ copying console state to avoid a later
lock-related panic.
 1.41 13-Jun-2008  cegger branches: 1.41.4; 1.41.10;
use device_lookup_private to get softc
 1.40 28-Apr-2008  martin branches: 1.40.2; 1.40.4;
Remove clause 3 and 4 from TNF licenses
 1.39 29-Mar-2008  tsutsui branches: 1.39.2; 1.39.4;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.38 12-Jan-2008  tsutsui branches: 1.38.6;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.37 03-Dec-2007  ad branches: 1.37.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.36 09-Nov-2007  ad Call zs_lock_init() to set up the chanstate's lock.
 1.35 28-Mar-2006  thorpej branches: 1.35.18; 1.35.36; 1.35.38; 1.35.42; 1.35.44;
Use device_unit().
 1.34 11-Dec-2005  christos branches: 1.34.4; 1.34.6; 1.34.8; 1.34.10; 1.34.12;
merge ktrace-lwp.
 1.33 04-Dec-2003  keihan branches: 1.33.16;
NetBSD.ORG -> NetBSD.org

Now all "NetBSD.ORG" are gone from src/sys.
 1.32 15-Jul-2003  lukem __KERNEL_RCSID()
 1.31 28-Jan-2003  pk branches: 1.31.2;
Provide locking required by the interrupt handlers running at IPL_SERIAL.
 1.30 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.29 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.28 07-Jul-2001  scw branches: 1.28.2; 1.28.8; 1.28.16;
bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
 1.27 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.26 21-Nov-2000  scw branches: 1.26.2;
Call zs_set_speed() to calculate the initial timing constants.
 1.25 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.24 18-Nov-2000  scw Fix a braino in the last commit.
 1.23 18-Nov-2000  scw Allow a degree of tolerance when calculating the baudrate timing constant.
 1.22 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.21 21-Jul-2000  scw Make this compile again.
 1.20 20-Jul-2000  scw Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.19 18-Mar-2000  scw branches: 1.19.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.18 27-Mar-1999  wrstuden branches: 1.18.8; 1.18.16;
Add pps support. Only enable pps if CLOCAL & !MDMBUF.
 1.17 11-Feb-1999  mycroft Minor cleanup.
Make the initializer for BAUDLO depend on PCLK directly; it was incorrect on
some ports where PCLK is not 4.9152MHz.
XXX Is the default value actually used?
 1.16 03-Feb-1999  mycroft Don't set DCD_IE in the frontends. KGDB doesn't even use DCD, and the tty
frontends get it from zsparam() anyway.
 1.15 22-Aug-1998  scw vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.14 12-Jan-1998  thorpej Update for changes to config.
 1.13 02-Nov-1997  mycroft Set rr0_dcd.
Don't set DCD_IE and CTS_IE here; let the MI code do it.
Handle MDMBUF.
 1.12 05-Feb-1997  gwr branches: 1.12.12;
Apply that fix from Bill Studenmund that keeps us from ignoring DCD.
Also fix the copyright (s/REGENTS/FOUNDATION/).
 1.11 17-Dec-1996  gwr Adapt to the new version of dev/ic/z8530*
 1.10 09-Dec-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.9 13-Oct-1996  christos backout previous kprintf change
 1.8 10-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 26-Aug-1996  thorpej Update for structure member name changes made in the MI code.
 1.5 26-May-1996  chuck fix cngetc() typeo.
 1.4 26-Apr-1996  chuck branches: 1.4.4;
- zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.3 19-Mar-1996  thorpej Fix typo.
 1.2 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.4.4.2 06-Jun-1996  chuck s/cs_pclk_div16/cs_brg_clk/ as per gwr so we can compile again
 1.4.4.1 27-May-1996  chuck fix cngetc bug
 1.12.12.1 04-Nov-1997  mellon Pull rev 1.13 up from trunk (mycrosoft)
 1.18.16.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.18.16.1 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.18.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.18.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.19.4.2 17-Oct-2000  scw Pullup 1.21 - 1.22 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.19.4.1 22-Jul-2000  scw Pullup from trunk: 1.20 and 1.21
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.26.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.28.16.1 19-May-2002  gehenna Remove hard-coded major.
 1.28.8.3 03-Jan-2003  thorpej Sync with HEAD.
 1.28.8.2 17-Sep-2002  nathanw Catch up to -current.
 1.28.8.1 07-Jul-2001  nathanw file zs.c was added on branch nathanw_sa on 2002-09-17 21:16:03 +0000
 1.28.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.31.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.31.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.31.2.1 03-Aug-2004  skrll Sync with HEAD
 1.33.16.4 21-Jan-2008  yamt sync with head
 1.33.16.3 07-Dec-2007  yamt sync with head
 1.33.16.2 15-Nov-2007  yamt sync with head.
 1.33.16.1 21-Jun-2006  yamt sync with head.
 1.34.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.34.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.34.8.1 01-Apr-2006  yamt sync with head.
 1.34.6.1 22-Apr-2006  simonb Sync with head.
 1.34.4.1 09-Sep-2006  rpaulo sync with head
 1.35.44.3 18-Feb-2008  mjf Sync with HEAD.
 1.35.44.2 08-Dec-2007  mjf Sync with HEAD.
 1.35.44.1 19-Nov-2007  mjf Sync with HEAD.
 1.35.42.1 13-Nov-2007  bouyer Sync with HEAD
 1.35.38.2 23-Mar-2008  matt sync with HEAD
 1.35.38.1 09-Jan-2008  matt sync with HEAD
 1.35.36.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.35.36.1 11-Nov-2007  joerg Sync with HEAD.
 1.35.18.1 03-Dec-2007  ad Sync with HEAD.
 1.37.6.1 19-Jan-2008  bouyer Sync with HEAD
 1.38.6.3 29-Jun-2008  mjf Sync with HEAD.
 1.38.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.38.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.39.4.2 04-May-2009  yamt sync with head.
 1.39.4.1 16-May-2008  yamt sync with head.
 1.39.2.2 17-Jun-2008  yamt sync with head.
 1.39.2.1 18-May-2008  yamt sync with head.
 1.40.4.1 18-Jun-2008  simonb Sync with head.
 1.40.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.41.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.41.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.42.78.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.21 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.20 29-Mar-2008  tsutsui branches: 1.20.2; 1.20.4;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.19 12-Jan-2008  tsutsui branches: 1.19.6;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.18 11-Dec-2005  christos branches: 1.18.50; 1.18.56; 1.18.64;
merge ktrace-lwp.
 1.17 04-Dec-2003  keihan branches: 1.17.16;
NetBSD.ORG -> NetBSD.org

Now all "NetBSD.ORG" are gone from src/sys.
 1.16 15-Jul-2003  lukem __KERNEL_RCSID()
 1.15 02-Oct-2002  thorpej branches: 1.15.6;
Use CFATTACH_DECL().
 1.14 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.13 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.12 31-May-2001  scw branches: 1.12.2; 1.12.8; 1.12.16;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.11 24-Nov-2000  scw branches: 1.11.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.10 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.9 23-Jul-2000  scw G/C cf_unit. It wasn't really being used in a meaningfull way.
 1.8 18-Mar-2000  scw branches: 1.8.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.7 14-Feb-1999  scw branches: 1.7.8; 1.7.16;
Merge support for mvme167 into main tree.
 1.6 12-Jan-1998  thorpej branches: 1.6.8;
Update for changes to config.
 1.5 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.4 19-Mar-1997  gwr branches: 1.4.4;
Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.3 17-Dec-1996  gwr Adapt to the new version of dev/ic/z8530*
 1.2 09-Dec-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.1 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.4.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.6.8.1 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.7.16.3 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.7.16.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.7.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.7.8.2 08-Dec-2000  bouyer Sync with HEAD.
 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.4.1 17-Oct-2000  scw Pullup 1.9 - 1.10 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.11.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.12.16.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.12.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.12.8.2 17-Sep-2002  nathanw Catch up to -current.
 1.12.8.1 31-May-2001  nathanw file zs_pcc.c was added on branch nathanw_sa on 2002-09-17 21:16:04 +0000
 1.12.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.15.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.6.1 03-Aug-2004  skrll Sync with HEAD
 1.17.16.1 21-Jan-2008  yamt sync with head
 1.18.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.18.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.18.50.1 23-Mar-2008  matt sync with HEAD
 1.19.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.19.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.20.4.1 16-May-2008  yamt sync with head.
 1.20.2.1 18-May-2008  yamt sync with head.
 1.14 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.13 29-Mar-2008  tsutsui branches: 1.13.2; 1.13.4;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.12 12-Jan-2008  tsutsui branches: 1.12.6;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.11 11-Dec-2005  christos branches: 1.11.50; 1.11.56; 1.11.64;
merge ktrace-lwp.
 1.10 04-Dec-2003  keihan branches: 1.10.16;
NetBSD.ORG -> NetBSD.org

Now all "NetBSD.ORG" are gone from src/sys.
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 02-Oct-2002  thorpej branches: 1.8.6;
Use CFATTACH_DECL().
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.5 12-Feb-2002  scw branches: 1.5.8;
Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.4 31-May-2001  scw branches: 1.4.2; 1.4.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.3 24-Nov-2000  scw branches: 1.3.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.2 20-Nov-2000  scw branches: 1.2.2;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.1 06-Sep-2000  scw branches: 1.1.2;
Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.1.2.2 17-Oct-2000  scw Pullup new file on the branch. (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.1.2.1 06-Sep-2000  scw file zs_pcctwo.c was added on branch netbsd-1-5 on 2000-10-17 19:54:48 +0000
 1.2.2.4 08-Dec-2000  bouyer Sync with HEAD.
 1.2.2.3 22-Nov-2000  bouyer Sync with HEAD.
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 20-Nov-2000  bouyer file zs_pcctwo.c was added on branch thorpej_scsipi on 2000-11-20 20:15:20 +0000
 1.3.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.4.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.8.1 31-May-2001  nathanw file zs_pcctwo.c was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.4.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.5.8.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 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.16.1 21-Jan-2008  yamt sync with head
 1.11.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.11.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.50.1 23-Mar-2008  matt sync with HEAD
 1.12.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.12.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.13.4.1 16-May-2008  yamt sync with head.
 1.13.2.1 18-May-2008  yamt sync with head.
 1.14 19-Jan-2024  thorpej Make sure to include opt_mvmeconf.h.
 1.13 09-Aug-2021  andvar s/definitons/definitions/
 1.12 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.11 12-Jan-2008  tsutsui branches: 1.11.6; 1.11.8; 1.11.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.10 20-Nov-2000  scw branches: 1.10.40; 1.10.102; 1.10.108; 1.10.116;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.9 15-Nov-2000  scw Doh! Revert all but the baudrate clock changes from that last commit;
a bunch of local stuff crept in.
 1.8 09-Nov-2000  scw The ZS chips are actually clocked at 5MHz and 10MHz on mvme147 and
mvme162 respectively. Thanks to Neil Lubdan and a frequency counter. :-)
 1.7 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.6 20-Jul-2000  scw Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.5 18-Mar-2000  scw branches: 1.5.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.4 12-Jan-1998  thorpej branches: 1.4.16; 1.4.24;
Update for changes to config.
 1.3 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.2 17-Dec-1996  gwr branches: 1.2.10;
Adapt to the new version of dev/ic/z8530*
 1.1 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.2.10.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.24.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.4.24.1 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.4.16.2 22-Nov-2000  bouyer Sync with HEAD.
 1.4.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.5.4.2 17-Oct-2000  scw Pullup 1.6 - 1.7 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.5.4.1 22-Jul-2000  scw Pullup from trunk: 1.6
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.10.116.1 19-Jan-2008  bouyer Sync with HEAD
 1.10.108.1 18-Feb-2008  mjf Sync with HEAD.
 1.10.102.1 23-Mar-2008  matt sync with HEAD
 1.10.40.1 21-Jan-2008  yamt sync with head
 1.11.10.1 16-May-2008  yamt sync with head.
 1.11.8.1 18-May-2008  yamt sync with head.
 1.11.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.1 14-Dec-2000  scw branches: 1.1.2;
Some snippets of documentation for mvme68k...
 1.1.2.2 14-Dec-2000  scw Some snippets of documentation for mvme68k...
 1.1.2.1 14-Dec-2000  scw file Interrupts was added on branch thorpej_scsipi on 2000-12-14 20:30:15 +0000
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 04-Dec-2003  keihan netbsd.org -> NetBSD.org

All "netbsd.org" is now gone from src/sys/arch.
 1.5 12-Aug-2001  scw branches: 1.5.6; 1.5.22;
Some more things ticked off the list.
 1.4 06-Jul-2001  scw branches: 1.4.2;
One less item (h/w assisted soft interrupts)
 1.3 01-Jun-2001  scw Mark evcnt(9) item as done.
 1.2 29-May-2001  scw One less item (MD siop driver is no more).
 1.1 14-Dec-2000  scw branches: 1.1.2; 1.1.4;
Some snippets of documentation for mvme68k...
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 14-Dec-2000  scw Some snippets of documentation for mvme68k...
 1.1.2.1 14-Dec-2000  scw file TODO was added on branch thorpej_scsipi on 2000-12-14 20:30:15 +0000
 1.4.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.5.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.22.1 03-Aug-2004  skrll Sync with HEAD
 1.5.6.2 12-Aug-2001  scw Some more things ticked off the list.
 1.5.6.1 12-Aug-2001  scw file TODO was added on branch nathanw_sa on 2001-08-12 19:28:29 +0000
 1.5 30-Sep-2023  andvar s/resonably/reasonably/.
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.2 04-Dec-2003  keihan netbsd.org -> NetBSD.org

All "netbsd.org" is now gone from src/sys/arch.
 1.1 12-Jan-2002  scw branches: 1.1.2; 1.1.4; 1.1.20;
Move the VMEbus RAM `howto' into the docs directory.
 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.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 12-Jan-2002  nathanw file VMEbus-RAM was added on branch nathanw_sa on 2002-02-28 04:10:52 +0000
 1.1.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.1 12-Jan-2002  jdolecek file VMEbus-RAM was added on branch kqueue on 2002-02-11 20:08:41 +0000
 1.28 30-Nov-2024  christos Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.27 12-Jul-2018  maxv branches: 1.27.36;
Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

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

* Removes the PMC code of ARM XSCALE.

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

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

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

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.26 24-Dec-2015  christos branches: 1.26.16; 1.26.18;
fenv for m68k
 1.25 17-Jul-2011  joerg branches: 1.25.12; 1.25.30;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.24 09-Feb-2007  ad Merge newlock2 to head.
 1.23 26-Jul-2006  drochner branches: 1.23.4;
don't install <machine/db_machdep.h>, this is kernel only
 1.22 11-Dec-2005  christos branches: 1.22.4; 1.22.8;
merge ktrace-lwp.
 1.21 08-May-2004  kleink branches: 1.21.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.20 17-Jan-2003  thorpej branches: 1.20.2;
Merge the nathanw_sa branch.
 1.19 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.18 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.17 28-Nov-2001  kleink branches: 1.17.8;
No point in installing svr4_machdep.h.
 1.16 15-Apr-2001  kleink branches: 1.16.2; 1.16.8;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.15 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.14 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
 1.13 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.12 05-Dec-2000  scw branches: 1.12.2;
Backout the last change; I'll deal with it another way.
 1.11 05-Dec-2000  scw Add loadfile_machdep.h to list of installed machine headers.
 1.10 26-Jun-2000  kleink Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.9 29-Apr-2000  thorpej Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.8 15-Apr-2000  scw Bah, forgot to add intr.h during my last round of roto-tilling.
 1.7 17-Mar-2000  tron Install "machineendian_machdep.h".
 1.6 23-Dec-1999  kleink C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
 1.5 19-Apr-1999  kleink branches: 1.5.2;
Add COMPAT_SVR4 for m68k.
 1.4 15-Mar-1999  minoura branches: 1.4.4;
Pullin m68k/ieee.h.
 1.3 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.2 12-Jul-1998  veego Add elf_machdep.h to the INCS list.
 1.1 12-Jun-1998  cgd Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
 1.4.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.5.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.5.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.5.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.12.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.16.8.5 11-Dec-2002  thorpej Sync with HEAD.
 1.16.8.4 13-Aug-2002  nathanw Catch up to -current.
 1.16.8.3 08-Jan-2002  nathanw Catch up to -current.
 1.16.8.2 10-Nov-2001  scw Kernel mcontext glue for Scheduler Activations on m68k from
Klaus Klein <kleink@netbsd.org>.
 1.16.8.1 15-Apr-2001  scw file Makefile was added on branch nathanw_sa on 2001-11-10 21:22:51 +0000
 1.16.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.16.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.17.8.1 31-Aug-2002  gehenna catch up with -current.
 1.20.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.20.2.1 03-Aug-2004  skrll Sync with HEAD
 1.21.12.2 26-Feb-2007  yamt sync with head.
 1.21.12.1 30-Dec-2006  yamt sync with head.
 1.22.8.1 11-Aug-2006  yamt sync with head
 1.22.4.1 09-Sep-2006  rpaulo sync with head
 1.23.4.1 01-Feb-2007  ad Header file cleanup.
 1.25.30.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.25.12.1 03-Dec-2017  jdolecek update from HEAD
 1.26.18.1 10-Jun-2019  christos Sync with HEAD
 1.26.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.27.36.1 02-Aug-2025  perseant Sync with HEAD
 1.2 07-May-2019  kamil Switch all users (except ia64) of custom machine/ansi.h to common_ansi.h

Deduplicate the code among ports and poll definitions of types
directly from a compiler.

This fixes miscompilation of certain programs that instruct compilers
to generate code for different types. This bug has been detected with
-fshort-wchar in EFI firmware.

Proposed and discussed on a mailing list (twice).

Itanium uses custom !ELF fallback switch, temporarily leave it as it is.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.260;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.260.1 10-Jun-2019  christos Sync with HEAD
 1.3 08-Oct-1996  cgd repoint at shared aout_machdep.h, not exec.h
 1.2 08-Sep-1996  thorpej Use <m68k/exec.h>.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.8 01-Feb-2011  chuck udpate license clauses on my code to match the new-style BSD licenses.
remove no-longer-valid wustl email address for me.
based on diff that rmind@ sent me.

no functional change with this commit.
 1.7 11-Dec-2005  christos branches: 1.7.100; 1.7.106; 1.7.108;
merge ktrace-lwp.
 1.6 23-Oct-2004  thorpej Centralize the declaration of booted_device and booted_partition.
 1.5 23-Oct-2003  jdolecek g/c PARTITIONMASK, it's not used anywhere anymore
 1.4 18-Mar-2000  scw branches: 1.4.28;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 31-Jan-1997  thorpej branches: 1.3.28; 1.3.36;
bootdv -> booted_device
 1.2 12-Sep-1996  thorpej branches: 1.2.2;
Do the extern song and dance.
 1.1 29-May-1996  chuck branches: 1.1.2;
add to fix boot generic problem
 1.1.2.2 29-May-1996  chuck add to fix boot generic problem
 1.1.2.1 29-May-1996  chuck file autoconf.h was added on branch netbsd-1-2 on 1996-05-29 02:32:22 +0000
 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.3.36.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.3.28.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.28.4 02-Nov-2004  skrll Sync with HEAD.
 1.4.28.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.28.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.28.1 03-Aug-2004  skrll Sync with HEAD
 1.7.108.1 08-Feb-2011  bouyer Sync with HEAD
 1.7.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.7.100.1 05-Mar-2011  rmind sync with head
 1.2 21-Aug-1999  simonb Include <sys/bswap.h> for function prototypes. i386, pc532 and vax
still include <machine/byte_swap.h> and define macros for some of
the bswap*() functions.
 1.1 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.3 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file bus.h was initially added on branch scw-mvme167.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 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.17 05-Dec-2021  msaitoh s/from from/from/ in comment.
 1.16 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.15 12-Jan-2008  tsutsui branches: 1.15.6; 1.15.8; 1.15.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.14 04-Mar-2007  christos branches: 1.14.20; 1.14.26; 1.14.32;
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 09-Mar-2005  matt branches: 1.12.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.11 28-Jan-2003  kent branches: 1.11.2; 1.11.10; 1.11.12;
Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it.
 1.10 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.9 19-Jul-2001  thorpej branches: 1.9.6;
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.8 16-May-2001  scw branches: 1.8.2;
Finally nobble the bus_dmamap_sync() problem with osiop(4).

Basically, bus_dmamap_sync() `PREREAD' needs to flush the cache
for the start and end of the region if it is not aligned to
a cacheline boundary, otherwise a subsequent POSTREAD can *purge*
valid data which was in the cacheline but *outside* the region
passed to bus_dmamap_sync().

Bus snooping doesn't always help here because osiop(4) calls
bus_dmamap_sync() with POSTREAD even if no data was actually
transferred! (And we can't rely on snooping on the 68060 models anyway).
 1.7 07-Mar-2001  thorpej Add the BUS_DMA_STREAMING flag.
 1.6 24-Nov-2000  scw branches: 1.6.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.5 20-Aug-2000  scw branches: 1.5.2;
Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
. Get VMEbus slave mode going on mvme147. This should be easy.
. Fix up the A16 slave mappings.
. Bounce buffer support. (Messy, but pretty much a `must have'.)
. Figure out how to deal with `location monitor' interrupts
within the framework. (Useful for Busnet, among other things.)
. It would be nice to make use of the VMEchip2's DMA facilities...
 1.4 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.3 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.2 18-Mar-2000  scw branches: 1.2.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 11-Mar-2000  scw branches: 1.1.2;
file bus_dma.h was initially added on branch scw_mvme68k_bus_space.
 1.1.2.2 13-Mar-2000  scw Add constraints for bus_dmamem_map() to allow allocation from onboard
RAM only, and/or restricting physical addresses to 24-bits.

Also make bus_dmamem_map() actually honour the BUS_DMA_COHERENT flag.
 1.1.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.4.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.5.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.5.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.5.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.2.1 20-Aug-2000  bouyer file bus_dma.h was added on branch thorpej_scsipi on 2000-11-20 20:15:21 +0000
 1.6.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.6.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.8.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.8.2.1 03-Aug-2001  lukem update to -current
 1.9.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.9.6.1 19-Jul-2001  nathanw file bus_dma.h was added on branch nathanw_sa on 2002-02-28 04:10:52 +0000
 1.11.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.11.10.1 29-Apr-2005  kent sync with -current
 1.11.2.1 01-Apr-2005  skrll Sync with HEAD.
 1.12.4.2 21-Jan-2008  yamt sync with head
 1.12.4.1 03-Sep-2007  yamt sync with head.
 1.13.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.32.1 19-Jan-2008  bouyer Sync with HEAD
 1.14.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.14.20.1 23-Mar-2008  matt sync with HEAD
 1.15.10.1 16-May-2008  yamt sync with head.
 1.15.8.1 18-May-2008  yamt sync with head.
 1.15.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.18 27-Jan-2023  tsutsui mvme68k: Specify proper constraints for bus_space_read region and multi ops.

Sync with next68k.
 1.17 23-Jan-2021  christos Remove cargo-culted '#if 0' code that was designed to produce a
compile-time error if any of the bus_space_*_8 functions was used,
but was documented that it produces a link-time error.
 1.16 02-Apr-2020  msaitoh branches: 1.16.4;
s/impliment/implement/ in comment.
 1.15 23-Sep-2019  skrll Provide PRIxBUSADDR, PRIxBUSSIZE, PRIuBUSSIZE, and PRIxBSH for all arches
to follow arm and (generic) mips.

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

Approved by releng.
 1.13 28-Apr-2008  martin branches: 1.13.34; 1.13.38;
Remove clause 3 and 4 from TNF licenses
 1.12 12-Jan-2008  tsutsui branches: 1.12.6; 1.12.8; 1.12.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.11 16-Feb-2006  perry branches: 1.11.44; 1.11.50; 1.11.58;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.10 24-Dec-2005  perry branches: 1.10.2; 1.10.4; 1.10.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.9 11-Dec-2005  christos merge ktrace-lwp.
 1.8 25-Oct-2003  scw branches: 1.8.16;
Simplify bus_space_{read,write}_N. Gcc3 emits better code than the old
compiler with straight C, rather than inline asm. (The latter was slightly
broken anyway with gcc3's more aggressive optimisation).
 1.7 29-Nov-2000  scw branches: 1.7.24;
Add register prefixes.
 1.6 24-Nov-2000  scw Replace the inline C versions of bus_space_{read,write}_N() with
inline assembler. This generates significantly more efficient code,
and trims ~1KB off the size of an mvme68k GENERIC kernel...
 1.5 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.4 25-Jan-2000  drochner branches: 1.4.2;
define a "BUS_SPACE_MAP_PREFETCHABLE" flag which basically means that
device accesses are idempotent (but should not be cached by the CPU)
 1.3 10-Apr-1999  drochner branches: 1.3.2;
add BUS_SPACE_ALIGNED_POINTER() definitions for completeness
 1.2 14-Feb-1999  scw branches: 1.2.4;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file bus_space.h was initially added on branch scw-mvme167.
 1.1.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.3.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.7.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.24.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.2 21-Jan-2008  yamt sync with head
 1.8.16.1 21-Jun-2006  yamt sync with head.
 1.10.6.1 22-Apr-2006  simonb Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.10.2.1 18-Feb-2006  yamt sync with head.
 1.11.58.1 19-Jan-2008  bouyer Sync with HEAD
 1.11.50.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.44.1 23-Mar-2008  matt sync with HEAD
 1.12.10.1 16-May-2008  yamt sync with head.
 1.12.8.1 18-May-2008  yamt sync with head.
 1.12.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.38.1 18-Feb-2012  mrg merge to -current.
 1.13.34.1 17-Apr-2012  yamt sync with head
 1.14.48.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.14.48.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.16.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.57 20-Jan-2024  thorpej Largely unify the <machine/cpu.h> headers on the m68k platforms.
 1.56 19-Jan-2024  thorpej Consistently use "intr_depth" as the name of the interrupt depth counter
on m68k platforms.
 1.55 18-Jan-2024  thorpej Make the M68K_MMU_* defines real kernel options, available in opt_m68k_arch.h.
For 68030, 68040, and 68060, infer M68K_MMU_MOTOROLA. For 68010 and 68020, it
must be an explicit option (set in std.${MACHINE} or, in the case of hp300,
inferred from the specific model option).
 1.54 18-Jan-2024  thorpej Don't put the MVME1xx model defines into IDENT, make them defflag options and
put them in opt_mvmeconf.h. Make these options depend on the appropriate
M680x0 option (MVME147 -> M68030, MVME16[27] -> M68040, MVME17[27] -> M68060)
so that the CPU option appears correctly in opt_m68k_arch.h.
 1.53 16-Jan-2024  thorpej Switch mvme68k over to the common interrupt dispatch code and G/C
__HAVE_LEGACY_INTRCNT.
 1.52 09-Jan-2024  thorpej Remove duplicated / slightly-tweaked loadustp() (load user segment table)
routines from all of the m68k ports using the shared pmap. Instead, in
pmap_init(), set up a function pointer to the appropriate mmu_load_urp*()
function in mmu_subr.s.
 1.51 23-Nov-2019  ad cpu_need_resched():

- Remove all code that should be MI, leaving the bare minimum under arch/.
- Make the required actions very explicit.
- Pass in LWP pointer for convenience.
- When a trap is required on another CPU, have the IPI set it locally.
- Expunge cpu_did_resched().
 1.50 22-Aug-2018  msaitoh - Cleanup for dynamic sysctl:
- Remove unused *_NAMES macros for sysctl.
- Remove unused *_MAXID for sysctls.
- Move CTL_MACHDEP sysctl definitions for m68k into m68k/include/cpu.h and
use them on all m68k machines.
 1.49 17-Dec-2016  flxd branches: 1.49.14; 1.49.16;
Fix typo "one the" and architecture where appropriate.
 1.48 19-Oct-2013  christos branches: 1.48.6; 1.48.10;
make cpu_need_resched() macros consistent; __USE flags
 1.47 02-Feb-2012  tsutsui branches: 1.47.6; 1.47.10;
Always include <m68k/cpu.h> (i.e. outside #if defined(_KERNEL))
for crash(8) as amiga and sun3. There are _KERNEL protections in it.

Briefly tested by "build.sh -m news68k -U build".
Further possible botch will be fixed later.
 1.46 08-Feb-2011  rmind branches: 1.46.4; 1.46.8;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.45 22-Dec-2010  matt branches: 1.45.2; 1.45.4;
Collect cpu_info and friends and move to m68k/include/cpu.h
Add a define __HAVE_CPU_DATA_FIRST which means that cpu_data is the first
member in struct cpu_info.
 1.44 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

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

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.43 21-Oct-2009  rmind branches: 1.43.2; 1.43.4;
Remove uarea swap-out functionality:

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

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

Discussed on <tech-kern>, reviewed by <ad>.
 1.42 27-Feb-2008  xtraeme branches: 1.42.4;
Remove CTL_MACHDEP_NAMES, it's not used anywhere.

Ok by martin@.
 1.41 12-Jan-2008  tsutsui branches: 1.41.2; 1.41.6;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.40 17-Oct-2007  garbled branches: 1.40.2; 1.40.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.39 04-Aug-2007  ad branches: 1.39.2;
Add ci_cpuid where it's missing.
 1.38 21-May-2007  tsutsui branches: 1.38.2; 1.38.4; 1.38.8;
Move declarations of m68k common functions
from <machine/cpu.h> to <m68k/m68k.h>.
While here, remove some obsolete function decls.
 1.37 21-May-2007  tsutsui Adapt rest of m68k ports to yamt-idlelwp. Compile tested only.
 1.36 20-May-2007  mhitch Add missing call to lwp_startup() in lwp_trampoline() (which was renamed
from proc_trampoline to match the other ports).

A DIAGNOSTIC kernel will now boot and run. LOCKDEBUG still doesn't work yet.
Also, my amiga no longer loses time.
 1.35 04-Mar-2007  christos branches: 1.35.2; 1.35.4; 1.35.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.34 16-Feb-2007  ad branches: 1.34.2;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
 1.33 09-Feb-2007  ad Merge newlock2 to head.
 1.32 11-Dec-2005  christos branches: 1.32.20;
merge ktrace-lwp.
 1.31 26-Sep-2004  yamt branches: 1.31.12;
don't expose cpu_info to userland.
 1.30 22-Sep-2004  yamt move some per-cpu data definitions to MI place so that they can be modified
without touching all ports. discussed on tech-kern@.
 1.29 04-Jan-2004  jdolecek Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

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

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

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

g/c now unneeded routines and variables, including the reaper kernel thread
 1.28 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.27 17-Jan-2003  thorpej branches: 1.27.2;
Merge the nathanw_sa branch.
 1.26 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.25 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.24 06-Jul-2001  scw branches: 1.24.2; 1.24.8;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.23 14-Jun-2001  thorpej Don't need to prototype child_return() here, it's in <sys/proc.h>.
 1.22 30-May-2001  mrg use _KERNEL_OPT
 1.21 24-Nov-2000  scw branches: 1.21.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.20 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.19 15-Sep-2000  scw Use the complete ethernet address stored in nvram on mvme162/mvme167
instead of faking the first 5 nibbles a'la mvme147.

Apparently recent mvme16x boards have a new 5 nibble prefix...
 1.18 25-Aug-2000  thorpej Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity. Its use in
roundrobin() still needs some work.
 1.17 24-Jul-2000  scw G/C the IIO* #defines. They're no longer needed.
 1.16 27-May-2000  scw branches: 1.16.4;
Protect against multiple inclusion.
 1.15 27-May-2000  scw s/schedcpu_percpu/schedstate_percpu/
 1.14 26-May-2000  thorpej First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

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

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

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

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

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.13 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.12 10-Aug-1999  thorpej branches: 1.12.2; 1.12.10;
Define cpu_number() as discussed on tech-smp.
 1.11 26-Feb-1999  is MVME68K specific part of fix for PR 6152
 1.10 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.9 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.8 11-Nov-1998  thorpej branches: 1.8.4;
Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.7 13-Feb-1998  scottr Avoid declaring the "astpending" and "want_resched" globals in cpu.h,
as this breaks C++ code that happens to indirectly include this header.
Both Matthias Scheler and I noticed this, independently.

This problem notably does not affect the atari and sun3/sun3x ports,
which have already implemented a similar solution.
 1.6 12-Sep-1996  thorpej - Use MVME "machine options" to associate MVME models with CPU
options (a'la the hp300 port).
- Declare a "machineid" extern.
- Define constants for machineid, which match the Bug's idea
of MVME model numbers.
 1.5 12-Sep-1996  thorpej Prototype badaddr().
 1.4 11-Sep-1996  thorpej Use <m68k/cpu.h>.
 1.3 26-Apr-1996  chuck cpu.h: add prototypes (from jason)
disklabel.h: new disklabel format (from Dale Rahn)
param.h: new delay stuff (from sun3 port)
vmparam.h: nuke eiomap for new autoconfig (from jason)
z8530var.h: for MI driver (from jason)
 1.2 21-Dec-1995  mycroft Remove deprecated cpu_setstack().
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.8.4.1 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.12.10.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.12.10.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.12.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.12.2.2 22-Nov-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.16.4.1 17-Oct-2000  scw Pullup 1.18 - 1.19 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.21.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.24.8.8 03-Dec-2002  gmcgarry Add switch_exit() and switch_lwp_exit() prototypes.
 1.24.8.7 03-Dec-2002  gmcgarry Use cpu_proc_fork().
 1.24.8.6 11-Nov-2002  nathanw Catch up to -current
 1.24.8.5 28-Feb-2002  nathanw Catch up to -current.
 1.24.8.4 08-Dec-2001  thorpej Add a cpu_proc_fork(), called from uvm_proc_fork(), which takes care
of machine-dependent handling a fork() time (this is different from
forking the actual context in an LWP world). #define it away on
platforms which do not need it.

Problem noted by Gregory McGarry.
 1.24.8.3 17-Nov-2001  scw G/C an unused reference to 'struct lwp'
 1.24.8.2 17-Nov-2001  scw Kernel support for Scheduler Activations on m68k-based ports using
mvme68k as a testbed.

Boots multi-user on an mvme162, although userland support for SA is not
yet integrated/tested.
 1.24.8.1 06-Jul-2001  scw file cpu.h was added on branch nathanw_sa on 2001-11-17 13:07:54 +0000
 1.24.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.27.2.5 19-Oct-2004  skrll Sync with HEAD
 1.27.2.4 24-Sep-2004  skrll Sync with HEAD.
 1.27.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.27.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.27.2.1 03-Aug-2004  skrll Sync with HEAD
 1.31.12.4 17-Mar-2008  yamt sync with head.
 1.31.12.3 21-Jan-2008  yamt sync with head
 1.31.12.2 03-Sep-2007  yamt sync with head.
 1.31.12.1 26-Feb-2007  yamt sync with head.
 1.32.20.1 06-Feb-2007  ad Update m68k pasteware.
 1.34.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.35.10.2 03-Oct-2007  garbled Sync with HEAD
 1.35.10.1 22-May-2007  matt Update to HEAD.
 1.35.4.1 11-Jul-2007  mjf Sync with head.
 1.35.2.2 20-Aug-2007  ad Sync with HEAD.
 1.35.2.1 27-May-2007  ad Sync with head.
 1.38.8.1 04-Aug-2007  jmcneill Sync with HEAD.
 1.38.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.38.2.1 07-Aug-2007  matt Sync with HEAD.
 1.39.2.2 23-Mar-2008  matt sync with HEAD
 1.39.2.1 06-Nov-2007  matt sync with HEAD
 1.40.8.1 19-Jan-2008  bouyer Sync with HEAD
 1.40.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.41.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.41.2.1 24-Mar-2008  keiichi sync with head.
 1.42.4.2 11-Aug-2010  yamt sync with head.
 1.42.4.1 11-Mar-2010  yamt sync with head
 1.43.4.2 05-Mar-2011  rmind sync with head
 1.43.4.1 03-Jul-2010  rmind sync with head
 1.43.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.45.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.45.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.46.8.1 18-Feb-2012  mrg merge to -current.
 1.46.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.46.4.1 17-Apr-2012  yamt sync with head
 1.47.10.1 18-May-2014  rmind sync with head
 1.47.6.2 03-Dec-2017  jdolecek update from HEAD
 1.47.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.48.10.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.48.6.1 05-Feb-2017  skrll Sync with HEAD
 1.49.16.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.49.16.1 10-Jun-2019  christos Sync with HEAD
 1.49.14.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.4 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.3 11-Apr-2011  mrg branches: 1.3.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.2 02-Dec-2000  scw branches: 1.2.152; 1.2.158;
Set things up so that DDB can get to the symbol table in ELF kernels.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.34;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.34.1 08-Dec-2000  bouyer Sync with HEAD.
 1.2.158.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.152.1 21-Apr-2011  rmind sync with head
 1.3.14.1 03-Dec-2017  jdolecek update from HEAD
 1.11 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.10 23-Oct-2009  snj Follow revision 1.8 in OpenBSD: remove ad clause.
 1.9 11-Dec-2005  christos branches: 1.9.78;
merge ktrace-lwp.
 1.8 23-Oct-2003  jdolecek g/c PARTITIONSHIFT (not used anywhere) and set MAXPARTITIONS directly to 8
 1.7 31-Aug-2001  simonb branches: 1.7.6; 1.7.22;
Use comments around the token after a #endif.
 1.6 01-Dec-2000  scw branches: 1.6.4;
Add __attribute__((__packed__)) to cpu_disklabel to get around
the ELF padding/alignment constraints.
 1.5 09-Nov-1999  scw Drop some #defines which are now in sys/disklabel.h.
 1.4 16-May-1996  chuck branches: 1.4.32; 1.4.34; 1.4.38;
add some comments to explain what is going on here
also add enough info to enable the kernel to create
a valid disklabel without help from wrtvid.
 1.3 07-May-1996  chuck change maxpart to 8 to be compat with prev binaries
 1.2 26-Apr-1996  chuck cpu.h: add prototypes (from jason)
disklabel.h: new disklabel format (from Dale Rahn)
param.h: new delay stuff (from sun3 port)
vmparam.h: nuke eiomap for new autoconfig (from jason)
z8530var.h: for MI driver (from jason)
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.4.38.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.4.34.1 15-Nov-1999  fvdl Sync with -current
 1.4.32.2 08-Dec-2000  bouyer Sync with HEAD.
 1.4.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.6.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.7.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.22.1 03-Aug-2004  skrll Sync with HEAD
 1.7.6.2 31-Aug-2001  simonb Use comments around the token after a #endif.
 1.7.6.1 31-Aug-2001  simonb file disklabel.h was added on branch nathanw_sa on 2001-08-31 04:44:57 +0000
 1.9.78.1 11-Mar-2010  yamt sync with head
 1.1 12-Jul-1998  thorpej Basic elf_machdep.h for m68k; doesn't include relocations, yet.
 1.3 17-Mar-2000  mycroft In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
 1.2 24-Jan-1999  mycroft branches: 1.2.10;
Format consistency.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 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.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:15:22 +0000
 1.3 08-Oct-1996  cgd moved to aout_machdep.h (via repository copy)
 1.2 08-Sep-1996  thorpej Use <m68k/exec.h>.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.1 27-Dec-2023  thorpej Re-factor the 680x0 Function Code definitions into their own
separate file (as was done on the sun2/sun3 ports ages ago)
and switch everyone to the common header.
 1.1 24-Dec-2015  christos branches: 1.1.2; 1.1.18;
fenv for m68k
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 24-Dec-2015  jdolecek file fenv.h was added on branch tls-maxphys on 2017-12-03 11:36:30 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 24-Dec-2015  skrll file fenv.h was added on branch nick-nhusb on 2015-12-27 12:09:39 +0000
 1.2 03-Feb-1998  mycroft Prototype __flt_rounds() consistently.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.18;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.18.1 08-May-1998  mycroft Sync with trunk, per request of mycroft.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2 30-Aug-1999  mycroft A foolish consistency.
 1.1 15-Mar-1999  minoura Pullin m68k/ieee.h.
 1.1 12-Apr-1996  chuck pull in ieeefp.h from m68k common area
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer constant macros.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
 1.1.12.1 14-Apr-2001  kleink file int_const.h was added on branch nathanw_sa on 2001-04-14 22:38:41 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_const.h was added on branch thorpej_scsipi on 2001-04-21 17:54:08 +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:14 +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:08 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_limits.h was added on branch nathanw_sa on 2001-04-15 15:29:10 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_limits.h was added on branch thorpej_scsipi on 2001-04-21 17:54:08 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 14-Apr-2001  kleink file int_mwgwtypes.h was added on branch nathanw_sa on 2001-04-14 12:19:58 +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:08 +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:15:22 +0000
 1.24 19-Jan-2024  thorpej Add _KERNEL guards around most of the definitions in these files.
 1.23 16-Jan-2024  thorpej Switch mvme68k over to the common interrupt dispatch code and G/C
__HAVE_LEGACY_INTRCNT.
 1.22 11-Jul-2023  riastradh mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
 1.21 19-Apr-2018  christos branches: 1.21.32;
s/static inline/static __inline/g for consistency.
 1.20 22-May-2009  he branches: 1.20.62;
Remove a no-longer-needed include of <sys/device.h>, which now created
a build problem because dvl_mtx has an incomplete type when building
cacheops.o.
 1.19 26-Jun-2008  isaki Unify splraiseipl(9) implementation among m68k ports,
discussed with tsutsui@ on port-m68k.

For mvme68k:
- export ipl2psl_table[] and make it uint16_t
- make makeiplcookie(9) inline
- put PSL_S bit into ipl2psl_table[] rather than adding it in makeiplcookie(9)
- define both IPL_SCHED and IPL_HIGH independently to avoid confusion
- replace the order of IPL_SOFTCLOCK and IPL_SOFTBIO according to spl(9)
 1.18 28-Apr-2008  martin branches: 1.18.2; 1.18.4;
Remove clause 3 and 4 from TNF licenses
 1.17 03-Dec-2007  ad branches: 1.17.14; 1.17.16; 1.17.18;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.16 11-Mar-2007  thorpej branches: 1.16.16; 1.16.18; 1.16.24;
- Shrink ipl_cookie_t from 32-bits to 16-bits (large enough to hold
an SR value or an IPL_* constant).
- Take advange of the smaller ipl_cookie_t to shrink kmutex_t from
16 bytes to 8 bytes by overlapping storage where possible.
- Implement a RAS-based _lock_cas() for mc68010 systems (Sun2). See
sun68k/sun68k/isr.c.

Tested on various m68k platforms, but NOT Sun2. In any case, at least
Sun2 compiles now.
 1.15 16-Feb-2007  ad branches: 1.15.2; 1.15.6;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
 1.14 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.13 16-Feb-2006  perry branches: 1.13.14; 1.13.16;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.12 24-Dec-2005  perry branches: 1.12.2; 1.12.4; 1.12.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.11 06-Jul-2001  scw branches: 1.11.8; 1.11.40;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.10 13-Apr-2001  thorpej Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
 1.9 15-Jan-2001  thorpej branches: 1.9.2;
Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
 1.8 14-Jan-2001  thorpej Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.
 1.7 14-Jan-2001  thorpej Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
 1.6 10-Dec-2000  scw A small splx()/spl0()/soft interrupt related optimisation. If we're
dropping to spl0, use inline code to check if a soft interrupt is
pending instead of taking the hit of a function call to do the check.
 1.5 19-Sep-2000  scw branches: 1.5.2;
Add IPL_SERIAL.
 1.4 22-Aug-2000  thorpej Add spllock(). See spl(9) for details.
 1.3 20-Jul-2000  scw Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.2 18-Mar-2000  scw branches: 1.2.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 11-Mar-2000  scw branches: 1.1.2;
file intr.h was initially added on branch scw_mvme68k_bus_space.
 1.1.2.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.1.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.4.1 22-Jul-2000  scw Pullup from trunk: 1.3
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.5.2.5 21-Apr-2001  bouyer Sync with HEAD
 1.5.2.4 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.5.2.3 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.5.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.2.1 19-Sep-2000  bouyer file intr.h was added on branch thorpej_scsipi on 2000-11-20 20:15:22 +0000
 1.9.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.40.5 07-Dec-2007  yamt sync with head
 1.11.40.4 03-Sep-2007  yamt sync with head.
 1.11.40.3 26-Feb-2007  yamt sync with head.
 1.11.40.2 30-Dec-2006  yamt sync with head.
 1.11.40.1 21-Jun-2006  yamt sync with head.
 1.11.8.2 06-Jul-2001  scw Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.11.8.1 06-Jul-2001  scw file intr.h was added on branch nathanw_sa on 2001-07-06 19:00:15 +0000
 1.12.6.1 22-Apr-2006  simonb Sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.12.2.1 18-Feb-2006  yamt sync with head.
 1.13.16.3 10-Dec-2006  yamt add IPL_VM.
 1.13.16.2 10-Dec-2006  yamt remove unnecessary "#include <sys/spl.h>".
 1.13.16.1 10-Dec-2006  yamt implement splraiseipl and makeiplcookie for mvme68k.
 1.13.14.1 12-Jan-2007  ad Sync with head.
 1.15.6.2 03-Dec-2007  ad Sync with HEAD.
 1.15.6.1 13-Mar-2007  ad Sync with head.
 1.15.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.16.24.1 08-Dec-2007  mjf Sync with HEAD.
 1.16.18.1 09-Jan-2008  matt sync with HEAD
 1.16.16.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.17.18.3 20-Jun-2009  yamt sync with head
 1.17.18.2 04-May-2009  yamt sync with head.
 1.17.18.1 16-May-2008  yamt sync with head.
 1.17.16.1 18-May-2008  yamt sync with head.
 1.17.14.2 29-Jun-2008  mjf Sync with HEAD.
 1.17.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.18.4.1 27-Jun-2008  simonb Sync with head.
 1.18.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.20.62.1 22-Apr-2018  pgoyette Sync with HEAD
 1.21.32.1 09-Aug-2023  martin Pull up following revision(s) (requested by maya in ticket #316):

sys/arch/m68k/include/mutex.h: revision 1.13
sys/arch/arm/include/cpu.h: revision 1.125
sys/arch/sun68k/include/intr.h: revision 1.21
sys/arch/arm/include/mutex.h: revision 1.28
sys/sys/rwlock.h: revision 1.18
sys/arch/powerpc/include/mutex.h: revision 1.7
sys/arch/arm/include/mutex.h: revision 1.29
sys/arch/powerpc/include/mutex.h: revision 1.8
sys/uvm/uvm_param.h: revision 1.42
sys/sys/ksem.h: revision 1.16
sys/arch/x86/include/mutex.h: revision 1.10
sys/sys/proc.h: revision 1.372
sys/sys/ksem.h: revision 1.17
sys/arch/ia64/include/mutex.h: revision 1.8
sys/arch/evbarm/include/intr.h: revision 1.29
sys/sys/lua.h: revision 1.9
sys/arch/next68k/include/intr.h: revision 1.23
sys/arch/ia64/include/mutex.h: revision 1.9
sys/arch/hp300/include/intr.h: revision 1.35
sys/arch/hp300/include/intr.h: revision 1.36
sys/arch/sparc/include/cpu.h: revision 1.111
sys/arch/hppa/include/mutex.h: revision 1.16
sys/arch/vax/include/intr.h: revision 1.31
sys/arch/hppa/include/mutex.h: revision 1.17
sys/arch/news68k/include/intr.h: revision 1.28
sys/arch/hppa/include/mutex.h: revision 1.18
sys/arch/hppa/include/intr.h: revision 1.3
sys/arch/hppa/include/mutex.h: revision 1.19
sys/arch/hppa/include/intr.h: revision 1.4
sys/sys/sched.h: revision 1.92
sys/opencrypto/cryptodev.h: revision 1.51
sys/arch/vax/include/mutex.h: revision 1.20
sys/arch/sparc64/include/mutex.h: revision 1.10
sys/arch/ia64/include/sapicvar.h: revision 1.2
sys/arch/riscv/include/mutex.h: revision 1.5
sys/arch/amiga/dev/grfabs_cc.c: revision 1.39
sys/external/bsd/drm2/include/linux/idr.h: revision 1.11
sys/arch/riscv/include/mutex.h: revision 1.6
sys/ddb/files.ddb: revision 1.16
sys/arch/mac68k/include/intr.h: revision 1.32
share/man/man4/ddb.4: revision 1.203
sys/ddb/db_command.c: revision 1.183
sys/arch/mips/include/mutex.h: revision 1.10
sys/ddb/db_command.c: revision 1.184
sys/arch/x68k/include/intr.h: revision 1.22
sys/arch/sparc/include/psl.h: revision 1.51
sys/arch/or1k/include/mutex.h: revision 1.4
sys/arch/mips/include/mutex.h: revision 1.11
sys/arch/arm/xscale/pxa2x0_intr.h: revision 1.16
sys/arch/sparc64/include/cpu.h: revision 1.134
sys/arch/sparc/include/psl.h: revision 1.52
sys/arch/or1k/include/mutex.h: revision 1.5
sys/arch/mvme68k/include/intr.h: revision 1.22
sys/arch/luna68k/include/intr.h: revision 1.16
external/cddl/osnet/sys/sys/kcondvar.h: revision 1.6
sys/arch/sparc/include/mutex.h: revision 1.12
sys/arch/sparc/include/mutex.h: revision 1.13
sys/arch/usermode/include/mutex.h: revision 1.5
sys/arch/usermode/include/mutex.h: revision 1.6
sys/kern/kern_core.c: revision 1.38
usr.sbin/crash/Makefile: revision 1.49
sys/arch/amiga/include/intr.h: revision 1.23
sys/arch/alpha/include/mutex.h: revision 1.12
sys/arch/alpha/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.16
sys/ddb/ddb.h: revision 1.6
sys/arch/sparc64/include/mutex.h: revision 1.8
sys/arch/sh3/include/mutex.h: revision 1.12
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.17
sys/ddb/db_syncobj.c: revision 1.1
sys/arch/vax/include/mutex.h: revision 1.18
sys/arch/sparc64/include/psl.h: revision 1.63
sys/arch/sparc64/include/mutex.h: revision 1.9
sys/arch/sh3/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/obio.c: revision 1.13
sys/arch/atari/include/intr.h: revision 1.23
sys/ddb/db_syncobj.c: revision 1.2
sys/arch/vax/include/mutex.h: revision 1.19
sys/arch/evbarm/g42xxeb/obio.c: revision 1.14
sys/arch/evbarm/g42xxeb/obio.c: revision 1.15
sys/arch/cesfic/include/intr.h: revision 1.14
sys/ddb/db_syncobj.h: revision 1.1
sys/arch/x86/include/cpu.h: revision 1.134
sys/arch/evbarm/g42xxeb/obio.c: revision 1.16
sys/arch/cesfic/include/intr.h: revision 1.15
sys/arch/arm/xscale/pxa2x0_intr.c: revision 1.26
sys/sys/cpu_data.h: revision 1.54
sys/arch/m68k/include/mutex.h: revision 1.12
sys/arch/ia64/acpi/madt.c: revision 1.6

sys/rwlock.h: Make this more self-contained for bool.

machine/mutex.h: Sprinkle includes so this can be used by crash(8).

ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.

And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.

arm/mutex.h: Need machine/intr.h, machine/lock.h.

For ipl_cookie_t and __cpu_simple_lock_t.
evbarm/intr.h: Define ipl_cookie_t before including ARM_INTR_IMPL.

Otherwise arm/mutex.h doesn't work, due to a cyclic dependency which
should really be fixed.
opencrypto/cryptodev.h: Fix includes.
- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.

hp300/intr.h: Fix missing includes.
linux/idr.h: Need <sys/mutex.h> for kmutex_t.
amiga/intr.h: Don't define spl*() functions if !_KERNEL.

This is used by crash(8) now, and what's important is ipl_cookie_t.
cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8).
cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.

Probably not necessary but let's be a little more cautious about
this.

atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).

arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.

Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.

Move the definition of ipl_cookie_t out of the kernel-only sections,
some _KMEMUSER applications need it.

ddb: Cast pointer to uintptr_t first before db_expr_t.

hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

news68k/intr.h: Fix includes. Put some definitions under _KERNEL.

next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

sys/ksem.h: Hack around fstat(8) abuse of _KERNEL.

sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

x68k/intr.h: Put functions under _KERNEL so crash(8) can use this.

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

Explicitly include <sys/mutex.h> for kmutex_t.

Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.

hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).

mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
Make inclusion of sys/intr.h explicit for spl*.

fix hppa and vax builds.

machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h. avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h. And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.

ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.

re-fix hppa builds.

this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.

Break cycle by using `struct kmutex *' instead of `kmutex_t *'.
sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex. Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT. Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.

ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.

explicitly include no longer implicitly included sys/mutex.h.

arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.
Sidesteps namespace collision with `#define bits ...' in net/zlib.c.

complete the previous - there were two calls to find_first_bit() to fix.

arm/xscale: Missed a spot with previous find_first_bit commit.

evbarm/g42xxeb: Fix off-by-one in previous.

The original find_first_bit(x) was 31 - __builtin_clz((uint32_t)x),
which is equivalent to fls32(x) - 1, not to fls32(x).

Note that fls32 is 1-based and returns 0 for x=0.
 1.1 25-Apr-1997  thorpej Machine-dependent crash dump header - just pulls in <m68k/kcore.h>
 1.3 28-Mar-2012  christos - Normalize inclusion protection (remove)
- Move CHAR_{MIN,MAX} to a common file.
- Fix broken comments
 1.2 09-Jan-1998  perry branches: 1.2.192; 1.2.196;
multiple include protect machine/limits.h, fixes pr 4473 (from Mika Nystrom)
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.196.1 05-Apr-2012  mrg sync to latest -current.
 1.2.192.1 17-Apr-2012  yamt sync with head
 1.7 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.6 30-Mar-2014  christos branches: 1.6.2;
fixes for gcc-4.8 (John D. Baker)
 1.5 28-Apr-2008  martin branches: 1.5.34; 1.5.44; 1.5.50;
Remove clause 3 and 4 from TNF licenses
 1.4 25-Jan-2006  christos branches: 1.4.72; 1.4.74; 1.4.76;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.3 31-Oct-2001  thorpej branches: 1.3.2; 1.3.34; 1.3.46;
Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.2 04-Dec-2000  scw branches: 1.2.2; 1.2.6; 1.2.8;
The LOAD_TEXTA flag is required when loading a.out kernels.

Also add some non-standalone versions for the benefit of installboot(8).
 1.1 30-Nov-2000  scw Prepare to switch mvme68k bootloader over to the MI loadfile().
 1.2.8.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.2.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.2.2.1 04-Dec-2000  bouyer file loadfile_machdep.h was added on branch thorpej_scsipi on 2000-12-08 09:28:36 +0000
 1.3.46.1 01-Feb-2006  yamt sync with head.
 1.3.34.1 21-Jun-2006  yamt sync with head.
 1.3.2.2 31-Oct-2001  thorpej Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.3.2.1 31-Oct-2001  thorpej file loadfile_machdep.h was added on branch nathanw_sa on 2001-10-31 17:20:48 +0000
 1.4.76.1 16-May-2008  yamt sync with head.
 1.4.74.1 18-May-2008  yamt sync with head.
 1.4.72.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.50.1 18-May-2014  rmind sync with head
 1.5.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.2.1 10-Aug-2014  tls Rebase.
 1.1 29-Apr-2000  thorpej branches: 1.1.6;
Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 29-Apr-2000  bouyer file lock.h was added on branch thorpej_scsipi on 2000-11-20 20:15:22 +0000
 1.1 30-Nov-2024  christos branches: 1.1.4;
Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 30-Nov-2024  perseant file lwp_private.h was added on branch perseant-exfatfs on 2025-08-02 05:55:56 +0000
 1.1 23-Dec-1999  kleink branches: 1.1.8;
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.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 23-Dec-1999  bouyer file math.h was added on branch thorpej_scsipi on 2000-11-20 20:15:22 +0000
 1.2 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 10-Nov-2001  scw branches: 1.1.2;
file mcontext.h was initially added on branch nathanw_sa.
 1.1.2.1 10-Nov-2001  scw Kernel mcontext glue for Scheduler Activations on m68k from
Klaus Klein <kleink@netbsd.org>.
 1.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:34 +0000
 1.33 10-Feb-2012  para proper sizing of kmem_arena on different ports

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

Extra verification by snj@.
 1.31 11-Dec-2009  tsutsui branches: 1.31.4; 1.31.6; 1.31.8;
Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSEG, and SEGOFSET from <machine/param.h>
to <m68k/pmap_motorola.h> where they should belong
- also simplify NBSEG macro for both 020/030 and 040/060 cases
- also move m68k_trunc_seg(), m68k_round_seg(), and m68k_seg_offset()
(that use SEGOFSET) from <m68k/param.h> to <m68k/pmap_motorola.h>
- add comments about each segment size value used on pmap_motorola
implementation
- add TIA_SIZE, TIA_SHIFT, TIB_SIZE, and TIB_SHIFT macro which can be
used for ste/pte index sizes
- use proper vaddr_t cast instead of unsigned for SEGOFSET/PGOFSET macro

Tested on atari, hp300, and news68k.
 1.30 09-Dec-2009  tsutsui Fix wrong NBSEG values for all hp300 pmap derived m68k ports.
They were incorrect since 1997 on amiga and atari, and since 2002
on other ports, but fortunately they don't look so fatal.

Anyway, these values will be moved into <m68k/pmap_motorola.h> soon
since they are quite pmap implementation dependent.
 1.29 12-Jan-2008  tsutsui branches: 1.29.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.28 11-Dec-2005  christos branches: 1.28.50; 1.28.56; 1.28.64;
merge ktrace-lwp.
 1.27 11-Sep-2005  he Patterned after next68k, omit inclusion of <sys/device.h> if we
are not in _KERNEL. This should work around our lint problems
related to "unspecified-size array at end of struct" constructs.
 1.26 07-Aug-2003  agc branches: 1.26.14; 1.26.16; 1.26.20;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.25 03-Nov-2002  chs branches: 1.25.6;
merge pmap.h for all 4k-page motorola-MMU (or compatible) m68k platforms.
 1.24 20-Dec-2000  scw branches: 1.24.8;
Some minor optimisations to avoid checking {cpu,mmu}type when
the kernel was built for only one type of CPU.
 1.23 05-Dec-2000  scw UPAGES -> 2 as recommended by Chuck Silvers.
 1.22 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.21 27-May-2000  scw Nuke HP_SEG_SIZE. Use NBSEG instead (as used by m68k_trunc_seg() et al),
which takes into account the mmu type.
 1.20 18-Mar-2000  scw branches: 1.20.2;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.19 11-Feb-2000  thorpej branches: 1.19.2;
Update for the NKMEMPAGES changes.
 1.18 04-Dec-1999  ragge CL* discarding.
 1.17 21-Sep-1999  scw branches: 1.17.2; 1.17.8;
Add #ifdef _KERNEL around the spln() macros.
 1.16 05-Aug-1999  thorpej 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.15 22-May-1999  scw Double the value for NKMEMCLUSTERS, to allow more KVA for LFS et al.
 1.14 20-Feb-1999  scw branches: 1.14.4;
Add splserial().
 1.13 22-Aug-1998  scw vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.12 20-Sep-1997  leo Move the definition of MSGBUFSIZE up to the machine-arch level if
possible. Pointed out by Bernd Ernesti.
 1.11 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.10 10-Jul-1997  veego branches: 1.10.2;
Restore the define of NPTEPG.
 1.9 10-Jun-1997  veego The 'Mach derived conversion macros' are now in <m68k/param.h>
 1.8 10-Jun-1997  veego Use the MI <m68k/param.h> include.
 1.7 24-Feb-1997  fvdl Define ALIGNED_POINTER
 1.6 26-Apr-1996  chuck branches: 1.6.8;
cpu.h: add prototypes (from jason)
disklabel.h: new disklabel format (from Dale Rahn)
param.h: new delay stuff (from sun3 port)
vmparam.h: nuke eiomap for new autoconfig (from jason)
z8530var.h: for MI driver (from jason)
 1.5 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.4 01-Mar-1996  cgd Clean up tabbing/spacing in defns of MACHINE, MACHINE_ARCH, and MID_MACHINE.
 1.3 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.2 13-Aug-1995  mycroft Replace splnet() with splsoftnet(). Add splnet().
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.6.8.1 12-Mar-1997  is Merge in changes from Trunk
 1.10.2.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.17.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.17.2.4 05-Jan-2001  bouyer Sync with HEAD
 1.17.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.17.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.17.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.19.2.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.20.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.24.8.1 11-Nov-2002  nathanw Catch up to -current
 1.25.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.25.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.25.6.1 03-Aug-2004  skrll Sync with HEAD
 1.26.20.1 21-Apr-2006  tron Pull up following revision(s) (requested by oster in ticket #1284):
sys/arch/mvme68k/include/param.h: revision 1.27
sys/arch/hp300/include/param.h: revision 1.46
Patterned after next68k, omit inclusion of <sys/device.h> if we
are not in _KERNEL. This should work around our lint problems
related to "unspecified-size array at end of struct" constructs.
 1.26.16.2 21-Jan-2008  yamt sync with head
 1.26.16.1 21-Jun-2006  yamt sync with head.
 1.26.14.1 21-Apr-2006  tron Pull up following revision(s) (requested by oster in ticket #1284):
sys/arch/mvme68k/include/param.h: revision 1.27
sys/arch/hp300/include/param.h: revision 1.46
Patterned after next68k, omit inclusion of <sys/device.h> if we
are not in _KERNEL. This should work around our lint problems
related to "unspecified-size array at end of struct" constructs.
 1.28.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.28.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.28.50.1 23-Mar-2008  matt sync with HEAD
 1.29.10.1 11-Mar-2010  yamt sync with head
 1.31.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.31.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.31.4.1 05-Mar-2011  rmind sync with head
 1.32.8.1 18-Feb-2012  mrg merge to -current.
 1.32.4.1 17-Apr-2012  yamt sync with head
 1.2 31-Mar-1997  gwr Need a common <m68k/pcb.h> for gdb.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.27 03-Nov-2002  chs merge pmap.h for all 4k-page motorola-MMU (or compatible) m68k platforms.
 1.26 22-Sep-2002  chs it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not. doh.
 1.25 22-Sep-2002  chs add pmap_remove_all() hook (empty on most platforms so far).
 1.24 10-Sep-2001  chris branches: 1.24.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.23 26-May-2001  chs branches: 1.23.2; 1.23.4;
replace vm_page_t with struct vm_page *.
 1.22 26-May-2001  chs replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}.
 1.21 16-May-2001  scw Finally nobble the bus_dmamap_sync() problem with osiop(4).

Basically, bus_dmamap_sync() `PREREAD' needs to flush the cache
for the start and end of the region if it is not aligned to
a cacheline boundary, otherwise a subsequent POSTREAD can *purge*
valid data which was in the cacheline but *outside* the region
passed to bus_dmamap_sync().

Bus snooping doesn't always help here because osiop(4) calls
bus_dmamap_sync() with POSTREAD even if no data was actually
transferred! (And we can't rely on snooping on the 68060 models anyway).
 1.20 22-Apr-2001  thorpej Undo a misguided previous change to the pmap_update() API.
 1.19 22-Apr-2001  thorpej Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
 1.18 21-Apr-2001  thorpej #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
 1.17 22-Sep-2000  scw branches: 1.17.2;
Add pmap_zero_page_uncached(), and the PMAP_PAGEIDLEZERO macro.
 1.16 27-May-2000  scw Nuke HP_SEG_SIZE. Use NBSEG instead (as used by m68k_trunc_seg() et al),
which takes into account the mmu type.
 1.15 18-Mar-2000  scw branches: 1.15.2;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.14 26-Feb-1999  is branches: 1.14.8; 1.14.16;
MVME68K specific part of fix for PR 6152
 1.13 16-Jan-1999  chuck MNN is no longer optional
 1.12 22-Aug-1998  scw vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.11 21-Feb-1998  scw Whoops, cgd's pmap_map change got lost! Put it back.
 1.10 21-Feb-1998  scw Implement changes for MACHINE_NEW_NONCONTIG and UVM.
 1.9 18-Feb-1998  cgd Move pmap_map() function definition to MD headers, as appropriate. It's
an internal function, and the VM system shouldn't try to prototype it.
(Note that some ports _don't_ prototype it.)
 1.8 06-Jan-1998  thorpej Garbage-collect pm_stchanged; it's not used by anything.
 1.7 06-Jan-1998  thorpej Garbage-collect use of the PCB's copy of the user segment table pointer.
 1.6 03-Jan-1998  thorpej Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
 1.5 01-Jan-1998  thorpej Change an argument name to PMAP_ACTIVATE() to more accurately describe the
semantics of the argument.
 1.4 01-Jan-1998  thorpej - Make pmap_activate() and pmap_deactivate() take a struct proc *.
- Define active_user_pmap() and use it in the appropriate places (from hp300
port).
 1.3 09-Oct-1997  scw Added support for VMEbus RAM cards via MACHINE_NONCONTIG.
The kernel should still compile and run without it, but I've
put the config option in std.mvme68k so it's built like this
as standard.
 1.2 21-Jun-1997  scw branches: 1.2.4;
Deleted m68k_round_seg and m68k_trunc_seg. They're in common m68k/param.h now.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.16.3 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.14.16.2 14-Mar-2000  scw s/v/va/
 1.14.16.1 13-Mar-2000  scw Add constraints for bus_dmamem_map() to allow allocation from onboard
RAM only, and/or restricting physical addresses to 24-bits.

Also make bus_dmamem_map() actually honour the BUS_DMA_COHERENT flag.
 1.14.8.2 23-Apr-2001  bouyer Sync with HEAD.
 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.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.17.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.23.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.23.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.23.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.24.4.6 11-Nov-2002  nathanw Catch up to -current
 1.24.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.24.4.4 02-Jul-2002  nathanw Adjust whitespace so that this matches the trunk.
 1.24.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.24.4.2 17-Nov-2001  scw Kernel support for Scheduler Activations on m68k-based ports using
mvme68k as a testbed.

Boots multi-user on an mvme162, although userland support for SA is not
yet integrated/tested.
 1.24.4.1 10-Sep-2001  scw file pmap.h was added on branch nathanw_sa on 2001-11-17 13:07:54 +0000
 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:00 +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:28 +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:33 +0000
 1.3 13-Jul-2002  scw m68k syscall rototill:

- Switch all m68k-based ports over to __HAVE_SYSCALL_INTERN.
- Add systrace glue.
- Define struct mdproc in <m68k/proc.h> instead of <machine/proc.h>.
(They were all defined exactly the same anyway, other than a couple
of the MDP_* flags.)
 1.2 27-Jul-2000  scw branches: 1.2.4; 1.2.8; 1.2.16;
G/C some obsolete HP-UX related flags, and prevent multiple
inclusion while I'm here.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.34;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.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.16.1 16-Jul-2002  gehenna catch up with -current.
 1.2.8.2 01-Aug-2002  nathanw Catch up to -current.
 1.2.8.1 17-Nov-2001  scw Kernel support for Scheduler Activations on m68k-based ports using
mvme68k as a testbed.

Boots multi-user on an mvme162, although userland support for SA is not
yet integrated/tested.
 1.2.4.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.18 23-Sep-2013  tsutsui Make MVMEPROM_ARG2() macro take two args in a single asm statement.

Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.

Should be pulled up to netbsd-6 branches.
 1.17 24-Dec-2005  perry branches: 1.17.112; 1.17.118; 1.17.122; 1.17.124; 1.17.128; 1.17.134;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.16 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.15 11-Dec-2005  christos merge ktrace-lwp.
 1.14 10-Dec-2003  agc branches: 1.14.16;
Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
 1.13 24-Oct-2003  scw gcc3 bitches about a gratuitous use of __CONCAT(), so just delete it.
 1.12 09-Nov-2001  scw branches: 1.12.16;
The success/failure status for some Bug syscalls is indicated by the Z
flag in the status register, not by a value on the stack.

How this ever worked for so long is beyond me...
 1.11 14-Apr-2001  scw branches: 1.11.2; 1.11.6; 1.11.8;
Fix bootline argument passing from the Bug PROM.
 1.10 05-Dec-2000  scw branches: 1.10.2;
Add some #defines for offsets into the bugargs structure, and make the
register names usable within assembly code.
 1.9 04-Dec-2000  scw s/a6/fp/ again...
 1.8 04-Dec-2000  scw Prefix the register names with `%'.
 1.7 30-Nov-2000  scw Ditch an extra % in a register prefix, and s/a6/fp/
 1.6 29-Nov-2000  scw Add register prefixes.
 1.5 01-Aug-1998  scw branches: 1.5.14;
Changes to keep lint happy.
In particular, fix some Makefiles so the include
paths are passed to lint.
 1.4 05-Nov-1997  thorpej asm volatile -> __asm__ __volatile
 1.3 30-Aug-1996  thorpej branches: 1.3.14;
RCS id police.
 1.2 19-May-1996  chuck move rb_nosym/rb_sboot here
 1.1 16-May-1996  chuck import Theo's prom.h from OpenBSD. includes my recent changes.
 1.3.14.1 05-Nov-1997  thorpej Update from trunk: asm volatile -> __asm__ __volatile
 1.5.14.2 21-Apr-2001  bouyer Sync with HEAD
 1.5.14.1 08-Dec-2000  bouyer Sync with HEAD.
 1.10.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.11.8.1 14-Apr-2001  nathanw file prom.h was added on branch nathanw_sa on 2002-01-08 00:26:34 +0000
 1.11.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.11.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.16.1 03-Aug-2004  skrll Sync with HEAD
 1.14.16.1 21-Jun-2006  yamt sync with head.
 1.17.134.1 23-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.17.128.1 18-May-2014  rmind sync with head
 1.17.124.1 26-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.17.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.118.1 23-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.17.112.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2 14-Oct-2002  chs merge pte.h for m68k w/ motorola or compatible MMU
(only 4k-page platforms so far).
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.54;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.54.1 18-Oct-2002  nathanw Catch up to -current.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 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:34 +0000
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2 13-Sep-1998  mycroft Minor change.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.3 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.2 22-Jan-1999  mycroft Standardize format.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2 11-Dec-2005  christos branches: 1.2.18;
merge ktrace-lwp.
 1.1 11-Jul-2005  christos branches: 1.1.6;
Add m68k sunos_machdep.h
 1.1.6.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.6.1 11-Jul-2005  skrll file sunos_machdep.h was added on branch ktrace-lwp on 2005-11-10 13:57:47 +0000
 1.2.18.2 21-Jun-2006  yamt sync with head.
 1.2.18.1 11-Dec-2005  yamt file sunos_machdep.h was added on branch yamt-lazymbuf on 2006-06-21 14:54:01 +0000
 1.4 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.3 09-Nov-1999  kleink branches: 1.3.42; 1.3.220;
Rip protection against multiple inclusion from wrapper headers.
 1.2 29-Apr-1999  kleink branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10;
Pull in the right generic m68k header. (Where was my mind?)
 1.1 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.2.10.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.6.1 15-Nov-1999  fvdl Sync with -current
 1.2.4.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3.220.1 10-Jun-2019  christos Sync with HEAD
 1.3.42.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.16 16-Jan-2024  thorpej Switch mvme68k over to the common interrupt dispatch code and G/C
__HAVE_LEGACY_INTRCNT.
 1.15 01-Apr-2021  simonb Define __HAVE_LEGACY_INTRCNT to indicate this port uses legacy intrcnt
interrupt accounting.
 1.14 20-Jan-2008  joerg branches: 1.14.110; 1.14.112;
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.13 07-Jan-2008  tsutsui Add timecounter(9) support for mvme68k.

Based on a patch from Garrett D'Amore and several tweaks by me.
Compile tested only, but reviewed by joerg@ and
no objection from scw@ on port-mvme68k.
 1.12 17-Oct-2007  garbled branches: 1.12.2; 1.12.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.11 14-Jul-2007  ad branches: 1.11.10;
Generic soft interrupts are mandatory.
 1.10 09-Sep-2006  gdamore branches: 1.10.10; 1.10.18;
Convet to MI todr. Ok steve@.
 1.9 28-Feb-2002  simonb branches: 1.9.32; 1.9.50; 1.9.62;
Use "#define<tab>".
 1.8 14-Jan-2001  thorpej branches: 1.8.4; 1.8.8;
Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.
 1.7 25-Jul-2000  scw Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER.
 1.6 23-Jul-2000  scw __BROKEN_CONFIG_UNIT_USAGE is no longer required for mvme68k.
 1.5 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.4 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.3 18-Mar-1997  thorpej branches: 1.3.24;
Get rid of __BDEVSW_DUMP_OLD_TYPE and __BROKEN_INDIRECT_CONFIG.
 1.2 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.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.3.24.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.3.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.8.8.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.8.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.9.62.1 18-Nov-2006  ad Sync with head.
 1.9.50.1 14-Sep-2006  yamt sync with head.
 1.9.32.3 21-Jan-2008  yamt sync with head
 1.9.32.2 03-Sep-2007  yamt sync with head.
 1.9.32.1 30-Dec-2006  yamt sync with head.
 1.10.18.1 03-Oct-2007  garbled Sync with HEAD
 1.10.10.1 15-Jul-2007  ad Sync with head.
 1.11.10.3 23-Mar-2008  matt sync with HEAD
 1.11.10.2 09-Jan-2008  matt sync with HEAD
 1.11.10.1 06-Nov-2007  matt sync with HEAD
 1.12.8.2 23-Jan-2008  bouyer Sync with HEAD.
 1.12.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.12.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.14.112.1 03-Apr-2021  thorpej Sync with HEAD.
 1.14.110.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2 16-Jan-2024  thorpej Switch mvme68k over to the common interrupt dispatch code and G/C
__HAVE_LEGACY_INTRCNT.
 1.1 13-Jan-2024  thorpej Switch mvme68k to the common m68k vector table.
 1.39 08-Feb-2025  tsutsui Bump DFLSSIZ from 512KB to 2MB on all hp300 pmap m68k ports.

Some modern applications could require 512KB buffer on stack and
no particular comment on port-m68k@:
https://mail-index.netbsd.org/port-m68k/2025/02/02/msg000893.html
 1.38 01-Feb-2020  tsutsui branches: 1.38.30;
Add MAX/MIN PAGE_SIZE and PAGE_SHIFT definitions of m68k for jemalloc(3).

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

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

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

Should be pulled up to netbsd-9.
 1.37 28-Jun-2019  tsutsui branches: 1.37.2; 1.37.4;
Fix lingering page size comments.

Pointed out by christos@ on port-m68k@:
http://mail-index.netbsd.org/port-m68k/2019/06/06/msg000726.html

XXX: we also need MAX_PAGE_SIZE in somewhere for newer jemalloc?
 1.36 02-Feb-2017  rin branches: 1.36.14;
PR port-mac68k/51923
Bump default MAXTSIZ to 32MB for m68k ports, which allos us to use GCC 5.4 on
GENERIC kernels.
Ok jklos
 1.35 02-Feb-2017  rin PR port-mac68k/51923
Remove unused SYSPTSIZE and USRPTSIZE from m68k ports.
Ok jklos
 1.34 08-Feb-2011  rmind branches: 1.34.14; 1.34.32; 1.34.36; 1.34.40;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.33 02-Jan-2011  tsutsui branches: 1.33.2; 1.33.4;
Remove "last kernel PT page" stuff derived from hp300 where PA != VA.

Compile test only, but same changes as other PA == VA m68k ports like
luna68k, news68k, and x68k used for a decade.
 1.32 06-Nov-2010  uebayasi Remove incomplete, never worked dynamic run-time memory registration
(uvm_page_physload(9)). This functionality will be re-added later.
 1.31 08-Dec-2009  tsutsui branches: 1.31.2; 1.31.4;
Use PGSHIFT from <machine/param.h> for PAGE_SHIFT.
We can assume PGSHIFT is always constant on current
m68k pmap_motorola implementation.
Also fix some leftover HP300 comments on some ports.
 1.30 26-Aug-2009  thorpej Minor tweak to the pv_table management in the Hibler-derived m68k pmaps:
The head of the list is now a pv_header, which contains the first pv_entry
as well as a 16-bit attributes field (replaces the pmap_attributes array
plus the pv_entry::pv_flags field) as a 16-bit count of caller-specified
cache-inhibited mappings.

Tested on hp300 (shared pmap_motorola.c), changes to atari and amiga copies
are purely mechanical.
 1.29 06-Mar-2009  joerg Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
 1.28 25-Oct-2007  yamt branches: 1.28.20; 1.28.28; 1.28.34;
defparam PAGER_MAP_SIZE.
 1.27 11-Dec-2005  christos branches: 1.27.30; 1.27.48; 1.27.50; 1.27.54;
merge ktrace-lwp.
 1.26 01-Apr-2005  yamt branches: 1.26.2;
merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.25 07-Aug-2003  agc branches: 1.25.8; 1.25.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.24 02-Apr-2003  thorpej branches: 1.24.2;
Use PAGE_SIZE rather than NBPG.
 1.23 10-Dec-2002  thorpej Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
 1.22 15-Nov-2001  soren MAXSLP is defined to be a machine-independent scheduling parameter,
so move it into sys/param.h.
 1.21 01-May-2001  thorpej branches: 1.21.2; 1.21.8;
Per discussion w/ chuck and chuck, restructure the md page stuff
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
 1.20 29-Apr-2001  thorpej Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure. Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM. These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

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

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now). Changes to other pmap
modules will follow.
 1.19 29-Apr-2001  scw Compute PAGER_MAP_SIZE at runtime to avoid needlessly crippling large-
memory models for the benefit of small-memory models.

Uses a heuristic of min(onboard_ram_size/2, 16MB).
 1.18 14-Apr-2001  scw Define a PAGER_MAP_SIZE of 4MB for the benefit of low-memory models.
XXX: This may still not be low enough for models with less than 8MB RAM...
 1.17 01-Dec-2000  tsutsui branches: 1.17.2;
Remove unused pcbb() macro.
 1.16 14-Nov-2000  thorpej We use 4K pages on the mvme68k. Override PAGE_SIZE and friends to
be compile-time constants.
 1.15 27-Jul-2000  scw Bump DFLDSIZ to 32MB since 16MB is no longer enough for some
parts of `make build'.
 1.14 11-Feb-2000  thorpej Update for the NKMEMPAGES changes.
 1.13 26-Jan-2000  tsutsui Remove obsoleted macros.
 1.12 04-Dec-1999  ragge CL* discarding.
 1.11 26-Apr-1999  thorpej branches: 1.11.2; 1.11.8;
Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
 1.10 16-Jan-1999  chuck branches: 1.10.6;
MNN is no longer optional
 1.9 22-Aug-1998  scw vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.8 08-Jul-1998  thorpej Put VMEbus RAM on a lower priority free list, since it's much slower (because
the MVME-147 doesn't cache access to any VMEbus space).
 1.7 18-Mar-1998  thorpej Make MACHINE_NEW_NONCONTIG non-optional.
 1.6 21-Feb-1998  scw Implement changes for MACHINE_NEW_NONCONTIG and UVM.
 1.5 12-Oct-1997  scw Move MACHINE_NONCONTIG from std.mvme68k to <machine/vmparam.h> as per
Jason's request.
 1.4 12-Jul-1997  perry branches: 1.4.2;
update comment from 1981 on memory and disk prices -- pr-2754 from Curt Sampson
 1.3 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.2 26-Apr-1996  chuck branches: 1.2.6; 1.2.10;
cpu.h: add prototypes (from jason)
disklabel.h: new disklabel format (from Dale Rahn)
param.h: new delay stuff (from sun3 port)
vmparam.h: nuke eiomap for new autoconfig (from jason)
z8530var.h: for MI driver (from jason)
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.10.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.2.6.1 12-Feb-1997  mrg initial work for dynamic swap additions.
 1.4.2.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.10.6.2 06-Aug-1999  chs take an initial guess at UBC parameters.
 1.10.6.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.4 21-Apr-2001  bouyer Sync with HEAD
 1.11.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.11.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.11.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.17.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.21.8.3 11-Dec-2002  thorpej Sync with HEAD.
 1.21.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.21.8.1 01-May-2001  nathanw file vmparam.h was added on branch nathanw_sa on 2002-01-08 00:26:34 +0000
 1.21.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.24.2.4 01-Apr-2005  skrll Sync with HEAD.
 1.24.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.24.2.1 03-Aug-2004  skrll Sync with HEAD
 1.25.10.1 23-Feb-2005  yamt change kernel va layout, following mac68k.
 1.25.8.1 29-Apr-2005  kent sync with -current
 1.26.2.1 27-Oct-2007  yamt sync with head.
 1.27.54.1 13-Nov-2007  bouyer Sync with HEAD
 1.27.50.1 06-Nov-2007  matt sync with HEAD
 1.27.48.1 28-Oct-2007  joerg Sync with HEAD.
 1.27.30.1 03-Dec-2007  ad Sync with HEAD.
 1.28.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.28.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.28.20.3 11-Mar-2010  yamt sync with head
 1.28.20.2 16-Sep-2009  yamt sync with head
 1.28.20.1 04-May-2009  yamt sync with head.
 1.31.4.1 05-Mar-2011  rmind sync with head
 1.31.2.1 26-Apr-2010  uebayasi Remove the unfinished code to add a memory segment after uvm_page_init().
It doesn't even compile.

(In the future, we should allocate struct vm_page [] on the added memory
segment for NUMA's sake.)
 1.33.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.33.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.34.40.1 21-Apr-2017  bouyer Sync with HEAD
 1.34.36.1 20-Mar-2017  pgoyette Sync with HEAD
 1.34.32.1 05-Feb-2017  skrll Sync with HEAD
 1.34.14.1 03-Dec-2017  jdolecek update from HEAD
 1.36.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.37.4.1 29-Feb-2020  ad Sync with head.
 1.37.2.1 10-Feb-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #682):

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

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

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

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

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

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

Should be pulled up to netbsd-9.
 1.38.30.1 02-Aug-2025  perseant Sync with HEAD
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 08-May-2004  kleink branches: 1.1.2;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 08-May-2004  skrll file wchar_limits.h was added on branch ktrace-lwp on 2004-08-03 10:38:08 +0000
 1.13 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.12 12-Jan-2008  tsutsui branches: 1.12.6;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.11 18-Nov-2007  he branches: 1.11.6;
Ensure that file ends with a newline.
 1.10 07-Nov-2007  ad Merge tty changes from the vmlocking branch.
 1.9 11-Dec-2005  christos branches: 1.9.30; 1.9.48; 1.9.50; 1.9.54; 1.9.56;
merge ktrace-lwp.
 1.8 07-Aug-2003  agc branches: 1.8.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.7 31-May-2001  scw branches: 1.7.8; 1.7.24;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.6 10-Dec-2000  scw branches: 1.6.2;
Define `splzs()' to be `splserial()' instead of `spl4()', which was
wrong anyway since it blindly set SPL to 4 regardless of the prevailing
level.
 1.5 20-Jul-2000  scw Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.4 17-Dec-1996  gwr branches: 1.4.30; 1.4.42;
Adapt to the new version of dev/ic/z8530*
(Note: now define zsc_softc here.)
 1.3 13-Oct-1996  christos backout previous kprintf change
 1.2 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.1 26-Apr-1996  chuck cpu.h: add prototypes (from jason)
disklabel.h: new disklabel format (from Dale Rahn)
param.h: new delay stuff (from sun3 port)
vmparam.h: nuke eiomap for new autoconfig (from jason)
z8530var.h: for MI driver (from jason)
 1.4.42.1 22-Jul-2000  scw Pullup from trunk: 1.5
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.4.30.2 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.4.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.6.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.24.1 03-Aug-2004  skrll Sync with HEAD
 1.7.8.2 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.7.8.1 31-May-2001  scw file z8530var.h was added on branch nathanw_sa on 2001-05-31 18:46:10 +0000
 1.8.16.3 21-Jan-2008  yamt sync with head
 1.8.16.2 07-Dec-2007  yamt sync with head
 1.8.16.1 15-Nov-2007  yamt sync with head.
 1.9.56.2 18-Feb-2008  mjf Sync with HEAD.
 1.9.56.1 19-Nov-2007  mjf Sync with HEAD.
 1.9.54.2 18-Nov-2007  bouyer Sync with HEAD
 1.9.54.1 13-Nov-2007  bouyer Sync with HEAD
 1.9.50.3 23-Mar-2008  matt sync with HEAD
 1.9.50.2 09-Jan-2008  matt sync with HEAD
 1.9.50.1 08-Nov-2007  matt sync with -HEAD
 1.9.48.2 21-Nov-2007  joerg Sync with HEAD.
 1.9.48.1 11-Nov-2007  joerg Sync with HEAD.
 1.9.30.1 03-Dec-2007  ad Sync with HEAD.
 1.11.6.1 19-Jan-2008  bouyer Sync with HEAD
 1.12.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.48 18-Jan-2024  thorpej Don't put the MVME1xx model defines into IDENT, make them defflag options and
put them in opt_mvmeconf.h. Make these options depend on the appropriate
M680x0 option (MVME147 -> M68030, MVME16[27] -> M68040, MVME17[27] -> M68060)
so that the CPU option appears correctly in opt_m68k_arch.h.
 1.47 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.46 29-Jul-2012  mlelstv branches: 1.46.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.45 08-Feb-2011  rmind branches: 1.45.4; 1.45.10;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.44 12-Jan-2008  tsutsui branches: 1.44.32; 1.44.38; 1.44.40;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.43 03-Dec-2007  ad branches: 1.43.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.42 26-Feb-2006  thorpej branches: 1.42.24; 1.42.42; 1.42.44; 1.42.50;
Use device_is_a()
 1.41 23-Feb-2006  thorpej Use device_parent().
 1.40 11-Dec-2005  christos branches: 1.40.2; 1.40.4; 1.40.6;
merge ktrace-lwp.
 1.39 23-Oct-2004  thorpej branches: 1.39.12;
Centralize the declaration of booted_device and booted_partition.
 1.38 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.37 15-Jul-2003  lukem __KERNEL_RCSID()
 1.36 18-Jun-2003  drochner branches: 1.36.2;
don't #include <sys/dkstat.h> where it is (appearently) unused
 1.35 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.34 26-Sep-2002  thorpej Get the pointer to the driver name early, rather than constantly
deferencing the cfdriver pointer.
 1.33 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.32 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.31 31-May-2001  scw branches: 1.31.2; 1.31.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.30 03-May-2001  scw Recognise `osiop' as a boot device.
 1.29 25-Apr-2001  bouyer Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.28 20-Nov-2000  scw branches: 1.28.2;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.27 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.26 25-Jul-2000  scw Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER.
 1.25 20-Jul-2000  scw Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.24 18-Mar-2000  scw branches: 1.24.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.23 17-Sep-1999  thorpej branches: 1.23.2; 1.23.10;
Centralize the declaration and clearing of `cold'.
 1.22 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.21 23-Aug-1999  thorpej Garbage-collect reference to <sys/dmap.h>.
 1.20 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.19 20-Feb-1999  scw branches: 1.19.4;
Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.18 10-Oct-1998  scw Make 'configure()' agree with the prototype in <sys/device.h>.
(Returns 'void').
 1.17 12-Jan-1998  thorpej Update for changes to config.
 1.16 13-Oct-1997  thorpej We don't need to call isrinit() twice.
 1.15 26-Mar-1997  gwr branches: 1.15.4;
Move findroot/setroot stuff from configure() to cpu_rootconf().
 1.14 18-Mar-1997  thorpej Get rid of __BROKEN_INDIRECT_CONFIG.
 1.13 31-Jan-1997  thorpej branches: 1.13.2;
Use new machine-independent setroot().
 1.12 13-Oct-1996  christos branches: 1.12.2;
backout previous kprintf change
 1.11 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.10 12-Sep-1996  thorpej Grok machineid.
 1.9 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.8 29-May-1996  chuck fix generic boot code
 1.7 26-May-1996  chuck kill "options GENERIC" by replacing it with Theo's sparc code.
 1.6 08-May-1996  thorpej branches: 1.6.4;
RCS id police.
 1.5 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 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 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.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.6.4.2 29-May-1996  chuck import generic boot bug fix
 1.6.4.1 27-May-1996  chuck fix boot "-a"
 1.12.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.13.2.1 02-Mar-1997  mrg swapconf() is no more.
 1.15.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.19.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.23.10.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.23.10.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.23.2.3 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.23.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.23.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.24.4.1 22-Jul-2000  scw Pullup from trunk: 1.25
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.28.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.31.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.31.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.31.8.1 31-May-2001  nathanw file autoconf.c was added on branch nathanw_sa on 2002-02-28 04:10:52 +0000
 1.31.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.31.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.36.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.36.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.36.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.36.2.1 03-Aug-2004  skrll Sync with HEAD
 1.39.12.3 21-Jan-2008  yamt sync with head
 1.39.12.2 07-Dec-2007  yamt sync with head
 1.39.12.1 21-Jun-2006  yamt sync with head.
 1.40.6.1 22-Apr-2006  simonb Sync with head.
 1.40.4.1 09-Sep-2006  rpaulo sync with head
 1.40.2.1 01-Mar-2006  yamt sync with head.
 1.42.50.2 18-Feb-2008  mjf Sync with HEAD.
 1.42.50.1 08-Dec-2007  mjf Sync with HEAD.
 1.42.44.2 23-Mar-2008  matt sync with HEAD
 1.42.44.1 09-Jan-2008  matt sync with HEAD
 1.42.42.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.42.24.1 03-Dec-2007  ad Sync with HEAD.
 1.43.6.1 19-Jan-2008  bouyer Sync with HEAD
 1.44.40.1 17-Feb-2011  bouyer Sync with HEAD
 1.44.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.44.32.1 05-Mar-2011  rmind sync with head
 1.45.10.1 08-Aug-2012  martin Pull up following revision(s) (requested by mlelstv in ticket #466):
sys/arch/amiga/amiga/autoconf.c: revision 1.113
sys/arch/rs6000/rs6000/autoconf.c: revision 1.4
sys/arch/emips/emips/autoconf.c: revision 1.6
sys/arch/sandpoint/sandpoint/autoconf.c: revision 1.27
sys/arch/evbmips/alchemy/autoconf.c: revision 1.18
sys/arch/sgimips/sgimips/autoconf.c: revision 1.43
sys/arch/atari/atari/autoconf.c: revision 1.63
sys/arch/powerpc/oea/ofw_autoconf.c: revision 1.17
sys/arch/mmeye/mmeye/autoconf.c: revision 1.9
distrib/sets/lists/comp/mi: revision 1.1771
sys/arch/mipsco/mipsco/autoconf.c: revision 1.25
sys/arch/iyonix/iyonix/autoconf.c: revision 1.14
sys/arch/hp300/hp300/autoconf.c: revision 1.100
sys/kern/init_main.c: revision 1.445
sys/arch/pmax/pmax/autoconf.c: revision 1.79
sys/arch/netwinder/netwinder/autoconf.c: revision 1.11
sys/arch/dreamcast/dreamcast/autoconf.c: revision 1.10
sys/arch/ibmnws/ibmnws/autoconf.c: revision 1.12
sys/arch/evbppc/ev64260/autoconf.c: revision 1.17
sys/arch/evbmips/gdium/autoconf.c: revision 1.5
sys/arch/algor/algor/autoconf.c: revision 1.21
share/man/man9/Makefile: revision 1.367
sys/arch/ews4800mips/ews4800mips/autoconf.c: revision 1.9
sys/arch/amigappc/amigappc/autoconf.c: revision 1.5
sys/arch/x86/x86/x86_autoconf.c: revision 1.65
sys/arch/acorn26/acorn26/autoconf.c: revision 1.9
sys/arch/mvmeppc/mvmeppc/autoconf.c: revision 1.13
sys/arch/vax/vax/autoconf.c: revision 1.94
sys/arch/usermode/dev/cpu.c: revision 1.72
sys/arch/evbppc/virtex/autoconf.c: revision 1.5
sys/arch/next68k/next68k/autoconf.c: revision 1.26
sys/arch/mac68k/mac68k/autoconf.c: revision 1.73
sys/arch/ia64/ia64/autoconf.c: revision 1.6
sys/arch/evbppc/obs405/obs405_autoconf.c: revision 1.6
share/man/man9/cpu_rootconf.9: revision 1.7
sys/arch/landisk/landisk/autoconf.c: revision 1.6
sys/arch/evbmips/malta/autoconf.c: revision 1.16
sys/arch/sun3/sun3/autoconf.c: revision 1.76
sys/arch/evbppc/explora/autoconf.c: revision 1.13
sys/arch/sun3/sun3/autoconf.c: revision 1.77
sys/arch/evbmips/loongson/autoconf.c: revision 1.3
sys/arch/evbmips/atheros/autoconf.c: revision 1.11
sys/arch/sparc64/sparc64/autoconf.c: revision 1.188
sys/arch/acorn32/acorn32/autoconf.c: revision 1.18
sys/arch/evbarm/evbarm/autoconf.c: revision 1.13
sys/arch/cobalt/cobalt/autoconf.c: revision 1.30
sys/arch/mvme68k/mvme68k/autoconf.c: revision 1.46
sys/arch/hp700/hp700/autoconf.c: revision 1.48
sys/arch/evbmips/adm5120/autoconf.c: revision 1.5
sys/arch/hpcmips/hpcmips/autoconf.c: revision 1.25
sys/arch/alpha/alpha/autoconf.c: revision 1.52
sys/arch/sparc/sparc/autoconf.c: revision 1.244
sys/arch/evbppc/pmppc/autoconf.c: revision 1.7
sys/arch/bebox/bebox/autoconf.c: revision 1.25
sys/arch/luna68k/luna68k/autoconf.c: revision 1.13
sys/arch/hpcarm/hpcarm/autoconf.c: revision 1.20
sys/arch/evbppc/walnut/autoconf.c: revision 1.21
sys/arch/cesfic/cesfic/autoconf.c: revision 1.26
sys/arch/cats/cats/autoconf.c: revision 1.17
sys/arch/x68k/x68k/autoconf.c: revision 1.67
sys/arch/news68k/news68k/autoconf.c: revision 1.21
sys/arch/arc/arc/autoconf.c: revision 1.34
sys/arch/evbsh3/evbsh3/autoconf.c: revision 1.11
sys/sys/conf.h: revision 1.143
sys/arch/evbmips/rasoc/autoconf.c: revision 1.3
sys/arch/hpcsh/hpcsh/autoconf.c: revision 1.26
sys/arch/sun68k/sun68k/autoconf.c: revision 1.29
sys/arch/evbmips/rmixl/autoconf.c: revision 1.6
sys/arch/zaurus/zaurus/autoconf.c: revision 1.12
sys/arch/xen/x86/autoconf.c: revision 1.15
sys/arch/evbppc/mpc85xx/autoconf.c: revision 1.6
sys/arch/shark/shark/autoconf.c: revision 1.18
sys/arch/prep/prep/autoconf.c: revision 1.25
sys/arch/newsmips/newsmips/autoconf.c: revision 1.36
sys/arch/sbmips/sbmips/autoconf.c: revision 1.8
Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.
No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().
Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().
Make cpu_rootconf(9) describe the calling order.
add rootconf(9) as a link to cpu_rootconf(9)
make this compile again
 1.45.4.1 30-Oct-2012  yamt sync with head
 1.46.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.40 26-Jul-2022  andvar s/functin/function/ in copy pasted comment.
 1.39 05-Dec-2021  msaitoh s/from from/from/ in comment.
 1.38 21-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.37 12-Nov-2010  uebayasi branches: 1.37.72;
Pull in uvm/uvm.h where UVM's page level interface is used.
 1.36 04-Jun-2008  ad branches: 1.36.20;
vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both.
 1.35 28-Apr-2008  martin branches: 1.35.2;
Remove clause 3 and 4 from TNF licenses
 1.34 12-Jan-2008  tsutsui branches: 1.34.6; 1.34.8; 1.34.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.33 08-Mar-2007  he branches: 1.33.20; 1.33.26; 1.33.32;
Convert a local variable from void* to vaddr_t, which is neutral in the
number of casts. In another instance, use char* before pointer arithmetic.
 1.32 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.31 01-Mar-2006  yamt branches: 1.31.20;
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.30 11-Dec-2005  christos branches: 1.30.2; 1.30.4; 1.30.6;
merge ktrace-lwp.
 1.29 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.28 01-Apr-2005  yamt branches: 1.28.2; 1.28.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.27 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.26 28-Nov-2004  thorpej branches: 1.26.4; 1.26.6;
bus_dmamap_load_mbuf(): Skip zero-length mbufs.
kern/24811
 1.25 16-Sep-2004  rumble Correct a few comment typos that have propagated through the
tree.
 1.24 16-May-2004  wiz "panicking" needs a k.
 1.23 29-Jun-2003  fvdl branches: 1.23.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.22 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.21 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.20 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.19 10-Sep-2001  chris branches: 1.19.4; 1.19.12;
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.18 12-Aug-2001  scw branches: 1.18.2;
Slight tweak: Avoid needlessly purging cachelines which we've just flushed.
 1.17 18-Jul-2001  scw In bus_dmamap_sync4060(), fold the POSTREAD case into the PREREAD case
where it belonged in the first place.
 1.16 07-Jul-2001  scw branches: 1.16.2;
bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
 1.15 26-May-2001  chs replace vm_page_t with struct vm_page *.
 1.14 16-May-2001  scw Finally nobble the bus_dmamap_sync() problem with osiop(4).

Basically, bus_dmamap_sync() `PREREAD' needs to flush the cache
for the start and end of the region if it is not aligned to
a cacheline boundary, otherwise a subsequent POSTREAD can *purge*
valid data which was in the cacheline but *outside* the region
passed to bus_dmamap_sync().

Bus snooping doesn't always help here because osiop(4) calls
bus_dmamap_sync() with POSTREAD even if no data was actually
transferred! (And we can't rely on snooping on the 68060 models anyway).
 1.13 11-May-2001  scw Take the offset and length into account inside bus_dmamap_sync().
(Inspired from the Atari version).

This fixes a problem seen with the new MI osiop driver.
 1.12 01-May-2001  scw Don't panic in _bus_dmamap_sync() if a segment start address/length are
not aligned to a cacheline boundary.

Instead round down the start address, round up the length and "DTRT".
 1.11 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.10 21-Mar-2001  soren s/vm_page_alloc_memory/uvm_pglistalloc/ in panic message.
 1.9 26-Dec-2000  dbj branches: 1.9.2;
fix logic error in bus_dmamap_sync that was preventing from flush/purging
full pages instead of only by cache lines
 1.8 20-Aug-2000  scw branches: 1.8.2;
Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
. Get VMEbus slave mode going on mvme147. This should be easy.
. Fix up the A16 slave mappings.
. Bounce buffer support. (Messy, but pretty much a `must have'.)
. Figure out how to deal with `location monitor' interrupts
within the framework. (Useful for Busnet, among other things.)
. It would be nice to make use of the VMEchip2's DMA facilities...
 1.7 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.6 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.5 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.4 26-Jun-2000  simonb Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.3 24-Jun-2000  scw Make these compile when DIAGNOSTIC isn't defined.
 1.2 18-Mar-2000  scw branches: 1.2.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 11-Mar-2000  scw branches: 1.1.2;
file bus_dma.c was initially added on branch scw_mvme68k_bus_space.
 1.1.2.4 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.1.2.3 14-Mar-2000  scw s/segs/nsegs/
 1.1.2.2 13-Mar-2000  scw Add constraints for bus_dmamem_map() to allow allocation from onboard
RAM only, and/or restricting physical addresses to 24-bits.

Also make bus_dmamem_map() actually honour the BUS_DMA_COHERENT flag.
 1.1.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.4.2 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.2.4.1 25-Jun-2000  scw Pullup from trunk: 1.2-1.3
Authorised by: thorpej

GC some unused variables when DIAGNOSTIC and M68040 are undefined.
 1.8.2.4 27-Mar-2001  bouyer Sync with HEAD.
 1.8.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.8.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.8.2.1 20-Aug-2000  bouyer file bus_dma.c was added on branch thorpej_scsipi on 2000-11-20 20:15:23 +0000
 1.9.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.9.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.16.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.16.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.16.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.16.2.1 03-Aug-2001  lukem update to -current
 1.18.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.19.12.1 14-Jul-2002  gehenna catch up with -current.
 1.19.4.2 20-Jun-2002  nathanw Catch up to -current.
 1.19.4.1 10-Sep-2001  nathanw file bus_dma.c was added on branch nathanw_sa on 2002-06-20 03:40:00 +0000
 1.23.2.7 11-Dec-2005  christos Sync with head.
 1.23.2.6 01-Apr-2005  skrll Sync with HEAD.
 1.23.2.5 18-Dec-2004  skrll Sync with HEAD.
 1.23.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.23.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.23.2.2 03-Aug-2004  skrll Sync with HEAD
 1.23.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.26.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.26.6.1 11-Feb-2005  yamt use new apis.
 1.26.4.1 29-Apr-2005  kent sync with -current
 1.28.8.1 29-Nov-2005  yamt sync with head.
 1.28.2.3 21-Jan-2008  yamt sync with head
 1.28.2.2 03-Sep-2007  yamt sync with head.
 1.28.2.1 21-Jun-2006  yamt sync with head.
 1.30.6.1 22-Apr-2006  simonb Sync with head.
 1.30.4.1 09-Sep-2006  rpaulo sync with head
 1.30.2.1 18-Feb-2006  yamt adapt the rest of MD code.
 1.31.20.1 12-Mar-2007  rmind Sync with HEAD.
 1.33.32.1 19-Jan-2008  bouyer Sync with HEAD
 1.33.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.33.20.1 23-Mar-2008  matt sync with HEAD
 1.34.10.2 04-May-2009  yamt sync with head.
 1.34.10.1 16-May-2008  yamt sync with head.
 1.34.8.2 17-Jun-2008  yamt sync with head.
 1.34.8.1 18-May-2008  yamt sync with head.
 1.34.6.2 05-Jun-2008  mjf Sync with HEAD.

Also fix build.
 1.34.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.35.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.36.20.1 05-Mar-2011  rmind sync with head
 1.37.72.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.11 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.10 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.9 12-Jan-2008  tsutsui branches: 1.9.6; 1.9.8; 1.9.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.8 08-Mar-2007  he branches: 1.8.20; 1.8.26; 1.8.32;
Cast to char* before doing pointer arithmetic.
 1.7 04-Mar-2007  christos 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 15-Jul-2003  lukem branches: 1.5.16;
__KERNEL_RCSID()
 1.4 24-Nov-2000  scw branches: 1.4.24;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.3 16-Nov-2000  scw branches: 1.3.2;
bus_dmamem_map() expect a cpu-relative physical address...
 1.2 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 11-Mar-2000  scw branches: 1.1.2;
file bus_space.c was initially added on branch scw_mvme68k_bus_space.
 1.1.2.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.1.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.3.2.4 08-Dec-2000  bouyer Sync with HEAD.
 1.3.2.3 22-Nov-2000  bouyer Sync with HEAD.
 1.3.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.2.1 16-Nov-2000  bouyer file bus_space.c was added on branch thorpej_scsipi on 2000-11-20 20:15:23 +0000
 1.4.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.24.1 03-Aug-2004  skrll Sync with HEAD
 1.5.16.2 21-Jan-2008  yamt sync with head
 1.5.16.1 03-Sep-2007  yamt sync with head.
 1.6.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.8.32.1 19-Jan-2008  bouyer Sync with HEAD
 1.8.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.8.20.1 23-Mar-2008  matt sync with HEAD
 1.9.10.1 16-May-2008  yamt sync with head.
 1.9.8.1 18-May-2008  yamt sync with head.
 1.9.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.27 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.26 12-Jan-2008  tsutsui branches: 1.26.44; 1.26.54;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.25 07-Jan-2008  tsutsui Add timecounter(9) support for mvme68k.

Based on a patch from Garrett D'Amore and several tweaks by me.
Compile tested only, but reviewed by joerg@ and
no objection from scw@ on port-mvme68k.
 1.24 09-Sep-2006  gdamore branches: 1.24.30; 1.24.36; 1.24.44;
Convet to MI todr. Ok steve@.
 1.23 11-Dec-2005  christos branches: 1.23.8; 1.23.20;
merge ktrace-lwp.
 1.22 04-Jun-2005  he branches: 1.22.2;
Fix the various todr_gettime() and todr_settime() fallouts from
-Wcast-qual differently, by instead changing the signatore of those
"functions" to take a "volatile struct timeval*" instead of a
"struct timeval*". Many places, these functions are called with
&time, and time is declared as volatile in <sys/kernel.h>. This
way we can get rid of all the ugly casts which now also triggered
warnings, and caused more code to be added to work around the
problem.

Reviewed by thorpej.
 1.21 03-Jun-2005  scw Fix -Wcast-qual fallout.
 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 18-Jul-2003  thorpej Rename clock_rtc_config() to todr_attach().
 1.18 15-Jul-2003  lukem __KERNEL_RCSID()
 1.17 12-Feb-2002  scw branches: 1.17.16;
Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.16 12-Aug-2001  scw branches: 1.16.6;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.15 31-May-2001  scw branches: 1.15.2;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.14 14-Apr-2001  scw Implement a real microtime() by reading the timer counter register.
On mvme147 this gives 6.25uS resolution, and 1uS on all other boards.
 1.13 04-Jun-2000  cgd branches: 1.13.4;
Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.12 18-Mar-2000  scw branches: 1.12.2;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.11 19-Jan-2000  msaitoh branches: 1.11.2;
check whether tv_usec >= 1000000
 1.10 22-Aug-1998  scw branches: 1.10.14;
vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.9 12-Jan-1998  thorpej Update for changes to config.
 1.8 05-Nov-1996  thorpej Trim the name of the clock interrupt event counters. They were one byte
too long, causing a panic in DIAGNOSTIC kernels.

From Steve Woodford <steve@mctavish.demon.co.uk>, on the port-mvme68k
mailing list.
 1.7 13-Oct-1996  christos backout previous kprintf change
 1.6 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.5 12-Sep-1996  thorpej Grab the stat clock stuff from the SPARC port, and glue it to the
second timer on the PCC.
 1.4 08-May-1996  thorpej RCS id police.
 1.3 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.2 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.10.14.2 21-Apr-2001  bouyer Sync with HEAD
 1.10.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.11.2.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.11.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.12.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.13.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.15.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.15.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.16.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.16.6.1 12-Aug-2001  nathanw file clock.c was added on branch nathanw_sa on 2002-02-28 04:10:53 +0000
 1.17.16.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.17.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.16.1 03-Aug-2004  skrll Sync with HEAD
 1.22.2.2 21-Jan-2008  yamt sync with head
 1.22.2.1 30-Dec-2006  yamt sync with head.
 1.23.20.1 18-Nov-2006  ad Sync with head.
 1.23.8.1 14-Sep-2006  yamt sync with head.
 1.24.44.2 19-Jan-2008  bouyer Sync with HEAD
 1.24.44.1 08-Jan-2008  bouyer Sync with HEAD
 1.24.36.1 18-Feb-2008  mjf Sync with HEAD.
 1.24.30.2 23-Mar-2008  matt sync with HEAD
 1.24.30.1 09-Jan-2008  matt sync with HEAD
 1.26.54.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.26.44.1 30-Oct-2012  yamt sync with head
 1.5 12-Aug-2001  scw clockreg.h is no longer needed now we use the MI mk48txx driver.
 1.4 18-Mar-2000  scw branches: 1.4.8;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 08-May-1996  thorpej branches: 1.3.32; 1.3.40;
RCS id police.
 1.2 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.3.40.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 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.8.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.8 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.7 12-Aug-2001  scw branches: 1.7.6;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.6 14-Apr-2001  scw branches: 1.6.2;
Implement a real microtime() by reading the timer counter register.
On mvme147 this gives 6.25uS resolution, and 1uS on all other boards.
 1.5 18-Mar-2000  scw branches: 1.5.6;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.4 12-Jan-1998  thorpej branches: 1.4.16; 1.4.24;
Update for changes to config.
 1.3 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.2 12-Sep-1996  thorpej branches: 1.2.10;
Grab the stat clock stuff from the SPARC port, and glue it to the
second timer on the PCC.
 1.1 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.2.10.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.24.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.4.16.2 21-Apr-2001  bouyer Sync with HEAD
 1.4.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.5.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.6.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.6.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.7.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.7.6.1 12-Aug-2001  nathanw file clockvar.h was added on branch nathanw_sa on 2002-02-28 04:10:53 +0000
 1.31 11-Dec-2005  christos merge ktrace-lwp.
 1.30 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.29 15-Jul-2003  lukem __KERNEL_RCSID()
 1.28 26-Oct-2002  jdolecek branches: 1.28.6;
now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
 1.27 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.26 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.25 17-Jun-2002  christos MD systrace gluons.
 1.24 19-Jan-2002  scw branches: 1.24.8;
Make this compile again.
 1.23 12-Jan-2002  manu Added clockctl
 1.22 21-Mar-2001  lukem branches: 1.22.2; 1.22.8;
move duplicate definitions for:
pc, lpt, joy, ocis, apm, satlink, i4bctl, i4brbch, i4btel, i4btrc, i4b
from the port-specific arch/*/*/conf.c files into sys/conf.h
 1.21 06-Sep-2000  scw branches: 1.21.2;
Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.20 18-Mar-2000  scw branches: 1.20.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.19 18-Sep-1999  scw branches: 1.19.2; 1.19.10;
Make this compile again.
 1.18 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.17 14-Feb-1999  scw branches: 1.17.4;
Merge support for mvme167 into main tree.
 1.16 21-Nov-1998  scw branches: 1.16.4;
Fix misplaced comma...
 1.15 13-Nov-1998  oster Updating of bdev's and cdev's to support RAIDframe.
 1.14 10-Oct-1998  thorpej Add scsibus entry points to the cdevsw[].
 1.13 16-Oct-1997  christos fix chrtoblk declaration
 1.12 13-Oct-1997  explorer o Make usage of /dev/random dependant on
pseudo-device rnd # /dev/random and in-kernel generator
in config files.

o Add declaration to all architectures.

o Clean up copyright message in rnd.c, rnd.h, and rndpool.c to include
that this code is derived in part from Ted Tyso's linux code.
 1.11 01-Jun-1997  thorpej branches: 1.11.4;
Add the ipfilter device at cdev major 7.
 1.10 28-Dec-1996  pk rename: ramdisk => md
 1.9 09-Nov-1996  chuck - new lpt driver, contributed by Steve Woodford <steve@mctavish.demon.co.uk>
- added 1.1 and 1.2 compat to VME147 config file
 1.8 08-Nov-1996  chuck add ch/rd(chr)/ss/uk devices as requested by mycroft, plus some minor clean up
 1.7 05-Sep-1996  mycroft Remove duplicate declarations of LKM functions and macros.
 1.6 20-May-1996  chuck add ram-disk. clean.
 1.5 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.4 03-Apr-1996  chuck fix christos' type-o: s/dec_decl/dev_decl/ on line 115.
 1.3 14-Mar-1996  christos fdopen -> filedescopen
 1.2 17-Aug-1995  thorpej Add entries for the ccd.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.11.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.16.4.1 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.17.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.19.10.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.19.2.2 27-Mar-2001  bouyer Sync with HEAD.
 1.19.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.20.4.1 17-Oct-2000  scw Pullup 1.20 - 1.21 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.21.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.22.8.6 11-Nov-2002  nathanw Catch up to -current
 1.22.8.5 17-Sep-2002  nathanw Catch up to -current.
 1.22.8.4 01-Aug-2002  nathanw Catch up to -current.
 1.22.8.3 20-Jun-2002  nathanw Catch up to -current.
 1.22.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.22.8.1 21-Mar-2001  nathanw file conf.c was added on branch nathanw_sa on 2002-02-28 04:10:53 +0000
 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 11-Feb-2002  jdolecek Sync w/ -current.
 1.24.8.3 21-Jul-2002  gehenna catch up with -current.
 1.24.8.2 14-Jul-2002  gehenna catch up with -current.
 1.24.8.1 16-May-2002  gehenna Bye block/character device swicth tables.
 1.28.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.28.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.28.6.1 03-Aug-2004  skrll Sync with HEAD
 1.7 02-Nov-2002  chs enhance the common m68k db_memrw.c to handle read-only kernel text
and switch all the motorola-MMU m68k platforms to use it.
 1.6 08-Aug-2000  scw branches: 1.6.8;
Avoid calling printf() when we're either in DDB, or about to call
Debugger(). Use db_printf() instead.

This fixes a problem whereby it was impossible to enter the debugger
if the CPU was spinning in lockmgr() for the proclist lock, because
printf() calls logwakeup(), which eventually calls proclist_lock_read(),
which then spins in lockmgr() yet again...

[Note: This change was prematurely committed to the 1.5 branch by
mistake. Since it would've been pulled up anyway, I won't
be sending a pullup request.]
 1.5 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.4 22-Aug-1998  scw branches: 1.4.14; 1.4.26;
vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.3 16-Aug-1998  scw Switch to using the common m68k stuff for a couple of things:

. cache control functions <m68k/cacheops.h>
. sigreturn code <m68k/m68k/sigreturn.s>

Also a few of other things found while scouting around for vm_offset_t
changes.
 1.2 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.1 18-Mar-1997  thorpej branches: 1.1.4;
Use the hp300 db_memrw.c, which works with read-only kernel text.
 1.1.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.26.1 08-Aug-2000  scw Avoid calling printf() when we're either in DDB, or about to call
Debugger(). Use db_printf() instead.

This fixes a problem whereby it was impossible to enter the debugger
if the CPU was spinning in lockmgr() for the proclist lock, because
printf() calls logwakeup(), which eventually calls proclist_lock_read(),
which then spins in lockmgr() yet again...
 1.4.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.8.1 11-Nov-2002  nathanw Catch up to -current
 1.36 03-Apr-2019  christos centralize setdisklabel(9)
 1.35 23-Oct-2009  snj branches: 1.35.64;
Follow revision 1.28 in OpenBSD: remove ad clause.
 1.34 11-Apr-2009  scw Fix previous. printlp() and printclp() are not varargs functions.
 1.33 12-Jan-2008  tsutsui branches: 1.33.10; 1.33.18; 1.33.24;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.32 17-Oct-2007  garbled branches: 1.32.2; 1.32.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.31 08-Oct-2007  ad Merge brelse() changes from the vmlocking branch.
 1.30 25-Nov-2006  scw branches: 1.30.8; 1.30.16; 1.30.26; 1.30.28; 1.30.30;
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.29 11-Dec-2005  christos branches: 1.29.20; 1.29.22;
merge ktrace-lwp.
 1.28 03-Jun-2005  scw branches: 1.28.2;
Fix -Wshadow and -Wcast-qual fallout.
 1.27 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.26 15-Jul-2003  lukem __KERNEL_RCSID()
 1.25 10-May-2003  thorpej branches: 1.25.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.24 02-May-2003  dsl Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
 1.23 05-Mar-2002  simonb Don't cast argument to ffs() to long.
Per discussion on port-alpha, noticed by Robert Elz.
 1.22 19-Feb-2002  wiz strategy should have an 'r'. Inspired by similar change in OpenBSD.
 1.21 07-Jul-2001  scw branches: 1.21.2; 1.21.4; 1.21.8;
bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
 1.20 20-Nov-2000  chs rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
 1.19 25-Jul-2000  scw Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER.
 1.18 18-Mar-2000  scw branches: 1.18.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.17 18-Jan-2000  thorpej branches: 1.17.2;
Use b_cylinder as defined in sys/buf.h
 1.16 31-Jan-1999  scw branches: 1.16.8; 1.16.14;
Make this compile again.
 1.15 22-Aug-1998  scw branches: 1.15.6;
vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.14 08-Aug-1998  scw Fix -Werror compilation failure due to lack of a couple of 'const's.
 1.13 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.12 31-Jan-1997  thorpej branches: 1.12.6; 1.12.8;
bootdv -> booted_device
 1.11 08-Nov-1996  chuck branches: 1.11.2;
apply netbsd pr#2598 from der mouse:
everything before the beginning of the "a" partition on a disk
is read-only except when accessed via RAW_PART. (a problem if
"a" isn't at the front of the disk). pointed out by pk back
in july.
 1.10 13-Oct-1996  christos backout previous kprintf change
 1.9 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.8 29-May-1996  chuck borrow part of the sparc port's dk_establish to fix generic boot
 1.7 16-May-1996  chuck branches: 1.7.4;
add code so that we can generate a valid disklabel without help from
wrtvid.
 1.6 08-May-1996  chuck don't assume MAXPARTITIONS is 16.
 1.5 01-May-1996  chuck change dk_establish() back to void again.
 1.4 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.3 18-Apr-1996  chuck establish a dk_establish() function.
 1.2 10-Aug-1995  chuck add bounds_check_with_label(), and thus sync with hp300 version.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.7.4.1 29-May-1996  chuck import generic boot bug fix
 1.11.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.12.8.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.12.6.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.15.6.1 31-Jan-1999  scw Make this compile again.
 1.16.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.16.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.16.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.17.2.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.18.4.1 26-Jun-2002  he Apply patch (requested by scw):
Fix detection of booted device. Required to make it possible to
boot from tape.
 1.21.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.21.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.21.8.1 07-Jul-2001  nathanw file disksubr.c was added on branch nathanw_sa on 2002-02-28 04:10:53 +0000
 1.21.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.21.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.25.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.25.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.25.2.1 03-Aug-2004  skrll Sync with HEAD
 1.28.2.3 21-Jan-2008  yamt sync with head
 1.28.2.2 27-Oct-2007  yamt sync with head.
 1.28.2.1 30-Dec-2006  yamt sync with head.
 1.29.22.1 10-Dec-2006  yamt sync with head.
 1.29.20.1 12-Jan-2007  ad Sync with head.
 1.30.30.1 14-Oct-2007  yamt sync with head.
 1.30.28.2 23-Mar-2008  matt sync with HEAD
 1.30.28.1 06-Nov-2007  matt sync with HEAD
 1.30.26.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.30.16.1 16-Oct-2007  garbled Sync with HEAD
 1.30.8.1 09-Oct-2007  ad Sync with head.
 1.32.8.1 19-Jan-2008  bouyer Sync with HEAD
 1.32.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.33.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.33.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.33.10.2 11-Mar-2010  yamt sync with head
 1.33.10.1 04-May-2009  yamt sync with head.
 1.35.64.1 10-Jun-2019  christos Sync with HEAD
 1.3 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 22-Aug-1998  scw branches: 1.2.14; 1.2.22;
vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.22.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.2.14.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.8 13-Mar-1997  mycroft Use genassym.cf, to support cross-compiling.
 1.7 16-Jan-1997  gwr Move include of trap.h from genassym.c to locore.s
 1.6 12-Sep-1996  thorpej branches: 1.6.2;
Add some constants now needed by locore.
 1.5 20-May-1996  chuck if booted from sboot, stay in it.
if booted from the bug, don't enter sboot.
 1.4 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.3 03-Feb-1996  mycroft Don't need unistd.h.
 1.2 02-Feb-1996  mycroft Don't define _KERNEL here.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.6.2.1 18-Jan-1997  thorpej Update from trunk.
 1.41 16-Jan-2024  thorpej Switch mvme68k over to the common interrupt dispatch code and G/C
__HAVE_LEGACY_INTRCNT.
 1.40 27-Dec-2023  thorpej Re-factor the 680x0 Function Code definitions into their own
separate file (as was done on the sun2/sun3 ports ages ago)
and switch everyone to the common header.
 1.39 27-Dec-2023  thorpej Stop using magic numbers for the MMU root pointer attributes and the
Translation Control register, and also get rid of "#if PGSHIFT == ..."
where those magic numbers are used.

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

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

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

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.29 21-May-2007  tsutsui branches: 1.29.10;
Adapt rest of m68k ports to yamt-idlelwp. Compile tested only.
 1.28 11-Dec-2005  christos branches: 1.28.30; 1.28.32; 1.28.38;
merge ktrace-lwp.
 1.27 04-Nov-2003  dsl branches: 1.27.16;
Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
 1.26 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.25 08-Apr-2003  thorpej branches: 1.25.2;
Use PAGE_SIZE rather than NBPG.
 1.24 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.23 26-Sep-2002  thorpej Remove <sys/map.h>
 1.22 11-May-2002  jdolecek use _KERNEL_OPT rather than _KERNEL && !_LKM
 1.21 12-Aug-2001  scw branches: 1.21.6;
clockreg.h is no longer needed now we use the MI mk48txx driver.
 1.20 13-Mar-2001  scw branches: 1.20.2;
Conditionalise inclusion of opt_compat_svr4.h for the benefit of LKMs.
 1.19 21-Nov-2000  tsutsui branches: 1.19.2;
Define proper macros for FP frame offsets rather than magic numbers.
 1.18 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.17 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.16 26-May-2000  thorpej Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
 1.15 26-Oct-1999  itohy Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.
 1.14 06-May-1999  kleink branches: 1.14.2; 1.14.4; 1.14.6;
SVR4-related typo in previous.
 1.13 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.12 27-Mar-1999  scw branches: 1.12.2; 1.12.4;
UVM is no longer defined.
 1.11 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.10 01-Oct-1998  thorpej branches: 1.10.6;
Define SYS_compat_13_sigreturn13.
 1.9 30-Sep-1998  thorpej Make sure SYS_exit and SYS___sigreturn14 are defined. Garbage collect
SYS_sigreturn.
 1.8 21-Feb-1998  scw Implement changes for MACHINE_NEW_NONCONTIG and UVM.
 1.7 06-Jan-1998  thorpej Garbage-collect VM_PMAP.
 1.6 06-Jan-1998  thorpej Garbage-collect pm_stchanged.
 1.5 21-Oct-1997  scw Finally nobble the last MACHINE_NONCONTIG gremlins. Needed to add
<machine/vmparam.h> to pmap.c and locore.s. Plus, genassym.sh needed
to have USRSTACK removed due to conflict with vmparam.h
 1.4 28-Sep-1997  scw branches: 1.4.2;
Fixed typo. in FPU_68882 entry for MVME147
 1.3 13-May-1997  gwr branches: 1.3.4;
Eliminate references to vmspace.vm_pmap
 1.2 13-Mar-1997  mycroft V_SWTCH is no longer needed.
 1.1 13-Mar-1997  mycroft Use genassym.cf, to support cross-compiling.
 1.3.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.2.1 22-Oct-1997  mellon pull up from main trunk
 1.10.6.1 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.12.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.12.2.1 21-Nov-1999  he Pull up revision 1.15 (requested by itohy):
Fix the problem where single-step tracing of a trap instruction
makes the system fall into kernel debugger.
 1.14.6.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.4 27-Mar-2001  bouyer Sync with HEAD.
 1.14.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.14.2.2 22-Nov-2000  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.19.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.20.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.20.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.20.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.21.6.7 18-Oct-2002  nathanw Catch up to -current.
 1.21.6.6 05-Oct-2002  gmcgarry Add RAS offsets. Nuke saframe.h
 1.21.6.5 02-Aug-2002  nathanw Don't need SAF_UPCALL anymore.
 1.21.6.4 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.21.6.3 20-Jun-2002  nathanw Catch up to -current.
 1.21.6.2 17-Nov-2001  scw Kernel support for Scheduler Activations on m68k-based ports using
mvme68k as a testbed.

Boots multi-user on an mvme162, although userland support for SA is not
yet integrated/tested.
 1.21.6.1 12-Aug-2001  scw file genassym.cf was added on branch nathanw_sa on 2001-11-17 13:07:55 +0000
 1.25.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.25.2.1 03-Aug-2004  skrll Sync with HEAD
 1.27.16.1 03-Sep-2007  yamt sync with head.
 1.28.38.1 22-May-2007  matt Update to HEAD.
 1.28.32.1 11-Jul-2007  mjf Sync with head.
 1.28.30.1 27-May-2007  ad Sync with head.
 1.29.10.1 06-Nov-2007  matt sync with HEAD
 1.30.26.1 19-Oct-2008  haad Sync with HEAD.
 1.30.22.1 10-Oct-2008  skrll Sync with HEAD.
 1.30.20.2 11-Mar-2010  yamt sync with head
 1.30.20.1 04-May-2009  yamt sync with head.
 1.30.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.33.4.1 05-Mar-2011  rmind sync with head
 1.35.60.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.35.60.1 10-Jun-2019  christos Sync with HEAD
 1.35.58.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.36.6.1 29-Feb-2020  ad Sync with head.
 1.37 16-Jan-2024  thorpej Switch mvme68k over to the common interrupt dispatch code and G/C
__HAVE_LEGACY_INTRCNT.
 1.36 02-Apr-2021  rin For ports with __HAVE_LEGACY_INTRCNT, turn intrcnt[] and derived
variables into u_int, to match with kern/subr_evcnt.c.
 1.35 21-Nov-2020  thorpej branches: 1.35.2;
malloc(9) -> kmem(9)
 1.34 10-Nov-2019  chs branches: 1.34.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.33 20-Dec-2010  matt branches: 1.33.60;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.32 28-Apr-2008  martin branches: 1.32.22;
Remove clause 3 and 4 from TNF licenses
 1.31 12-Jan-2008  tsutsui branches: 1.31.6; 1.31.8; 1.31.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.30 03-Dec-2007  ad branches: 1.30.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.29 11-Dec-2005  christos branches: 1.29.30; 1.29.48; 1.29.50; 1.29.56;
merge ktrace-lwp.
 1.28 07-Sep-2005  drochner sync with next68k: include <sys/devive.h> explicitely because this is the
documented header for "evcnt" stuff
(should be separated, later)
 1.27 15-Jul-2003  lukem branches: 1.27.16;
__KERNEL_RCSID()
 1.26 27-Sep-2002  provos branches: 1.26.6;
remove trailing \n in panic(). approved perry.
 1.25 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.24 07-Jul-2001  scw branches: 1.24.2; 1.24.8;
bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
 1.23 06-Jul-2001  scw Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.22 11-Jun-2001  scw G/C an unused parameter to isrdispatch_vectored().
 1.21 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.20 21-Jul-2000  scw branches: 1.20.2;
G/C a debugging printf left over from the last commit.
 1.19 20-Jul-2000  scw Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.18 02-Jul-2000  cgd Kwality control:
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.
 1.17 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.16 18-Mar-2000  scw branches: 1.16.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.15 21-Feb-2000  erh branches: 1.15.2;
Define the DONETISR macro and use netisr_dispatch.h. This is to cut down on code duplication and to standardize the available NETISRs across all ports.
 1.14 28-Jun-1999  itojun branches: 1.14.2;
- Call ip6intr if INET6 is defined.
- remove "need-flag" for mac68k esp driver, as it is not used in anywhere
and conflicts with IPsec ESP header.

This should be the only MD change in IPv6 support, except kernel config file.
Very sorry if you have any compilation problem with it (I believe it is okay).
If your favorite arch is not included in here, please add a
call to ip6intr() from softintr handle.
 1.13 24-Mar-1999  mrg branches: 1.13.4; 1.13.6;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.12 05-Jul-1998  jonathan defopt NS, NSIP.
 1.11 05-Jul-1998  jonathan defopt ISO TPIP.
 1.10 05-Jul-1998  jonathan defopt CCITT.
 1.9 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.8 21-Feb-1998  scw Implement changes for MACHINE_NEW_NONCONTIG and UVM.
 1.7 13-Nov-1997  veego Add a missing #if NARP > 0 around arpintr(); and add a #include "arp.h"
for NARP. This is for the 'new' arp system.
 1.6 09-Oct-1997  jtc branches: 1.6.2;
Fix tipo inherited from old version of TNF copyright template.
 1.5 03-Apr-1997  christos branches: 1.5.4;
Add netatalk netisr
 1.4 09-Dec-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.3 13-Oct-1996  christos backout previous kprintf change
 1.2 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.1 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.5.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.6.2.1 15-Nov-1997  mellon Pull rev 1.7 up from trunk (veego)
 1.13.6.2 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

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

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

NOTE: this branch (kame) is used just for refernce. this may not compile
due to multiple reasons.
 1.13.4.1 01-Jul-1999  thorpej Sync w/ -current.
 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.15.2.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.16.4.1 22-Jul-2000  scw Pullup from trunk: 1.19 and 1.20
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.20.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.24.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.24.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.24.8.1 07-Jul-2001  nathanw file isr.c was added on branch nathanw_sa on 2002-02-28 04:10:53 +0000
 1.24.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.24.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.26.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.26.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.26.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.26.6.1 03-Aug-2004  skrll Sync with HEAD
 1.27.16.3 21-Jan-2008  yamt sync with head
 1.27.16.2 07-Dec-2007  yamt sync with head
 1.27.16.1 21-Jun-2006  yamt sync with head.
 1.29.56.2 18-Feb-2008  mjf Sync with HEAD.
 1.29.56.1 08-Dec-2007  mjf Sync with HEAD.
 1.29.50.2 23-Mar-2008  matt sync with HEAD
 1.29.50.1 09-Jan-2008  matt sync with HEAD
 1.29.48.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.29.30.1 03-Dec-2007  ad Sync with HEAD.
 1.30.6.1 19-Jan-2008  bouyer Sync with HEAD
 1.31.10.1 16-May-2008  yamt sync with head.
 1.31.8.1 18-May-2008  yamt sync with head.
 1.31.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.32.22.1 05-Mar-2011  rmind sync with head
 1.33.60.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.34.8.2 03-Apr-2021  thorpej Sync with HEAD.
 1.34.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.35.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.13 16-Jan-2024  thorpej Switch mvme68k over to the common interrupt dispatch code and G/C
__HAVE_LEGACY_INTRCNT.
 1.12 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.11 12-Jan-2008  tsutsui branches: 1.11.6; 1.11.8; 1.11.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.10 03-Mar-2007  tsutsui branches: 1.10.20; 1.10.26; 1.10.32;
Remove unused autovectored ISR priorities.
 1.9 06-Jan-2003  wiz branches: 1.9.18; 1.9.56;
interrupt with two rs.
 1.8 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.7 06-Jul-2001  scw branches: 1.7.2; 1.7.8;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.6 11-Jun-2001  scw G/C an unused parameter to isrdispatch_vectored().
 1.5 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.4 15-Jul-2000  scw branches: 1.4.2;
Add a prototype for netintr()
 1.3 09-Oct-1997  jtc branches: 1.3.18;
Fix tipo inherited from old version of TNF copyright template.
 1.2 26-Apr-1996  chuck branches: 1.2.12;
"jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.12.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.18.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.8.3 07-Jan-2003  thorpej Sync with HEAD.
 1.7.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.7.8.1 06-Jul-2001  nathanw file isr.h was added on branch nathanw_sa on 2002-02-28 04:10:53 +0000
 1.7.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.9.56.1 12-Mar-2007  rmind Sync with HEAD.
 1.9.18.2 21-Jan-2008  yamt sync with head
 1.9.18.1 03-Sep-2007  yamt sync with head.
 1.10.32.1 19-Jan-2008  bouyer Sync with HEAD
 1.10.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.10.20.1 23-Mar-2008  matt sync with HEAD
 1.11.10.1 16-May-2008  yamt sync with head.
 1.11.8.1 18-May-2008  yamt sync with head.
 1.11.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.131 18-Jan-2024  thorpej Don't put the MVME1xx model defines into IDENT, make them defflag options and
put them in opt_mvmeconf.h. Make these options depend on the appropriate
M680x0 option (MVME147 -> M68030, MVME16[27] -> M68040, MVME17[27] -> M68060)
so that the CPU option appears correctly in opt_m68k_arch.h.
 1.130 17-Jan-2024  thorpej Make sigcode.s and sunos_sigcode.s build as their own stand-alone files.
 1.129 17-Jan-2024  thorpej Make compat_13_sigreturn13.s and compat_16_sigreturn14.s build as their
own stand-alone files and G/C the now-empty sigreturn.s.
 1.128 16-Jan-2024  thorpej Build m68k/support.s on its own; don't include it from locore.s
 1.127 16-Jan-2024  thorpej Switch mvme68k over to the common interrupt dispatch code and G/C
__HAVE_LEGACY_INTRCNT.
 1.126 13-Jan-2024  thorpej Switch mvme68k to the common m68k vector table.
 1.125 12-Jan-2024  thorpej Make getsr() an inline in <m68k/psl.h> and G/C all of the now-redudant
copies.
 1.124 12-Jan-2024  thorpej Remove getsp(); nothing uses it.
 1.123 09-Jan-2024  thorpej Statically-initialize the '851 / '030 protorp with MMU51_SRP_BITS. In
pmap_init(), re-initialize protorp with MMU51_CRP_BITS. Remove the now-
redundant code that does this in each of the m68k platforms.
 1.122 09-Jan-2024  thorpej Remove duplicated / slightly-tweaked loadustp() (load user segment table)
routines from all of the m68k ports using the shared pmap. Instead, in
pmap_init(), set up a function pointer to the appropriate mmu_load_urp*()
function in mmu_subr.s.
 1.121 27-Dec-2023  thorpej Stop using magic numbers for the MMU root pointer attributes and the
Translation Control register, and also get rid of "#if PGSHIFT == ..."
where those magic numbers are used.

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

This is a wash on HP MMU machines (9000/320 and 9000/350), and saves at
least 4 instructions (2x moveq + 2x lsXl) on every context switch on
everything else.
 1.118 30-May-2022  andvar branches: 1.118.4;
s/identifing/identifying/ and s/multipler/multiplier/ in comments.
 1.117 31-Mar-2021  simonb Adjust the number of entries in the intrcnt array to match the number
of names in the intrnames list.
 1.116 25-Jan-2021  tsutsui branches: 1.116.2;
Remove #undefs against INTERRUPT_SAVEREG and INTERRUPT_RESTOREREG.

They have been defined in <m68k/asm.h> for years.
 1.115 19-Dec-2018  maxv branches: 1.115.12;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.114 15-Mar-2014  tsutsui branches: 1.114.28; 1.114.30;
Use common m68k/busaddrerr.s for bus error and address error handlers.

No binary changes on GENERIC.
 1.113 15-Mar-2014  tsutsui Remove duplicated INTERRUPT_SAVEREG and INTERRUPT_RESTOREREG macro.

They are in <m68k/asm.h> and now using different register format.
 1.112 09-Mar-2014  tsutsui Remove trailing spaces and tabs.
 1.111 31-Jan-2014  tsutsui defined(LKM) -> defined(MODULAR)
 1.110 22-Dec-2011  tsutsui branches: 1.110.6; 1.110.10;
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.
 1.109 26-Nov-2011  tsutsui branches: 1.109.2;
Make sure to call pflusha before (not after) enabling MMU on
68030/68851 initialization paths.

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

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

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

Extra verification by snj@.
 1.106 06-Jun-2010  mrg branches: 1.106.2; 1.106.4;
fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

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

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.105 25-Feb-2010  skrll branches: 1.105.2;
s/cpu_fork/cpu_lwp_fork/ in comment.
 1.104 13-Dec-2009  tsutsui branches: 1.104.2;
Now we have Sysseg_pa value so no need to calculate it from KVA Sysseg.
Tested on hp300.

XXX: mac68k seems to have a different VA vs PA mechanism so I leave it for now.
 1.103 11-Dec-2009  tsutsui Move uvm_setpagesize() calls from locore.s to pmap_bootstrap_finalize().
Also explicitly set uvmexp.pagesize to prepare 8KB/page settings.

XXX: There is #ifdef !defined(amiga) && !defined(atari) workaround
XXX: because they have different pmap initialization functions.
 1.102 04-Dec-2009  tsutsui Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc.
Also update some comment.
Compile test only.
 1.101 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.100 11-Jan-2009  tsutsui Fix inverted logic on FPU type check in fpfault(). From OpenBSD.
 1.99 17-Oct-2007  garbled branches: 1.99.16; 1.99.20; 1.99.28;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.98 12-Jun-2007  mhitch branches: 1.98.10;
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.97 21-May-2007  tsutsui Adapt rest of m68k ports to yamt-idlelwp. Compile tested only.
 1.96 11-Dec-2005  christos branches: 1.96.24; 1.96.30; 1.96.32; 1.96.38; 1.96.40;
merge ktrace-lwp.
 1.95 04-Mar-2004  nathanw branches: 1.95.16;
Centralize identical copies of proc_trampoline code.

(lots more opportunites here for the bored hacker, such as rei and trap0...)
 1.94 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.93 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.92 27-Apr-2003  ragge branches: 1.92.2;
Preserve the symbol table in the LKM || KSYMS cases also.
 1.91 08-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.90 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.89 14-May-2002  matt Eliminate commons (including many used ones). Clean up variable references.
 1.88 27-Jul-2001  scw branches: 1.88.6;
Fix a braino in the check for a jumper across pins 1-2 of J1 (mvme1[67]7).
Spotted by Chuck Silvers.
 1.87 22-Jul-2001  wiz seperate -> separate
 1.86 18-Jul-2001  scw Restore FPU context properly on 68060-specific kernels...
 1.85 06-Jul-2001  scw branches: 1.85.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.84 11-Jun-2001  scw G/C an unused parameter to isrdispatch_vectored().
 1.83 11-Jun-2001  scw Stack adjustment for autovectored interrupts wasn't quite right...
 1.82 10-Jun-2001  scw sigh. It also helps to switch back to .text ...
 1.81 10-Jun-2001  scw Pick the right bit to check...
 1.80 10-Jun-2001  scw Refuse to boot on 162/172 and 167/177 if the user has not removed
the jumper which tells 1xx-Bug where to locate its scratch data.

Instead, print a message informing the user to RTFM (which needs to
be updated to include this info. ;-)
 1.79 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.78 30-May-2001  lukem add missing #include "opt_kgdb.h"
 1.77 12-May-2001  kleink Update to reflect that unlike in m68k a.out environments, where the .align
directive is given a log2 argument, .align is given a linear argument in
m68k ELF environments.
 1.76 15-Feb-2001  scw branches: 1.76.2;
Add a missing _ASM_LABEL()
 1.75 22-Dec-2000  scw A couple of minor functions which return pointers need to do so in %a0 now.
Spotted by Chuck Silvers.
 1.74 10-Dec-2000  scw Simplify the reboot code:
Always jump through the PROM's reset vector, regardless of board type.
Fix a stack offset problem in the mvme147 reset code path.
 1.73 10-Dec-2000  scw A small splx()/spl0()/soft interrupt related optimisation. If we're
dropping to spl0, use inline code to check if a soft interrupt is
pending instead of taking the hit of a function call to do the check.
 1.72 29-Nov-2000  scw Missed a couple of register prefixes...
 1.71 29-Nov-2000  scw Add register prefixes.
 1.70 26-Nov-2000  jdolecek split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate
 1.69 25-Nov-2000  scw Fix the code which probes the memory controller ASICs. We can now
deal with the 2nd one not being present.
 1.68 21-Nov-2000  scw Put the call to mvme68k_init() back where it was originally.
 1.67 21-Nov-2000  tsutsui Define proper macros for FP frame offsets rather than magic numbers.
 1.66 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.65 15-Sep-2000  scw Use the complete ethernet address stored in nvram on mvme162/mvme167
instead of faking the first 5 nibbles a'la mvme147.

Apparently recent mvme16x boards have a new 5 nibble prefix...
 1.64 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.63 20-Aug-2000  thorpej Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.
 1.62 20-Jul-2000  scw Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.61 31-May-2000  thorpej branches: 1.61.2;
Add a comment on single-processor systems about p_cpu being initialized
by fork1().
 1.60 26-May-2000  thorpej branches: 1.60.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.59 26-May-2000  thorpej Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
 1.58 14-May-2000  minoura defopt FPSP.
 1.57 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.56 26-Oct-1999  itohy branches: 1.56.4;
Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.
 1.55 18-Sep-1999  scw branches: 1.55.2; 1.55.4; 1.55.6;
Make sure the '167 phys_seg_list entry for offboard memory is empty.
 1.54 17-Sep-1999  thorpej Centralize the declaration and clearing of `cold'.
 1.53 01-Aug-1999  thorpej Make sure the branch target of the delay loop is aligned to a cache
half-line (8-byte) boundary. Inspired by a discussion w/ Scott Reynolds.
 1.52 29-Apr-1999  christos Include opt_compat_sunos.h
 1.51 27-Apr-1999  scw Duh. My last change broke mvme147 support.
 1.50 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.49 19-Apr-1999  scw Make the memory sizing code *really* work on mvme167.
 1.48 24-Mar-1999  mrg branches: 1.48.2;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.47 28-Feb-1999  scw Push 'curproc' on the stack, not 'cachectl'. (I own Ignatios one brick :)
 1.46 26-Feb-1999  is MVME68K specific part of fix for PR 6152
 1.45 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.44 15-Feb-1999  scw reboot(8) is now supported, by hitting the hard reset (RST) bit in the GCSR.
Figure out the amount of onboard RAM by looking at the MEMC040/MEMECC
configuration register. (Bank #0 only, for now).
 1.43 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.42 11-Nov-1998  thorpej branches: 1.42.4;
Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.41 30-Sep-1998  thorpej Garbage collect trap #1 and trap #2 handlers; they're moved to
trap_subr.s
 1.40 30-Sep-1998  thorpej Pull in opt_compat_netbsd.h
 1.39 09-Sep-1998  thorpej Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).
 1.38 16-Aug-1998  scw Switch to using the common m68k stuff for a couple of things:

. cache control functions <m68k/cacheops.h>
. sigreturn code <m68k/m68k/sigreturn.s>

Also a few of other things found while scouting around for vm_offset_t
changes.
 1.37 04-Jul-1998  jonathan defopt DDB.
 1.36 25-Jun-1998  thorpej defopt COMPAT_HPUX
 1.35 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.34 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.33 21-Feb-1998  scw Implement changes for MACHINE_NEW_NONCONTIG and UVM.
 1.32 05-Jan-1998  thorpej Fix a bogosity apparently inherited from when the Utah 4.3BSD code base
was converted to use Mach VM for Net2/4.4BSD. The user segment table
pointer was originally stored in the PCB. When Mach VM came along,
however, it was also stored in the pmap, and loaded into the PCB in
pmap_activate(). pmap_activate() would then note that the PCB's USTP
was now in sync with the pmap's USTP, and the low-level context switch
code would use the value from the PCB.

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

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

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

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

Also note that most of the loadustp() functions where actually incomplete.
This has been corrected. These functions should probably be split up into
MMU-specific operations, and called indirectly, rather than doing constant
run-time decision making based on values that will never change during the
course of a boot's lifetime.
 1.31 01-Jan-1998  thorpej - Make pmap_activate() and pmap_deactivate() take a struct proc *.
- Define active_user_pmap() and use it in the appropriate places (from hp300
port).
 1.30 01-Nov-1997  scw Chnage MACHINE_NONCONTIG implementation such that the message buffer is
always located at the end of onboard RAM. This allows locore.s to zero
any offboard RAM to initialise the parity bit which most VMEbus RAM cards
have. Without this, many cards buserr on the first read access.
Thanks to Herb Peyerl for the idea.
 1.29 21-Oct-1997  scw Finally nobble the last MACHINE_NONCONTIG gremlins. Needed to add
<machine/vmparam.h> to pmap.c and locore.s. Plus, genassym.sh needed
to have USRSTACK removed due to conflict with vmparam.h
 1.28 13-Oct-1997  thorpej branches: 1.28.2;
Consolidate some initialization in mvme68k_init().
 1.27 12-Oct-1997  scw Fix bug whereby if no VMEbus RAM is defined, a MACHINE_NONCONTIG kernel
would fail to boot.
 1.26 09-Oct-1997  scw Added support for VMEbus RAM cards via MACHINE_NONCONTIG.
The kernel should still compile and run without it, but I've
put the config option in std.mvme68k so it's built like this
as standard.
 1.25 28-Sep-1997  scw Fixed typo. in FPU_68882 entry for MVME147
 1.24 12-Sep-1997  mycroft Add and use fputype. Optimize floating point save/restore routines a bit more
if only one CPU type is defined. Eliminate FPCOPROC. Merge some of the
68060 floating point stuff from the x68k port.
 1.23 13-May-1997  gwr branches: 1.23.4;
Eliminate references to vmspace.vm_pmap
 1.22 25-Apr-1997  thorpej Adjust for <m86k/m68k/trap_subr.s>
 1.21 13-Apr-1997  thorpej - Use common m68k sigcode.
- Garbage-collect doadump(); it's not used by anything
 1.20 09-Apr-1997  thorpej Use <m68k/m68k/proc_subr.s>
 1.19 16-Mar-1997  thorpej Use <m68k/m68k/support.s>
 1.18 02-Feb-1997  thorpej Garbage-collect extra copypage().
 1.17 16-Jan-1997  gwr Move include of trap.h from genassym.c to locore.s
 1.16 10-Dec-1996  mycroft branches: 1.16.2;
Use RELOC() to access _myea.
 1.15 10-Dec-1996  mycroft Minor twiddle; _prototc is only 4 bytes, not 8.
 1.14 09-Nov-1996  chuck fix uninit'd variable [detected by charles]
 1.13 06-Nov-1996  cgd Fix an inconsistency that came in with Lite: setrq() was renamed to
setrunqueue(), but remrq() was never renamed. Rename remrq() to
remrunqueue().
 1.12 12-Sep-1996  thorpej - Save the boot device info a little earlier in initializaion.

- Use the Bug to find out what kind of machine we're running on, and
Do The Right Thing, namely:

- Set `cputype' and `mmutype' as appropriate.

- Crap out if the kernel doesn't support the machine we
booted on.

- Add hooks for MVME-{162,167,177} models; just an empty shell to be
filled in later.

- Use `MMU_68040' rather than `-2' when checking the MMU type.
 1.11 03-Sep-1996  mycroft Splice in Ignatios' bus error detection code.
 1.10 29-May-1996  chuck save boot device info from bug/bootblocks
 1.9 20-May-1996  chuck branches: 1.9.4;
if booted from sboot, stay in it.
if booted from the bug, don't enter sboot.
 1.8 17-May-1996  chuck add _kernel_text
 1.7 09-May-1996  chuck shift code a bit to move "start" to the front of .text [using openbsd ordering]
 1.6 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.5 18-Apr-1996  chuck add a "delay" function.
XXX: assumes vme147 speed. needs to be fixed and sync'd with DELAY.
[will work with jason/hp300 to fix it properly]
 1.4 02-Feb-1996  mycroft assym.s -> assym.h
(Some ports did this already.)
 1.3 11-Dec-1995  thorpej Move bcopy/ovbcopy/memcpy into m68/m68k/copy.s, which is used by all
m68k ports already anyhow. No use in keeping 6 identical copies of this
function around.
 1.2 12-Oct-1995  chuck remove bzero/strlen/bcmp as they are now in libkern
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.2;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.2.1 12-Oct-1995  chuck remove bzero/strlen/bcmp as they are now in libkern
 1.9.4.3 10-Dec-1996  mycroft From trunk:
Use RELOC() to access _myea.
 1.9.4.2 10-Dec-1996  mycroft From trunk:
Fix uninitialized variable.
 1.9.4.1 29-May-1996  chuck import generic boot bug fix
 1.16.2.1 18-Jan-1997  thorpej Update from trunk.
 1.23.4.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.23.4.1 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.28.2.2 07-Nov-1997  mellon Pull rev 1.30 up from trunk (scw)
 1.28.2.1 22-Oct-1997  mellon pull up from main trunk
 1.42.4.3 14-Feb-1999  scw Make this assemble for mixed '147/'167 support.
 1.42.4.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.42.4.1 31-Jan-1999  scw Fix TBIA usage for non-68030 case.
 1.48.2.4 21-Nov-1999  he Pull up revision 1.56 (requested by itohy):
Fix the problem where single-step tracing of a trap instruction
makes the system fall into kernel debugger.
 1.48.2.3 02-May-1999  perry branches: 1.48.2.3.2;
pullup 1.51->1.52 (Steve Woodford), w/hand deconflicting. grrr... Christos...
 1.48.2.2 28-Apr-1999  perry pullup 1.50->1.51 (Steve Woodford)
 1.48.2.1 19-Apr-1999  perry pullup 1.48->1.49, as per Steve Woodford's request, which said:
This fixes a memory sizing problem which wasn't apparent until I tried a
16Mb mvme167.
 1.48.2.3.2.2 02-Aug-1999  thorpej Update from trunk.
 1.48.2.3.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.55.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.55.4.1 15-Nov-1999  fvdl Sync with -current
 1.55.2.6 12-Mar-2001  bouyer Sync with HEAD.
 1.55.2.5 05-Jan-2001  bouyer Sync with HEAD
 1.55.2.4 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.55.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.55.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.55.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.56.4.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.56.4.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.60.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.61.2.2 17-Oct-2000  scw Pullup 1.63 - 1.65 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.61.2.1 22-Jul-2000  scw Pullup from trunk: 1.62
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.76.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.85.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.85.2.1 03-Aug-2001  lukem update to -current
 1.88.6.7 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.88.6.6 20-Jun-2002  nathanw Catch up to -current.
 1.88.6.5 25-Nov-2001  scw Move the FPCOPROC define down to where it's needed.
 1.88.6.4 18-Nov-2001  scw Correct a comment.
 1.88.6.3 17-Nov-2001  scw cachectl1() takes a struct proc *, not struct lwp *.
 1.88.6.2 17-Nov-2001  scw Kernel support for Scheduler Activations on m68k-based ports using
mvme68k as a testbed.

Boots multi-user on an mvme162, although userland support for SA is not
yet integrated/tested.
 1.88.6.1 27-Jul-2001  scw file locore.s was added on branch nathanw_sa on 2001-11-17 13:07:55 +0000
 1.92.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.92.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.92.2.1 03-Aug-2004  skrll Sync with HEAD
 1.95.16.1 03-Sep-2007  yamt sync with head.
 1.96.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.96.38.2 26-Jun-2007  garbled Sync with HEAD.
 1.96.38.1 22-May-2007  matt Update to HEAD.
 1.96.32.1 11-Jul-2007  mjf Sync with head.
 1.96.30.2 15-Jul-2007  ad Sync with head.
 1.96.30.1 27-May-2007  ad Sync with head.
 1.96.24.1 18-Jun-2007  liamjfoy Pull up following revision(s) (requested by mhitch in ticket #728):
sys/arch/mvme68k/mvme68k/locore.s: revision 1.98
sys/arch/mac68k/mac68k/trap.c: revision 1.128
sys/arch/next68k/next68k/locore.s: revision 1.48
sys/arch/mac68k/mac68k/locore.s: revision 1.152
sys/arch/sun3/sun3/locore.s: revision 1.88
sys/arch/sun2/sun2/locore.s: revision 1.19
sys/arch/sun2/sun2/trap.c: revision 1.32
sys/arch/m68k/m68k/db_trace.c: revision 1.51
sys/arch/mvme68k/mvme68k/trap.c: revision 1.90
sys/arch/news68k/news68k/trap.c: revision 1.53
sys/arch/luna68k/luna68k/locore.s: revision 1.27
sys/arch/atari/atari/locore.s: revision 1.99
sys/arch/sun3/sun3/trap.c: revision 1.130
sys/arch/x68k/x68k/trap.c: revision 1.89
sys/arch/next68k/next68k/trap.c: revision 1.67
sys/arch/x68k/x68k/locore.s: revision 1.79
sys/arch/news68k/news68k/locore.s: revision 1.43
sys/arch/luna68k/luna68k/trap.c: revision 1.46
sys/arch/hp300/hp300/locore.s: revision 1.140
sys/arch/cesfic/cesfic/locore.s: revision 1.15
sys/arch/cesfic/cesfic/trap.c: revision 1.35
sys/arch/m68k/m68k/trap_subr.s: revision 1.12
sys/arch/amiga/amiga/locore.s: revision 1.143
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.98.10.1 06-Nov-2007  matt sync with HEAD
 1.99.28.1 19-Jan-2009  skrll Sync with HEAD.
 1.99.20.3 11-Aug-2010  yamt sync with head.
 1.99.20.2 11-Mar-2010  yamt sync with head
 1.99.20.1 04-May-2009  yamt sync with head.
 1.99.16.1 17-Jan-2009  mjf Sync with HEAD.
 1.104.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.104.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.105.2.2 05-Mar-2011  rmind sync with head
 1.105.2.1 03-Jul-2010  rmind sync with head
 1.106.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.106.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.107.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.107.4.1 17-Apr-2012  yamt sync with head
 1.109.2.1 18-Feb-2012  mrg merge to -current.
 1.110.10.1 18-May-2014  rmind sync with head
 1.110.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.114.30.1 10-Jun-2019  christos Sync with HEAD
 1.114.28.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.115.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.116.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.118.4.1 27-Jun-2024  martin Pull up following revision(s) (requested by rin in ticket #724
to fix build fallout on the branch):

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

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

Make compat_13_sigreturn13.s and compat_16_sigreturn14.s build as their
own stand-alone files and G/C the now-empty sigreturn.s.
 1.165 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.164 18-Jan-2024  thorpej Don't put the MVME1xx model defines into IDENT, make them defflag options and
put them in opt_mvmeconf.h. Make these options depend on the appropriate
M680x0 option (MVME147 -> M68030, MVME16[27] -> M68040, MVME17[27] -> M68060)
so that the CPU option appears correctly in opt_m68k_arch.h.
 1.163 16-Jan-2024  thorpej Switch mvme68k over to the common interrupt dispatch code and G/C
__HAVE_LEGACY_INTRCNT.
 1.162 13-Jan-2024  thorpej Switch mvme68k to the common m68k vector table.
 1.161 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.160 26-Mar-2023  andvar fix various typos in documentation, comments and sysctl device description.
mainly aion -> ation and inlude -> include.
 1.159 09-Oct-2021  tsutsui Call cnpollc(9) before cngetc(9) as the cons(9) man page says.

Currently most ports do nothing in cnpollc(9), but this is required to
handle wskbd(9) .set_leds op in cngetc(9) properly, at least on luna68k.
 1.158 11-Jun-2020  ad uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched. It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.
 1.157 31-Dec-2019  ad Rename uvm_free() -> uvm_availmem().
 1.156 21-Dec-2019  ad uvmexp.free -> uvm_free()
 1.155 14-Mar-2019  thorpej G/C "MAPPECOPY". It is the deadest of wood, and never actually worked in
NetBSD.
 1.154 31-May-2016  dholland branches: 1.154.2; 1.154.8; 1.154.18;
PR 50792 David Binderman: make sure we don't divide by zero.

The loop that picks delay_divisor might conceivably reject all values,
particularly if the hardware is sulking for some reason; in that case
it'll be left zero. Use 1 instead of 0 so we don't then crash.
 1.153 24-Mar-2014  christos branches: 1.153.6;
use cpu_{g,s}etmodel
fix unused
 1.152 28-Jul-2012  matt branches: 1.152.2; 1.152.4;
Remove declartions of physmem
 1.151 27-Jul-2012  matt Remove safepri and use IPL_SAFEPRI instead. This may be defined in a MD
header file (if not, a value of 0 is assmued).
 1.150 12-Dec-2011  mrg implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

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

fixes PR#45705.
 1.149 12-Jun-2011  rmind branches: 1.149.2; 1.149.6;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

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

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

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

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

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

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

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

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.146 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.145 14-Jan-2011  rmind branches: 1.145.2; 1.145.4;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.144 16-Oct-2010  tsutsui Prepare empty module_init_md() for options MODULAR for all other m68k ports.
 1.143 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

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

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

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.141 10-Dec-2009  matt branches: 1.141.2;
Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds). Should result in no code differences.
 1.140 23-Nov-2009  rmind Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.139 15-Aug-2009  matt Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
 1.138 15-Aug-2009  snj Fix a 13 year old buffer overrun. From Henning Petersen in
PR port-mvme68k/41857.
 1.137 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.136 21-Jan-2009  he branches: 1.136.2;
Re-adapt to the changed return types for major() and minor().
 1.135 17-Jan-2009  he Print dev_t with PRIu64 instead of llu, suggested by mhitch@.
 1.134 17-Jan-2009  he Print dev_t (result of major() and minor()) with %llu.
 1.133 30-Nov-2008  martin As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
 1.132 25-Nov-2008  ad dumpsys: don't spew numbers into the log.
 1.131 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.130 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.129 02-Jul-2008  ad branches: 1.129.2; 1.129.4; 1.129.6;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.128 26-Jun-2008  isaki Unify splraiseipl(9) implementation among m68k ports,
discussed with tsutsui@ on port-m68k.

For mvme68k:
- export ipl2psl_table[] and make it uint16_t
- make makeiplcookie(9) inline
- put PSL_S bit into ipl2psl_table[] rather than adding it in makeiplcookie(9)
- define both IPL_SCHED and IPL_HIGH independently to avoid confusion
- replace the order of IPL_SOFTCLOCK and IPL_SOFTBIO according to spl(9)
 1.127 12-Jan-2008  tsutsui branches: 1.127.6; 1.127.10; 1.127.12; 1.127.14;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.126 31-Dec-2007  ad Remove COMPAT_HPUX.
 1.125 03-Dec-2007  ad branches: 1.125.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.124 25-Oct-2007  yamt branches: 1.124.2;
defparam PAGER_MAP_SIZE.
 1.123 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.122 21-May-2007  tsutsui branches: 1.122.8; 1.122.10; 1.122.14;
Adapt rest of m68k ports to yamt-idlelwp. Compile tested only.
 1.121 05-Mar-2007  tsutsui branches: 1.121.2; 1.121.4; 1.121.10;
Allocate msgbufaddr in pmap_bootstrap.c where it's initilized,
and move its declaration into <m68k/pmap_motorola.h>.
 1.120 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.119 28-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.118 09-Feb-2007  ad branches: 1.118.2;
Merge newlock2 to head.
 1.117 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.116 21-Oct-2006  mrg in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev. this occurs when we try to set the dumpdev to a device
with no driver loaded. this fixes PR#34872.

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

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

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
 1.115 04-Aug-2006  mhitch branches: 1.115.4; 1.115.6;
gcc4 fix: correct declaration of 'end'.
 1.114 11-Dec-2005  christos branches: 1.114.4; 1.114.8;
merge ktrace-lwp.
 1.113 30-Oct-2005  chs fix crash dumps on m68k platforms, cpu_kcore_hdr_t is larger than
512 bytes now so we need a bigger buffer. PR 26958.
 1.112 25-Apr-2005  lukem branches: 1.112.2; 1.112.4;
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.111 11-Feb-2005  yamt branches: 1.111.4;
remove uvm_map_protect from cpu_startup of several ports.
- they shouldn't be needed with the current fault handler.
- they causes assertion failure with the recent vm_map implementation.

discussed on tech-kern@. reviewed by Chuck Silvers.
PR/29179 from Julio M. Merino Vidal.
 1.110 24-Mar-2004  atatat branches: 1.110.8; 1.110.10;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
 1.109 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.108 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.107 04-Dec-2003  atatat Dynamic sysctl.

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

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

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

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
 1.106 27-Sep-2003  cl Cast through (void *) to appease gcc3.
 1.105 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.104 15-Jul-2003  lukem __KERNEL_RCSID()
 1.103 29-Jun-2003  fvdl branches: 1.103.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.102 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.101 23-Jun-2003  martin Make sure to include opt_foo.h if a defflag option FOO is used.
 1.100 10-May-2003  thorpej Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

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

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

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

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

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
 1.98 26-Apr-2003  ragge Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.97 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.96 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.95 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.94 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.93 19-Sep-2002  ragge Do not include <sys/clist.h>, it's not used in NetBSD at all.
 1.92 10-Sep-2002  scw Fix a devsw merge botch.
 1.91 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.90 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.89 20-Mar-2002  christos branches: 1.89.4;
kill remaining PS_STRINGS instances.
 1.88 06-Mar-2002  tsutsui Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.
 1.87 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.86 10-Sep-2001  chris branches: 1.86.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.85 12-Aug-2001  scw branches: 1.85.2;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.84 07-Jul-2001  scw branches: 1.84.2;
bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
 1.83 10-Jun-2001  scw On 162 and up, get the CPU speed from the firmware and only fall back
to calculating it on the fly if the firmware's value is bogus.

This fixes problems caused by rounding errors on some board/speed
combinations.
 1.82 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.81 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.80 29-Apr-2001  scw Compute PAGER_MAP_SIZE at runtime to avoid needlessly crippling large-
memory models for the benefit of small-memory models.

Uses a heuristic of min(onboard_ram_size/2, 16MB).
 1.79 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.78 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.77 02-Dec-2000  scw branches: 1.77.2;
Set things up so that DDB can get to the symbol table in ELF kernels.
 1.76 24-Nov-2000  scw Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.75 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.74 15-Sep-2000  scw Use the complete ethernet address stored in nvram on mvme162/mvme167
instead of faking the first 5 nibbles a'la mvme147.

Apparently recent mvme16x boards have a new 5 nibble prefix...
 1.73 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.72 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.71 20-Aug-2000  scw Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
. Get VMEbus slave mode going on mvme147. This should be easy.
. Fix up the A16 slave mappings.
. Bounce buffer support. (Messy, but pretty much a `must have'.)
. Figure out how to deal with `location monitor' interrupts
within the framework. (Useful for Busnet, among other things.)
. It would be nice to make use of the VMEchip2's DMA facilities...
 1.70 08-Aug-2000  scw Avoid calling printf() when we're either in DDB, or about to call
Debugger(). Use db_printf() instead.

This fixes a problem whereby it was impossible to enter the debugger
if the CPU was spinning in lockmgr() for the proclist lock, because
printf() calls logwakeup(), which eventually calls proclist_lock_read(),
which then spins in lockmgr() yet again...

[Note: This change was prematurely committed to the 1.5 branch by
mistake. Since it would've been pulled up anyway, I won't
be sending a pullup request.]
 1.69 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.68 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.67 05-Jun-2000  jhawk branches: 1.67.2;
Do not clear msgbufenabled in dumpsys(). Dump messages will now go to
the message buffer. This can be invaluable in debugging if the dump
fails (assuming a persistant message buffer)
 1.66 26-May-2000  thorpej branches: 1.66.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.65 28-Mar-2000  simonb Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.
 1.64 26-Mar-2000  kleink Merge parts of chs-ubc2 into the trunk:
* Remove the casts to vaddr_t from the round_page() and trunc_page() macros to
make them type-generic, which is necessary i.e. to operate on file offsets
without truncating them.
* In due course, cast pointer arguments to these macros to an appropriate
integral type (paddr_t, vaddr_t).

Originally done by Chuck Silvers, updated by myself.
 1.63 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.62 19-Jan-2000  thorpej branches: 1.62.2;
Move callout initialization to a single location; no need to duplicate
that code all over the place.
 1.61 04-Dec-1999  ragge CL* discarding.
 1.60 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.59 17-Sep-1999  thorpej branches: 1.59.2; 1.59.4; 1.59.8;
Centralize the declaration and clearing of `cold'.
 1.58 12-Sep-1999  chs eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
 1.57 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.56 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.55 26-Apr-1999  thorpej Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
 1.54 25-Apr-1999  simonb g/c REAL_CLISTS.
 1.53 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.52 01-Apr-1999  thorpej branches: 1.52.2;
Don't call configure() from cpu_startup().
 1.51 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.50 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.49 27-Feb-1999  scottr defopt BUFCACHE and BUFPAGES.
 1.48 21-Feb-1999  scw Move scsi_nosync declaration into ncrsc_pcctwo since I've permanently
disabled sync negotiation in the 147's SBIC driver. (I could never make
it work). Also, don't enable bus-snooping with a 68060 based board.
 1.47 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.46 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.45 09-Jan-1999  thorpej branches: 1.45.2;
Garbage-collect `mbutl'.
 1.44 19-Oct-1998  tron Defopt SYSVMSG, SYSVSEM and SYSVSHM.
 1.43 22-Aug-1998  scw vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.42 08-Jul-1998  thorpej Put VMEbus RAM on a lower priority free list, since it's much slower (because
the MVME-147 doesn't cache access to any VMEbus space).
 1.41 04-Jul-1998  jonathan defopt DDB.
 1.40 25-Jun-1998  thorpej defopt COMPAT_HPUX
 1.39 09-Jun-1998  tv Change ddb_init() for a.out to provision for kernels which are not booted by
the current 'bootblock' method, like the Shark, which preloads and preformats
the symbol table right in the boot code.
 1.38 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.37 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.36 18-Mar-1998  is 68060 has 8k + 8k caches.
 1.35 18-Mar-1998  thorpej - Make MACHINE_NEW_NONCONTIG non-optional.
- Make initialization of the message buffer a little less magic-looking.
- Maintain two copies of the number and size of physical memory segments.
One copy, mem_clusters[], contains _all_ of physical RAM, for crash dumps.
The other copy, phys_seg_list[], starts out with all of physical RAM (and
is used to initialize mem_clusters[]), but is adjusted to be the memory
actually managed by the VM system.
- Fix crash dumps with regard to multiple memory segments.
 1.34 21-Feb-1998  scw Implement changes for MACHINE_NEW_NONCONTIG and UVM.
 1.33 19-Feb-1998  thorpej Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.
 1.32 08-Feb-1998  thorpej Correct a think'o I made some time ago, and note that the dump routines
here are broken if VME memory cards exist in the system.
 1.31 24-Jan-1998  mycroft When dumping, print out the device number as major,minor.
 1.30 04-Dec-1997  tv Standardize COMPAT_SUNOS -- remove all references to
sunos_exec_aout_makecmds() in machdep.c for various architectures and put
it in exec_conf.c like the other emulations; rename exec.h to
sunos_exec.h.
 1.29 01-Nov-1997  scw Chnage MACHINE_NONCONTIG implementation such that the message buffer is
always located at the end of onboard RAM. This allows locore.s to zero
any offboard RAM to initialise the parity bit which most VMEbus RAM cards
have. Without this, many cards buserr on the first read access.
Thanks to Herb Peyerl for the idea.
 1.28 19-Oct-1997  scw branches: 1.28.2;
Fix includes. (Make sure <vm/vm.h> gets pulled in before <sys/sysctl.h>)
 1.27 13-Oct-1997  thorpej Initialize interrupt handlers and message buffer in mvme68k_init().
 1.26 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.25 12-Sep-1997  mycroft Set the status word as well, and remove a bogus comment.
 1.24 12-Sep-1997  mycroft fputype is defined in locore.s now.
 1.23 12-Sep-1997  mycroft Always initialize all registers in setregs().
 1.22 11-Sep-1997  mycroft Fix execve(2) and *setregs() interfaces so emulations can set registers in a
more correct way. (See tech-kern.)
 1.21 12-Jun-1997  mrg branches: 1.21.4;
bring mrg-vm-swap2 onto mainilne.
 1.20 08-Jun-1997  veego Initialize machine from MACHINE.
 1.19 25-Apr-1997  thorpej branches: 1.19.2;
Sync with hp300:
- Clean up cpu_startup()
- Convert to new crash dump format.
 1.18 09-Apr-1997  thorpej Garbage-collect regdump() and friends.
 1.17 27-Mar-1997  thorpej Don't allocate mclrefcnt[]; it's dead and gone.
 1.16 26-Mar-1997  gwr Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/
 1.15 18-Mar-1997  thorpej - Add a few prototypes.
- cpu_startup() - mark pre-text pages VM_PROT_NONE and kernel text pages
VM_PROT_READ|VM_PROT_EXECUTE in kernel_map, to avoid strange things like
COW'ing the kernel text (from hp300 port)
- Fix dumpsys() to conform to the new dump bdevsw calling convention.
 1.14 17-Mar-1997  gwr Use m68k/sig_machdep.c
 1.13 13-Oct-1996  christos branches: 1.13.4;
backout previous kprintf change
 1.12 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.11 12-Sep-1996  thorpej - Add hooks (just empty shells for now) for MVME-{162,167,177} models.

- Use information obtained from the Bug in locore to make identifycpu()
produce some slightly more meaningful output.

- Garbage-collect some left-over hp300-specific stuff.
 1.10 12-Sep-1996  thorpej Change badaddr() to take the size of the access to do, and nuke
badbaddr().
 1.9 12-Sep-1996  thorpej Sync boot() with the hp300 version (basically, clean up a bit and
run shutdown hooks).
 1.8 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.7 20-May-1996  chuck if booted from sboot, stay in it.
if booted from the bug, don't enter sboot.
 1.6 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.5 04-Jan-1996  jtc Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.
 1.4 07-Oct-1995  mycroft Prefix names of system call implementation functions with `sys_'.
 1.3 19-Sep-1995  thorpej Make system calls conform to a standard prototype and bring those
prototypes into scope.
 1.2 01-Sep-1995  mycroft SA_ONSTACK --> SS_ONSTACK
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.13.4.1 12-Feb-1997  mrg don't allocate swap map in allocsys.
 1.19.2.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.21.4.3 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.21.4.2 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.21.4.1 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.28.2.1 07-Nov-1997  mellon Pull rev 1.29 up from trunk (scw)
 1.45.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.45.2.1 31-Jan-1999  scw Add mvme68k/machdep.h and start populating with external
declarations for a couple of mvme68k globals.
Include the above file where necessary.
 1.52.2.1 16-Apr-1999  chs branches: 1.52.2.1.2;
pull up 1.52 -> 1.53:
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.52.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.59.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.59.4.1 15-Nov-1999  fvdl Sync with -current
 1.59.2.4 27-Mar-2001  bouyer Sync with HEAD.
 1.59.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.59.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.59.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.62.2.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.62.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.66.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.67.2.2 17-Oct-2000  scw Pullup 1.71 - 1.72 and 1.73 - 1.74 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.67.2.1 08-Aug-2000  scw Avoid calling printf() when we're either in DDB, or about to call
Debugger(). Use db_printf() instead.

This fixes a problem whereby it was impossible to enter the debugger
if the CPU was spinning in lockmgr() for the proclist lock, because
printf() calls logwakeup(), which eventually calls proclist_lock_read(),
which then spins in lockmgr() yet again...
 1.77.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.77.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.84.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.84.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.84.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.84.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.84.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.84.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.85.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.86.4.13 03-Dec-2002  gmcgarry savectx() takes pointer to PCB
 1.86.4.12 11-Nov-2002  nathanw Catch up to -current
 1.86.4.11 18-Oct-2002  nathanw Catch up to -current.
 1.86.4.10 17-Sep-2002  nathanw Catch up to -current.
 1.86.4.9 27-Aug-2002  nathanw Catch up to -current.
 1.86.4.8 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.86.4.7 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

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

(Behold the Power of Ed)
 1.86.4.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.86.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.86.4.3 02-Dec-2001  scw If an FPU is available, call m68k_make_fpu_idle_frame() to generate
a reference FPU idle frame.
 1.86.4.2 17-Nov-2001  scw Kernel support for Scheduler Activations on m68k-based ports using
mvme68k as a testbed.

Boots multi-user on an mvme162, although userland support for SA is not
yet integrated/tested.
 1.86.4.1 10-Sep-2001  scw file machdep.c was added on branch nathanw_sa on 2001-11-17 13:07:56 +0000
 1.89.4.2 31-Aug-2002  gehenna catch up with -current.
 1.89.4.1 17-May-2002  gehenna Replace the access to devsw table and the hard-coded major with devsw API.
 1.103.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.103.2.5 15-Feb-2005  skrll Sync with HEAD.
 1.103.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.103.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.103.2.2 03-Aug-2004  skrll Sync with HEAD
 1.103.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.110.10.1 12-Feb-2005  yamt sync with head.
 1.110.8.1 29-Apr-2005  kent sync with -current
 1.111.4.1 01-Nov-2005  tron Pull up following revision(s) (requested by chs in ticket #923):
sys/arch/next68k/next68k/machdep.c: revision 1.73
sys/arch/luna68k/luna68k/machdep.c: revision 1.42
sys/arch/hp300/hp300/machdep.c: revision 1.184
sys/arch/amiga/amiga/machdep.c: revision 1.193
sys/arch/x68k/x68k/machdep.c: revision 1.129
sys/arch/mac68k/mac68k/machdep.c: revision 1.306
sys/arch/news68k/news68k/machdep.c: revision 1.61
sys/arch/mvme68k/mvme68k/machdep.c: revision 1.113
sys/arch/atari/atari/atari_init.c: revision 1.63
fix crash dumps on m68k platforms, cpu_kcore_hdr_t is larger than
512 bytes now so we need a bigger buffer. PR 26958.
 1.112.4.1 02-Nov-2005  yamt sync with head.
 1.112.2.7 21-Jan-2008  yamt sync with head
 1.112.2.6 07-Dec-2007  yamt sync with head
 1.112.2.5 27-Oct-2007  yamt sync with head.
 1.112.2.4 03-Sep-2007  yamt sync with head.
 1.112.2.3 26-Feb-2007  yamt sync with head.
 1.112.2.2 30-Dec-2006  yamt sync with head.
 1.112.2.1 21-Jun-2006  yamt sync with head.
 1.114.8.1 11-Aug-2006  yamt sync with head
 1.114.4.1 09-Sep-2006  rpaulo sync with head
 1.115.6.2 10-Dec-2006  yamt implement splraiseipl and makeiplcookie for mvme68k.
 1.115.6.1 22-Oct-2006  yamt sync with head
 1.115.4.3 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.115.4.2 12-Jan-2007  ad Sync with head.
 1.115.4.1 18-Nov-2006  ad Sync with head.
 1.118.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.121.10.1 22-May-2007  matt Update to HEAD.
 1.121.4.1 11-Jul-2007  mjf Sync with head.
 1.121.2.2 03-Dec-2007  ad Sync with HEAD.
 1.121.2.1 27-May-2007  ad Sync with head.
 1.122.14.1 13-Nov-2007  bouyer Sync with HEAD
 1.122.10.3 23-Mar-2008  matt sync with HEAD
 1.122.10.2 09-Jan-2008  matt sync with HEAD
 1.122.10.1 06-Nov-2007  matt sync with HEAD
 1.122.8.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.122.8.1 28-Oct-2007  joerg Sync with HEAD.
 1.124.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.124.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.125.6.2 19-Jan-2008  bouyer Sync with HEAD
 1.125.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.127.14.2 03-Jul-2008  simonb Sync with head.
 1.127.14.1 27-Jun-2008  simonb Sync with head.
 1.127.12.3 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.127.12.2 14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

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

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

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

I think this reduction is very good thing.
 1.127.12.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.127.10.4 11-Aug-2010  yamt sync with head.
 1.127.10.3 11-Mar-2010  yamt sync with head
 1.127.10.2 19-Aug-2009  yamt sync with head.
 1.127.10.1 04-May-2009  yamt sync with head.
 1.127.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.127.6.2 02-Jul-2008  mjf Sync with HEAD.
 1.127.6.1 29-Jun-2008  mjf Sync with HEAD.
 1.129.6.1 02-Feb-2009  snj Pull up following revision(s) (requested by ad in ticket #346):
sys/arch/alpha/alpha/machdep.c: revision 1.311
sys/arch/amiga/amiga/machdep.c: revision 1.211
sys/arch/atari/atari/machdep.c: revision 1.153
sys/arch/hp700/hp700/machdep.c: revision 1.53
sys/arch/i386/i386/dumpsys.c: revision 1.5
sys/arch/mips/mips/mips_machdep.c: revision 1.206
sys/arch/mvme68k/mvme68k/machdep.c: revision 1.132
sys/arch/news68k/news68k/machdep.c: revision 1.75
sys/arch/next68k/next68k/machdep.c: revision 1.88
sys/arch/sparc/sparc/machdep.c: revision 1.285
sys/arch/sparc64/sparc64/machdep.c: revision 1.230
sys/arch/sun2/sun2/machdep.c: revision 1.56
sys/arch/sun3/sun3/machdep.c: revision 1.188
sys/arch/sun3/sun3x/machdep.c: revision 1.114
sys/arch/x68k/x68k/machdep.c: revision 1.153
dumpsys: don't spew numbers into the log.
 1.129.4.2 03-Mar-2009  skrll Sync with HEAD.
 1.129.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.129.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.136.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.141.2.3 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.141.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.141.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.142.2.5 31-May-2011  rmind sync with head
 1.142.2.4 05-Mar-2011  rmind sync with head
 1.142.2.3 03-Jul-2010  rmind sync with head
 1.142.2.2 25-Apr-2010  rmind - Invent mm_md_getva() and mm_md_relva() routines, provided by MD and
indicated with __HAVE_MM_MD_PREFER_VA. It will be used to deal with
cache aliasing issues and thus fix little MIPS, ARM and friends.

- Convert dev_mem_readwrite() to use unmanaged mappings. Fix a missed
offset addition in a case of direct map. Sprinkle various comments in
the memory device driver.

- Add missing direct map handling on hp700 and vax. Make checks across
m68k ports more consistent, reduce the diffs. Fix kernacc check miss
on news68k. Minor off-by-one fix for alpha. Add MEMC_PHYS_BASE for
mmap() case check on acorn26. Misc clean-up.
 1.142.2.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.145.4.2 05-Mar-2011  bouyer Sync with HEAD
 1.145.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.145.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.148.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.149.6.1 18-Feb-2012  mrg merge to -current.
 1.149.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.149.2.2 30-Oct-2012  yamt sync with head
 1.149.2.1 17-Apr-2012  yamt sync with head
 1.152.4.1 18-May-2014  rmind sync with head
 1.152.2.2 03-Dec-2017  jdolecek update from HEAD
 1.152.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.153.6.1 09-Jul-2016  skrll Sync with HEAD
 1.154.18.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.154.18.1 10-Jun-2019  christos Sync with HEAD
 1.154.8.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

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

XXX Most of these will require testing by someone other than myself, as
I have a limited selection of hardware!
 1.1 31-Jan-1999  scw branches: 1.1.2;
file machdep.h was initially added on branch scw-mvme167.
 1.1.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.1 31-Jan-1999  scw Add mvme68k/machdep.h and start populating with external
declarations for a couple of mvme68k globals.
Include the above file where necessary.
 1.3 26-Apr-1996  chuck remove mainbus.c: never actually used
 1.2 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.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.29 12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

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

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

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

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

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

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.28 08-Feb-2011  rmind branches: 1.28.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.27 12-Jan-2008  tsutsui branches: 1.27.6; 1.27.30; 1.27.32; 1.27.38; 1.27.40;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.26 05-Mar-2007  tsutsui branches: 1.26.20; 1.26.26; 1.26.32;
Remove an unnecessary cast and use (char *) on pointer arith.
 1.25 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.24 11-Dec-2005  christos branches: 1.24.26;
merge ktrace-lwp.
 1.23 07-Aug-2003  agc branches: 1.23.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.22 15-Jul-2003  lukem __KERNEL_RCSID()
 1.21 02-Apr-2003  thorpej branches: 1.21.2;
Use PAGE_SIZE rather than NBPG.
 1.20 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.19 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.18 27-Feb-2002  christos branches: 1.18.8;
- Use DEV_ constants, instead of documenting the numbers!
- Delete cdev_decl(mm); where appropriate, and other hand-crufting [hi powerpc!]
 1.17 10-Sep-2001  chris branches: 1.17.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

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

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.15 29-Jun-2000  mrg branches: 1.15.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.14 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.13 18-Mar-2000  scw branches: 1.13.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.12 04-Dec-1999  ragge branches: 1.12.2;
CL* discarding.
 1.11 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.10 27-Mar-1999  mycroft branches: 1.10.8; 1.10.10; 1.10.14;
Oops; vm_offset_t -> vaddr_t.
 1.9 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.8 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.7 10-Feb-1999  kleink Use of casts as lvalues is a GNU C extension; rearrange slightly.
 1.6 19-Nov-1998  mrg fix problems in many d_mmap routines:
- returned EOPNOTSUPP rather than -1.
- no check for negative offset.
many of these fix potential security problems in these drivers.


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

by someone!
 1.5 22-Aug-1998  scw vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.4 07-May-1998  kleink Fix some arithmetics lossage on typeless pointers.
 1.3 21-Feb-1998  scw Implement changes for MACHINE_NEW_NONCONTIG and UVM.
 1.2 02-Feb-1997  thorpej branches: 1.2.12;
zeropage -> devzeropage, and make it static
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.12.1 23-Nov-1998  cgd Fix many real and potential security problems with character device
driver mmap routines that did not properly bounds check offsets.
See NetBSD security advisory NetBSD-SA1998-005 for details. Done
as a patch because it's large, and a fair number of bits are different
in -current. (mrg)
 1.10.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.10.1 15-Nov-1999  fvdl Sync with -current
 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.12.2.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.13.4.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.15.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.16.4.2 10-Oct-2001  fvdl Convert all remaining devices.
 1.16.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.16.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.16.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.16.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.17.4.4 11-Nov-2002  nathanw Catch up to -current
 1.17.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.17.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.17.4.1 10-Sep-2001  nathanw file mem.c was added on branch nathanw_sa on 2002-02-28 04:10:54 +0000
 1.18.8.1 17-May-2002  gehenna Add the character device switch.
 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.23.16.2 21-Jan-2008  yamt sync with head
 1.23.16.1 03-Sep-2007  yamt sync with head.
 1.24.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.26.32.1 19-Jan-2008  bouyer Sync with HEAD
 1.26.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.26.20.1 23-Mar-2008  matt sync with HEAD
 1.27.40.1 17-Feb-2011  bouyer Sync with HEAD
 1.27.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.27.32.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

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

This will disappear when I move this code (and others) to be a
pseudo-device. When we have machine-independent mem code this will all be
unnecessary anyway.
 1.28.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.82 05-Nov-2002  chs merge pmap.c for all 4k-page motorola-MMU (or compatible) m68k platforms.
 1.81 03-Nov-2002  chs merge pmap.h for all 4k-page motorola-MMU (or compatible) m68k platforms.
 1.80 14-Oct-2002  chs merge pte.h for m68k w/ motorola or compatible MMU
(only 4k-page platforms so far).
 1.79 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.78 22-May-2002  drochner Subtract vm_map_min(kernel_map) from kernel virtual addresses to get offsets
into kernel_object where this was missing.
This is a no-op on ports where VM_MIN_KERNEL_ADDRESS==0, ie all but
cesfic.
Confirmed and corrected by Chuck Silvers.
 1.77 08-Mar-2002  thorpej branches: 1.77.6;
Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map). Try to deal with this:

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

From art@openbsd.org.
 1.76 02-Jan-2002  chs pmap_page_protect(VM_PROT_NONE) must remove all mappings in the PV list,
even if they are wired. we need to be able to remove all mappings to
pages that are being freed due to (eg.) file truncation.
 1.75 16-Dec-2001  tsutsui Fix comments for ref-count of PT pages.
 1.74 13-Dec-2001  chs change the reference-counting of PT pages to start from zero instead of
one, so that we don't mess up the global count of wired pages by having
the page's wire_count be non-zero when we free the page.
pointed out by Michael Hitch.
 1.73 24-Nov-2001  isaki fix typo s/68551/68851/ in a comment.
 1.72 19-Nov-2001  chs allocate and free page table pages explicitly instead of abusing
uvm_fault_wire(). this allows us to make pt_map non-pageable,
but we need to be careful in pmap_remove() not to attempt to
reference PTEs after the PTP has been freed.
 1.71 13-Oct-2001  chs branches: 1.71.4;
fix pmap_changebit() to look for the bit in the page attrs
in addition to any PTEs. fixes PR 14197.
 1.70 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.69 26-Aug-2001  tsutsui branches: 1.69.2;
sysctl(2) -> sysctl(3) (in comments)
 1.68 05-Aug-2001  scw Make this work again for mvme147...
 1.67 30-Jul-2001  scw Make the set_page_cacheable/set_page_cacheinhibit functions do the
right thing on 68030 again.
 1.66 30-Jul-2001  scw Flush the caches in pmap_remove_mapping() when PRM_CFLUSH is specified.

Also, flush the ATC for the page in pmap_kenter_pa() after setting up the
mapping. With any luck this last one might just solve the 060 problems I've
been seeing...
 1.65 23-Jul-2001  scw Apply pmap_k{enter_pa,remove} patches provided by Chuck Silvers.
 1.64 18-Jul-2001  scw Make absolutely sure page tables are not cacheable on 040/060 cpus.
(Not strictly required for the 040, but mandatory for the 060).
Also revamp cache enable/disable functions for the benefit of
bus_dmamem_map().
 1.63 07-Jul-2001  scw branches: 1.63.2;
bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
 1.62 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.61 26-May-2001  chs replace vm_page_t with struct vm_page *.
 1.60 16-May-2001  scw Finally nobble the bus_dmamap_sync() problem with osiop(4).

Basically, bus_dmamap_sync() `PREREAD' needs to flush the cache
for the start and end of the region if it is not aligned to
a cacheline boundary, otherwise a subsequent POSTREAD can *purge*
valid data which was in the cacheline but *outside* the region
passed to bus_dmamap_sync().

Bus snooping doesn't always help here because osiop(4) calls
bus_dmamap_sync() with POSTREAD even if no data was actually
transferred! (And we can't rely on snooping on the 68060 models anyway).
 1.59 13-May-2001  scw doh, make the last fix compile for '147.
 1.58 11-May-2001  scw Ensure the caches are flushed before changing the `cacheble' state
of a page.
 1.57 29-Apr-2001  scw Do the same as mac68k/pmap.c:1.70 to prevent wired pages being
removed by pmap_collect().
 1.56 24-Apr-2001  thorpej Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.55 22-Apr-2001  thorpej Remove pmap_kenter_pgs(). It was never really adopted by
anything, and the interface itself wasn't as flexible as
callers would have probably liked.
 1.54 21-Apr-2001  thorpej #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
 1.53 21-Apr-2001  thorpej pmap_update() should not be equated with "flush entire TLB", it is
used to process deferred pmap operations. Since these pmaps don't
defer anything, pmap_update() is a noop.
 1.52 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.51 14-Jan-2001  thorpej branches: 1.51.2;
splimp() -> splvm()
 1.50 20-Dec-2000  scw Some minor optimisations to avoid checking {cpu,mmu}type when
the kernel was built for only one type of CPU.
 1.49 05-Dec-2000  scw Update pm_stats.resident_count when entering pages in the kernel pmap.
 1.48 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.47 28-Sep-2000  itohy Fix the type of pmap_zero_page_uncached from void (paddr_t) to
boolean_t (paddr_t) to make it compile again.
 1.46 22-Sep-2000  scw Add pmap_zero_page_uncached(), and the PMAP_PAGEIDLEZERO macro.
 1.45 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.44 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.43 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.42 27-May-2000  scw Nuke HP_SEG_SIZE. Use NBSEG instead (as used by m68k_trunc_seg() et al),
which takes into account the mmu type.
 1.41 26-Mar-2000  kleink branches: 1.41.2;
Merge parts of chs-ubc2 into the trunk:
* Remove the casts to vaddr_t from the round_page() and trunc_page() macros to
make them type-generic, which is necessary i.e. to operate on file offsets
without truncating them.
* In due course, cast pointer arguments to these macros to an appropriate
integral type (paddr_t, vaddr_t).

Originally done by Chuck Silvers, updated by myself.
 1.40 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.39 13-Nov-1999  thorpej branches: 1.39.2;
Update for pmap_enter() API change. No functional difference.
 1.38 12-Sep-1999  chs branches: 1.38.2; 1.38.4; 1.38.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.37 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.36 17-Jun-1999  thorpej pmap_change_wiring() -> pmap_unwire().
 1.35 17-Jun-1999  thorpej Remove pmap_pageable(); no pmap implements it, and it is not really useful,
because pmap_enter()/pmap_change_wiring() (soon to be pmap_unwire())
communicate the information in greater detail.
 1.34 15-Jun-1999  thorpej Don't (ab)use uvm_map_pageable() to allocate PT pages. Instead, do
some internal reference counting on PT pages. We still allocate them
with the page fault routine (a wire-fault, now), but no longer free
PT pages from pmap_pageable().
 1.33 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.32 22-Apr-1999  chs in pmap_pageable(), rather than marking a PT page as not modified
to trick the pagedaemon into freeing it later, just unmap the page
and free it immediately. fixes PR 7337.
 1.31 03-Apr-1999  scw Sync with Jason's latest changes to hp300 pmap.
 1.30 27-Mar-1999  mycroft branches: 1.30.2;
Fix a bug in pmap_collect_pv(), even though nobody currently uses it:
When we put a page on the collection list, we must subtract NPVPPG from the
total free count: one for each pv_entry that's free in that page, and one for
each free pv_entry in other pages that we're going to eat by moving the ones
in the page being collected.
 1.29 27-Mar-1999  mycroft Oops; forgot to change some pmap_enter() calls.
 1.28 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.27 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.26 26-Feb-1999  is MVME68K specific part of fix for PR 6152
 1.25 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.24 11-Oct-1998  chuck branches: 1.24.6;
remove unused share map code from UVM:
- update calls to uvm_unmap_remove/uvm_unmap (mainonly boolean arg
has been removed)
 1.23 22-Aug-1998  scw Fix tyop.
 1.22 22-Aug-1998  scw vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.21 16-Aug-1998  scw Switch to using the common m68k stuff for a couple of things:

. cache control functions <m68k/cacheops.h>
. sigreturn code <m68k/m68k/sigreturn.s>

Also a few of other things found while scouting around for vm_offset_t
changes.
 1.20 25-Jun-1998  thorpej defopt COMPAT_HPUX
 1.19 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.18 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.17 19-May-1998  thorpej It is no longer necessary for pmap_pinit() and pmap_release() to be
pmap interface functions, as NetBSD no longer uses statically allocated
pmaps (except for the kernel pmap, which is special-cased anyhow).
 1.16 18-Mar-1998  thorpej - Make MACHINE_NEW_NONCONTIG non-optional.
- G/C some things left over from the old noncontig code.
 1.15 24-Feb-1998  chuck compute st_map size properly
 1.14 24-Feb-1998  thorpej Duh! Use uvm_km_valloc_wait(), NOT uvm_km_zalloc() to allocate user page
tables. (Thanks for pointing that out, Chuck!)
 1.13 21-Feb-1998  scw Implement changes for MACHINE_NEW_NONCONTIG and UVM.
 1.12 31-Jan-1998  ross In some hp300-derived pmaps, in pmap_page_protect(), don't walk off the
end of the list of physical->virtual entires into NULL space if the last
entry is (mysteriously) wired in the pmap. Add a DEBUG printf on alpha.
 1.11 06-Jan-1998  thorpej Garbage-collect pm_stchanged; it's not used by anything.
 1.10 06-Jan-1998  thorpej Garbage-collect use of the PCB's copy of the user segment table pointer.
 1.9 01-Jan-1998  thorpej - Make pmap_activate() and pmap_deactivate() take a struct proc *.
- Define active_user_pmap() and use it in the appropriate places (from hp300
port).
 1.8 21-Oct-1997  scw Finally nobble the last MACHINE_NONCONTIG gremlins. Needed to add
<machine/vmparam.h> to pmap.c and locore.s. Plus, genassym.sh needed
to have USRSTACK removed due to conflict with vmparam.h
 1.7 09-Oct-1997  scw branches: 1.7.2;
Added support for VMEbus RAM cards via MACHINE_NONCONTIG.
The kernel should still compile and run without it, but I've
put the config option in std.mvme68k so it's built like this
as standard.
 1.6 02-Feb-1997  thorpej branches: 1.6.8;
Use zeropage() in pmap_zero_page().
 1.5 13-Oct-1996  christos backout previous kprintf change
 1.4 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.3 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.2 12-Oct-1995  chuck changed blkclr to bzero
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.2;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.2.1 12-Oct-1995  chuck change blkclr call to bzero.
 1.6.8.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7.2.2 07-Feb-1998  mellon Pull up 1.12 (ross)
 1.7.2.1 22-Oct-1997  mellon pull up from main trunk
 1.24.6.1 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.30.2.2 26-Apr-1999  perry branches: 1.30.2.2.2;
pullup 1.31->1.32 (chuq)
 1.30.2.1 05-Apr-1999  scw Pullup 1.31 from trunk.
 1.30.2.2.2.2 02-Aug-1999  thorpej Update from trunk.
 1.30.2.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.38.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.38.4.1 15-Nov-1999  fvdl Sync with -current
 1.38.2.7 23-Apr-2001  bouyer Sync with HEAD.
 1.38.2.6 27-Mar-2001  bouyer Sync with HEAD.
 1.38.2.5 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.38.2.4 05-Jan-2001  bouyer Sync with HEAD
 1.38.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.38.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.38.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.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.39.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.41.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.51.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.51.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.63.2.7 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.63.2.6 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.63.2.5 16-Mar-2002  jdolecek Catch up with -current.
 1.63.2.4 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.63.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.63.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.63.2.1 03-Aug-2001  lukem update to -current
 1.69.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.71.4.10 11-Nov-2002  nathanw Catch up to -current
 1.71.4.9 18-Oct-2002  nathanw Catch up to -current.
 1.71.4.8 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.71.4.7 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.71.4.6 20-Jun-2002  nathanw Catch up to -current.
 1.71.4.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.71.4.4 08-Jan-2002  nathanw Catch up to -current.
 1.71.4.3 18-Nov-2001  scw In pmap_activate(), we only need to load the pmap if switching to
a new/different process.
 1.71.4.2 17-Nov-2001  scw Kernel support for Scheduler Activations on m68k-based ports using
mvme68k as a testbed.

Boots multi-user on an mvme162, although userland support for SA is not
yet integrated/tested.
 1.71.4.1 13-Oct-2001  scw file pmap.c was added on branch nathanw_sa on 2001-11-17 13:07:56 +0000
 1.77.6.1 30-May-2002  gehenna Catch up with -current.
 1.53 23-Dec-2016  maya remove conflicting declarations of physmem. we want it to be psize_t
 1.52 19-Sep-2013  tsutsui branches: 1.52.6; 1.52.10;
Move physmem calculations before nptpage initialization.

Fixes mvme68k specific part of PR port-m68k/45915
(panic: pmap_enter_ptpage: can't get KPT page).
Reported and confirmed by Andrew Gillham on his MVME177:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000082.html

Should be pulled up to all netbsd-6 branches.
 1.51 10-Feb-2012  mhitch branches: 1.51.2; 1.51.6; 1.51.8; 1.51.10; 1.51.16;
Sigh, it's been too long since I've done some of this. Fix the RELOC().
 1.50 10-Feb-2012  mhitch Oops - have to RELOC(physmem) here.
 1.49 10-Feb-2012  mhitch The recent kmem changes allocate a large kernel address space before
pmap_init() is called, and the initial kernel PT pages aren't enough
for the allocations pmap_init(). This fails because pmap_kenter_pa()
tries to allocate a new kernel PT page and traps because the pmap has
not been initialized. When computing the number if initial kernel PT
pages, include enough to allow kmem to map the physical memory. This
should fix PR/45915. OK by releng@. One mac68k system has been verified
to boot. Volunteers to test the others welcome. Amigas with at least
up to 128MB of memory were OK, but larger memory will need some adjusting.
 1.48 02-Jan-2011  tsutsui branches: 1.48.8; 1.48.12;
Tidy up common comments. (Yes, too many dup code...)
 1.47 02-Jan-2011  tsutsui Misc cosmetics to reduce diffs among these ports.
 1.46 02-Jan-2011  tsutsui Some cosmetics to reduce diffs from other m68k ports.
 1.45 02-Jan-2011  tsutsui Remove "last kernel PT page" stuff derived from hp300 where PA != VA.

Compile test only, but same changes as other PA == VA m68k ports like
luna68k, news68k, and x68k used for a decade.
 1.44 25-Dec-2010  tsutsui Put somehow missed code part in rev 1.36:
> Allocate lwp0upa (PA of lwp0 uarea) right after kernel rather than
> between other page tables to use different mappings for ste/pte pages
> as well as amiga and atari. Should resolve XXX comments in next68k and x68k.
 1.43 25-Dec-2010  tsutsui Fix harmless pasto and tweak some comments.
 1.42 25-Dec-2010  tsutsui Fix fatal typo and pasted lines slipped in the last December
that prevent 68030 machines boot on these ports.
(only hp300 and mvme68k have supported 030 models)

Sorry for so long breakage.
 1.41 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

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

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.40 11-Dec-2009  tsutsui branches: 1.40.2; 1.40.4;
Use appropriate macro during pmap initialization:
- use SYSMAP_VA, SEGSHIFT for Sysmap address and table entries
- use TIA_SIZE, TIB_SIZE for sizes of table entries

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

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

Tested on atari, hp300, mac68k, and news68k.

XXX: Why is protection_codes[] array initialized at run time?
 1.38 06-Dec-2009  tsutsui Sync MMU table initialization with amiga and atari a bit:

- for 040/060, move L2 descs for Sysptmap from the last L2 block in segment
table pages to the contiguous block with ones for segment table mappings

- for 020/030, invalidate ste and pte entries separately since
ste size (TIA_SIZE) and pte size (TIB_SIZE) could be different
on 8KB/page systems

Tested on hp300 (040), mac68k (LC040), and news68k (030)
(and untested on others).

XXX: some more stuff in pmap_bootstrap.c could be moved into
XXX: common pmap_bootstrap_finalize()?
 1.37 05-Dec-2009  tsutsui Use proper macro, variable names, types, and assignments for readability.
 1.36 04-Dec-2009  tsutsui Allocate lwp0upa (PA of lwp0 uarea) right after kernel rather than
between other page tables to use different mappings for ste/pte pages
as well as amiga and atari. Should resolve XXX comments in next68k and x68k.

Tested on hp300 and mac68k.
 1.35 04-Dec-2009  tsutsui No need to initialize lwp0 u-area in pmap_bootstrap()
since it will be done in pmap_bootstrap_finalize().
 1.34 04-Dec-2009  tsutsui Update one more comment.
 1.33 04-Dec-2009  tsutsui Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc.
Also update some comment.
Compile test only.
 1.32 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.31 17-Jan-2009  tsutsui Move extern decls for Sysseg, Sysptmap, Sysptsize, mem_size, virtual_avail,
virtual_end, and protection_codes[] to common <m68k/pmap_motorola.h>,
and also make protection_codes[] unsigned.

XXX: avail_start and avail_end should also be moved, but it causes
XXX: -Wshadow warnings in uvm/uvm_page.c:uvm_page_physload() and
XXX: I don't have a good idea of alternative names for now.
 1.30 28-Dec-2008  tsutsui Use the global kernel_pmap_ptr pointer in each MD pmap_bootstrap.c
(where MMU is not enabled yet) and make kernel_pmap_store static again.
Also consistently use uintptr_t on address conversion in RELOC() macro.

Tested on hp300 (PA != VA) and news68k (PA == VA).
 1.29 12-Jan-2008  tsutsui branches: 1.29.6; 1.29.10; 1.29.18;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.28 17-Oct-2007  garbled branches: 1.28.2; 1.28.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.27 18-May-2007  tsutsui branches: 1.27.10;
Update comments to sync yamt-km merge (Sysmap has been moved).

See also:
http://mail-index.netbsd.org/source-changes/2005/02/23/0004.html
 1.26 05-Mar-2007  tsutsui branches: 1.26.2; 1.26.4; 1.26.10;
Allocate msgbufaddr in pmap_bootstrap.c where it's initilized,
and move its declaration into <m68k/pmap_motorola.h>.
 1.25 05-Mar-2007  tsutsui - add missed '*'
- vmmap is (char *) in pmap_motorola.h
 1.24 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.23 11-Dec-2005  christos branches: 1.23.26;
merge ktrace-lwp.
 1.22 01-Apr-2005  yamt branches: 1.22.2;
merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.21 07-Aug-2003  agc branches: 1.21.8; 1.21.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.20 15-Jul-2003  lukem __KERNEL_RCSID()
 1.19 02-Apr-2003  thorpej branches: 1.19.2;
Use PAGE_SIZE rather than NBPG.
 1.18 05-Nov-2002  chs merge pmap.c for all 4k-page motorola-MMU (or compatible) m68k platforms.
 1.17 08-Nov-2001  scw branches: 1.17.2;
Commit a change I've had lying around for a while: Initialise wired
PTEs with `PG_U' to avoid them being needlessly updated when first
accessed.
 1.16 12-Aug-2001  scw branches: 1.16.4;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.15 20-Nov-2000  scw branches: 1.15.4;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.14 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.13 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.12 18-Sep-1999  scw branches: 1.12.2; 1.12.10;
Tidy up the ethernet buffer allocation code.
 1.11 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.10 22-Aug-1998  scw branches: 1.10.6;
vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.9 18-Mar-1998  thorpej - Make MACHINE_NEW_NONCONTIG non-optional.
- Maintain two copies of the number and size of physical memory segments.
One copy, mem_clusters[], contains _all_ of physical RAM, for crash dumps.
The other copy, phys_seg_list[], starts out with all of physical RAM (and
is used to initialize mem_clusters[]), but is adjusted to be the memory
actually managed by the VM system.
- Fix computation of physmem; when support for MACHINE_NEW_NONCONTIG was
added, physmem was accidentally changed to not take into account the memory
located before the kernel, or the memory taken up by the kernel itself.
 1.8 21-Feb-1998  scw Implement changes for MACHINE_NEW_NONCONTIG and UVM.
 1.7 06-Dec-1997  scw Doh! 'avail_end' is a physical offset, not a page number!
 1.6 01-Nov-1997  scw Chnage MACHINE_NONCONTIG implementation such that the message buffer is
always located at the end of onboard RAM. This allows locore.s to zero
any offboard RAM to initialise the parity bit which most VMEbus RAM cards
have. Without this, many cards buserr on the first read access.
Thanks to Herb Peyerl for the idea.
 1.5 09-Oct-1997  scw branches: 1.5.2;
Added support for VMEbus RAM cards via MACHINE_NONCONTIG.
The kernel should still compile and run without it, but I've
put the config option in std.mvme68k so it's built like this
as standard.
 1.4 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.3 18-Mar-1997  thorpej branches: 1.3.4;
When mapping kernel text, always make it PG_RO.
 1.2 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.3.4.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.4.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.2.2 09-Dec-1997  thorpej Pull up from trunk: avail_end is a phys addr, not a pfn. (scw)
 1.5.2.1 07-Nov-1997  mellon Pull rev 1.6 up from trunk (scw)
 1.10.6.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.10.6.1 31-Jan-1999  scw Make the ethernet packet buffer shared between the Lance and i82596
drivers.

While I'm here, make the packet buffer size adjustable, either with
a config file option or by patching a variable. Make sure to mark all
packet buffer pages as non-cacheable.
 1.12.10.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.12.10.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.12.2.2 22-Nov-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.15.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.15.4.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.16.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.17.2.2 11-Nov-2002  nathanw Catch up to -current
 1.17.2.1 08-Nov-2001  nathanw file pmap_bootstrap.c was added on branch nathanw_sa on 2002-11-11 22:01:33 +0000
 1.19.2.4 01-Apr-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.21.10.2 28-Feb-2005  yamt sync some whitespace and comments among m68k pmap_bootstrap variants.
no functional changes.
 1.21.10.1 23-Feb-2005  yamt change kernel va layout, following mac68k.
 1.21.8.1 29-Apr-2005  kent sync with -current
 1.22.2.2 21-Jan-2008  yamt sync with head
 1.22.2.1 03-Sep-2007  yamt sync with head.
 1.23.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.26.10.1 22-May-2007  matt Update to HEAD.
 1.26.4.1 11-Jul-2007  mjf Sync with head.
 1.26.2.1 27-May-2007  ad Sync with head.
 1.27.10.2 23-Mar-2008  matt sync with HEAD
 1.27.10.1 06-Nov-2007  matt sync with HEAD
 1.28.8.1 19-Jan-2008  bouyer Sync with HEAD
 1.28.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.29.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.29.10.3 11-Aug-2010  yamt sync with head.
 1.29.10.2 11-Mar-2010  yamt sync with head
 1.29.10.1 04-May-2009  yamt sync with head.
 1.29.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.40.4.2 05-Mar-2011  rmind sync with head
 1.40.4.1 03-Jul-2010  rmind sync with head
 1.40.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.48.12.1 18-Feb-2012  mrg merge to -current.
 1.48.8.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.48.8.1 17-Apr-2012  yamt sync with head
 1.51.16.1 22-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #953):
sys/arch/mvme68k/mvme68k/pmap_bootstrap.c: revision 1.52
Move physmem calculations before nptpage initialization.
Fixes mvme68k specific part of PR port-m68k/45915
(panic: pmap_enter_ptpage: can't get KPT page).
Reported and confirmed by Andrew Gillham on his MVME177:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000082.html
Should be pulled up to all netbsd-6 branches.
 1.51.10.1 18-May-2014  rmind sync with head
 1.51.8.1 22-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #953):
sys/arch/mvme68k/mvme68k/pmap_bootstrap.c: revision 1.52
Move physmem calculations before nptpage initialization.
Fixes mvme68k specific part of PR port-m68k/45915
(panic: pmap_enter_ptpage: can't get KPT page).
Reported and confirmed by Andrew Gillham on his MVME177:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000082.html
Should be pulled up to all netbsd-6 branches.
 1.51.6.2 03-Dec-2017  jdolecek update from HEAD
 1.51.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.51.2.1 22-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #953):
sys/arch/mvme68k/mvme68k/pmap_bootstrap.c: revision 1.52
Move physmem calculations before nptpage initialization.
Fixes mvme68k specific part of PR port-m68k/45915
(panic: pmap_enter_ptpage: can't get KPT page).
Reported and confirmed by Andrew Gillham on his MVME177:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000082.html
Should be pulled up to all netbsd-6 branches.
 1.52.10.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.52.6.1 05-Feb-2017  skrll Sync with HEAD
 1.4 14-Nov-2004  christos Delete copy of empty function.
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 18-Jan-2001  tv branches: 1.2.24;
No-op commit to force update to a non-"-kk" revision.
 1.1 17-Jan-2001  fvdl branches: 1.1.2;
Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
 1.1.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.1.2.1 17-Jan-2001  bouyer file procfs_machdep.c was added on branch thorpej_scsipi on 2001-01-18 09:22:47 +0000
 1.2.24.4 29-Nov-2004  skrll Sync with HEAD.
 1.2.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.24.1 03-Aug-2004  skrll Sync with HEAD
 1.5 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by scw (copyright holder).
 1.4 22-Aug-1998  scw branches: 1.4.156;
vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.3 18-Mar-1998  thorpej Minor cosmetic cleanup; no functional change.
 1.2 21-Feb-1998  scw Implement changes for MACHINE_NEW_NONCONTIG and UVM.
 1.1 09-Oct-1997  scw branches: 1.1.2;
Added support for VMEbus RAM cards via MACHINE_NONCONTIG.
The kernel should still compile and run without it, but I've
put the config option in std.mvme68k so it's built like this
as standard.
 1.1.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 09-Oct-1997  thorpej file seglist.h was added on branch marc-pcmcia on 1997-10-14 10:17:50 +0000
 1.4.156.1 11-Mar-2010  yamt sync with head
 1.10 03-Dec-2007  ad 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.9 21-Dec-2006  yamt branches: 1.9.22; 1.9.24; 1.9.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.8 24-Dec-2005  perry branches: 1.8.20; 1.8.22;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 15-Jul-2003  lukem branches: 1.6.16;
__KERNEL_RCSID()
 1.5 06-Jul-2001  scw branches: 1.5.8; 1.5.24;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.4 15-Jan-2001  thorpej Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
 1.3 24-Nov-2000  scw Some minor optimisations.
 1.2 20-Nov-2000  scw branches: 1.2.2;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.1 20-Jul-2000  scw branches: 1.1.2;
Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.1.2.3 29-Jul-2000  scw Fix another botched pullup: approved by thorpej
This file needs <vm/vm.h> and a netintr() prototype
to build on the branch.
 1.1.2.2 22-Jul-2000  scw Pullup new file from trunk.
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.1.2.1 20-Jul-2000  scw file softintr.c was added on branch netbsd-1-5 on 2000-07-22 15:53:25 +0000
 1.2.2.5 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.2.2.4 08-Dec-2000  bouyer Sync with HEAD.
 1.2.2.3 22-Nov-2000  bouyer Sync with HEAD.
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 20-Nov-2000  bouyer file softintr.c was added on branch thorpej_scsipi on 2000-11-20 20:15:26 +0000
 1.5.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.24.1 03-Aug-2004  skrll Sync with HEAD
 1.5.8.2 06-Jul-2001  scw Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.5.8.1 06-Jul-2001  scw file softintr.c was added on branch nathanw_sa on 2001-07-06 19:00:15 +0000
 1.6.16.3 07-Dec-2007  yamt sync with head
 1.6.16.2 30-Dec-2006  yamt sync with head.
 1.6.16.1 21-Jun-2006  yamt sync with head.
 1.8.22.1 10-Dec-2006  yamt implement splraiseipl and makeiplcookie for mvme68k.
 1.8.20.1 12-Jan-2007  ad Sync with head.
 1.9.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.9.24.1 23-Mar-2008  matt sync with HEAD
 1.9.22.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.3 31-Jan-1997  thorpej This file is obsolete; this information is now generated by config(8).
 1.2 26-May-1996  chuck kill "options GENERIC" by replacing it with Theo's sparc code.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.6;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.6.1 27-May-1996  chuck fix boot "-a"
 1.25 03-Nov-2002  chs use a merged sys_machdep.c for all the motorola-MMU m68k platforms.
 1.24 20-Dec-2000  scw branches: 1.24.8;
Some minor optimisations to avoid checking {cpu,mmu}type when
the kernel was built for only one type of CPU.
 1.23 13-Dec-2000  jdolecek g/c obsolete vtrace(2) stuff
 1.22 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.21 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.20 28-Nov-1999  is Fix typo (&& -> &).
 1.19 25-Nov-1999  is From the 68040 User Manual, page 4-10:

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

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

Note that the 68060 UM has copied the above cited passage, but in fact this is
not true. This might be connected to the fact that the 68060 does ensure
memory access order under most conditions.
 1.18 08-Jul-1999  thorpej branches: 1.18.2; 1.18.8;
Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.17 26-Feb-1999  is branches: 1.17.2; 1.17.4;
synchronize types, and s/curproc/p/ in one forgotten place
 1.16 26-Feb-1999  is MVME68K specific part of fix for PR 6152
 1.15 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.14 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.13 19-Jan-1999  thorpej branches: 1.13.2;
No need for <sys/mtio.h>
 1.12 22-Aug-1998  scw vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.11 16-Aug-1998  scw Switch to using the common m68k stuff for a couple of things:

. cache control functions <m68k/cacheops.h>
. sigreturn code <m68k/m68k/sigreturn.s>

Also a few of other things found while scouting around for vm_offset_t
changes.
 1.10 25-Jun-1998  thorpej defopt COMPAT_HPUX
 1.9 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.8 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.7 25-Feb-1998  perry note second parm of sysarch() is now void *, + trivial KNF, etc.
 1.6 19-May-1997  veego Fix lossage from the latest vm_pmap changes.
 1.5 08-May-1996  thorpej RCS id police.
 1.4 12-Oct-1995  chuck changed sysarch() to sys_sysarch()
 1.3 22-Sep-1995  thorpej branches: 1.3.2;
Need <sys/mount.h>
 1.2 19-Sep-1995  thorpej Make system calls conform to a standard prototype and bring those
prototypes into scope.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.3.2.1 12-Oct-1995  chuck changed sysarch() to sys_sysarch()
 1.13.2.1 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.17.4.1 02-Aug-1999  thorpej Update from trunk.
 1.17.2.2 29-Nov-1999  he Pull up revision 1.20 (requested by is):
Fix a typo which caused excessive cache flushes.
 1.17.2.1 27-Nov-1999  he Pull up revision 1.19 (requested by is):
Fix i-cache/d-cache synchronization for M68040 cpus (see M68040
UM p.4-10). Makes regress/sys/kern/sigtramp work even on M68040.
 1.18.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.18.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.18.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.18.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.24.8.5 11-Nov-2002  nathanw Catch up to -current
 1.24.8.4 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.24.8.3 03-Jul-2002  nathanw Whitespace.
 1.24.8.2 29-May-2002  nathanw #include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)
 1.24.8.1 17-Nov-2001  scw Kernel support for Scheduler Activations on m68k-based ports using
mvme68k as a testbed.

Boots multi-user on an mvme162, although userland support for SA is not
yet integrated/tested.
 1.117 20-Jan-2024  thorpej Largely unify the <machine/cpu.h> headers on the m68k platforms.
 1.116 19-Jan-2024  thorpej Consistently use "intr_depth" as the name of the interrupt depth counter
on m68k platforms.
 1.115 16-Jan-2024  thorpej Switch mvme68k over to the common interrupt dispatch code and G/C
__HAVE_LEGACY_INTRCNT.
 1.114 05-Oct-2023  ad Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).
 1.113 30-Sep-2023  andvar Improve kgdb build for mvme68k:
* include sys/kgdb.h in mvme68k/trap.c for missing definitions.
* cast second kgdb_trap argument to (db_regs_t *).
* build m68k/kgdb_machdep.c in kgdb enable build for kgdb_trap() implementation.

KGDB build still fails, apparently due to missing zs_kgdb.c implementation.
 1.112 25-Sep-2021  tsutsui Call cnpollc(9) before cngetc(9) as the cons(9) man page says.

Affects only inside #ifdef DEBUG part on "trap during panic" in trap.c
derived from hp300.
 1.111 21-Nov-2019  ad mi_userret(): take care of calling preempt(), set spc_curpriority directly,
and remove MD code that does the same.
 1.110 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

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

Welcome to NetBSD 8.99.37.
 1.109 18-Feb-2019  thorpej Refactor the 68040 writeback() from each m68k port's trap handler into a
shared copy: m68040_writeback(). It is essentially a copy of the Atari
version, with some minor cosmetic tweaks and one small performance optimization
from the mvme68k port.

Tested by rjs@ on a Quadra 950. (Thanks!)
 1.108 04-Mar-2015  martin branches: 1.108.18;
Handle EINVAL in the fault path and send SIGBUS on mmap'd access past EOF
 1.107 24-Mar-2014  christos branches: 1.107.6;
use cpu_{g,s}etmodel
fix unused
 1.106 19-Feb-2012  rmind branches: 1.106.2; 1.106.4;
Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.105 08-Feb-2011  rmind branches: 1.105.4; 1.105.8;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.104 17-Jan-2011  tsutsui branches: 1.104.2;
Explicitly include <machine/pcb.h> for struct pcb.
 1.103 20-Dec-2010  matt branches: 1.103.2;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.102 07-Jul-2010  chs implement ucas_* for m68k.
 1.101 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

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

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.100 20-Mar-2010  chs fix copy{in,out}{,str}() to return the error returned by uvm_fault().
fixes PR 41813.
 1.99 23-Nov-2009  rmind branches: 1.99.2; 1.99.4;
Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.98 27-Jan-2009  martin Centralize fpu exception to siginfo code encoding for all m68k archs,
fixes a failure in the lib/libc/ieeefp/except regression test.
 1.97 15-Oct-2008  wrstuden branches: 1.97.2; 1.97.4;
Merge wrstuden-revivesa into HEAD.
 1.96 24-Apr-2008  ad branches: 1.96.2; 1.96.4; 1.96.8;
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
 1.95 12-Jan-2008  tsutsui branches: 1.95.6; 1.95.8;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.94 31-Dec-2007  ad Remove COMPAT_HPUX.
 1.93 05-Nov-2007  ad branches: 1.93.2; 1.93.8;
Don't set l_usrpri / spc_curpriority here. mi_userret() does it.
 1.92 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.91 01-Sep-2007  mhitch branches: 1.91.4;
68030 and 68040 processors consider the read portion of a read-modify-write
transfer as a write to ensure the memory is writable before starting any
transfer. The fault status information does not reflect this in the 'read'
status bit (i.e. it shows up as a read access), so faults with a RMW access
to non-writable memory was not getting the correct protection. The page would
be read-only and the instruction would fault over and over.

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

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

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

Fixes PR#36848.
 1.90 12-Jun-2007  mhitch branches: 1.90.4; 1.90.8; 1.90.10;
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.89 21-May-2007  tsutsui Adapt rest of m68k ports to yamt-idlelwp. Compile tested only.
 1.88 04-Mar-2007  christos branches: 1.88.2; 1.88.4; 1.88.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.87 28-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.86 09-Feb-2007  ad branches: 1.86.2;
Merge newlock2 to head.
 1.85 23-Jul-2006  ad branches: 1.85.4; 1.85.8; 1.85.10;
Use the LWP cached credentials where sane.
 1.84 19-Jul-2006  ad - Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
 1.83 15-May-2006  yamt include kauth.h for kauth_cred_geteuid.
 1.82 14-May-2006  elad integrate kauth.
 1.81 15-Mar-2006  drochner branches: 1.81.2;
adapt to uvm_fault() interface cleanup: kill the useless 3rd argument
 1.80 25-Feb-2006  wiz branches: 1.80.2; 1.80.4;
Fix some typos.
 1.79 24-Dec-2005  perry branches: 1.79.2; 1.79.4; 1.79.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.78 11-Dec-2005  christos merge ktrace-lwp.
 1.77 03-Jun-2005  scw branches: 1.77.2;
Fix const fallout.
 1.76 28-Aug-2004  jdolecek use uvm_grow() to update stack segment size on stack page fault instead
of MD code
 1.75 16-May-2004  wiz "panicking" needs a k.
 1.74 14-Mar-2004  cl add kernel part of concurrency support for SA on MP systems
- move per VP data into struct sadata_vp referenced from l->l_savp
* VP id
* lock on VP data
* LWP on VP
* recently blocked LWP on VP
* queue of LWPs woken which ran on this VP before sleep
* faultaddr
* LWP cache for upcalls
* upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP
 1.73 08-Nov-2003  tsutsui Remove obsolete comments about curproc.
 1.72 02-Nov-2003  cl Extend the #ifdef M68040 so that the `sig' variable declaration is moved
in as well, as it's otherwise not used. (from atari/atari/trap.c and
x68k/x68k/trap.c)
 1.71 31-Oct-2003  cl Reduce code duplication by adding mi_userret() in sys/userret.h
containing signal posting, kernel-exit handling and sa_upcall processing.

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

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

As discussed on tech-kern. Reviewed and OK's by Christos.
 1.69 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.68 17-Sep-2003  cl add MD part of SA/pthread pagefault handling on all m68k ports
 1.67 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.66 15-Jul-2003  lukem __KERNEL_RCSID()
 1.65 02-Apr-2003  thorpej branches: 1.65.2;
Use PAGE_SIZE rather than NBPG.
 1.64 28-Jan-2003  wiz success, not sucess. Noted by mjl.
 1.63 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.62 14-Feb-2002  chs branches: 1.62.12;
allow writing to write-only mappings. fixes PR 3493.
 1.61 10-Sep-2001  chris branches: 1.61.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.60 07-Jul-2001  scw branches: 1.60.2; 1.60.4;
bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
 1.59 06-Jul-2001  scw Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.58 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.57 30-May-2001  lukem add missing #include "opt_kgdb.h"
 1.56 24-Apr-2001  thorpej Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.55 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.54 23-Dec-2000  jdolecek branches: 1.54.2;
split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.

XXX I wish m68k ports would share trap.c
 1.53 22-Dec-2000  scw Some small optimisations:
o Avoid checking cputype when the kernel is built for one cpu variant only.
o In writeback(), don't use bcopy() to write a mere 16 bytes of 16-byte
aligned data; it's much quicker to copy it inline.
 1.52 19-Dec-2000  scw Unification of the m68k syscall() function.
 1.51 02-Dec-2000  scw On exit from syscalls, don't trash %A0 if the process is
using the COMPAT_AOUT_M68K emulation package.
 1.50 02-Dec-2000  scw Use "EMUL_HAS_SYS___syscall" instead of checking p->p_emul.
Removes dependency on COMPAT_AOUT_M68K.
 1.49 30-Nov-2000  scw Delete an extraneous underscore in the last commit.
 1.48 30-Nov-2000  scw Copy the syscall return value into A0, as per the SVR4 ABI.
Also prepare for COMPAT_AOUT_M68K.
 1.47 24-Nov-2000  scw `emul_sunos' is now declared in the appropriate header file.
 1.46 21-Nov-2000  tsutsui s/struct const sysent/const struct sysent/

(BTW, luna68k was missed in emul/execsw changes?)
 1.45 21-Nov-2000  jdolecek restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
provide single struct emul per emulation
* elf:
- kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
per emulation and contains pointer to respective probe function
- interp is allocated via MALLOC() rather than on stack
- elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
part of appropriate execsw[] entry
* constify couple of structures
 1.44 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.43 20-Jul-2000  scw Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.42 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.41 27-Jun-2000  mrg remove redudant <vm/pmap.h> includes. <vm/pmap.h> -> <uvm/uvm_pmap.h>
 1.40 06-Jun-2000  soren branches: 1.40.2;
defopt SYSCALL_DEBUG.
 1.39 27-May-2000  sommerfeld branches: 1.39.2;
Reduce use of curproc in several places:

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

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

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

Also, miscellaneous cleanups in ktrace:

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

- move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

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

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

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

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

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

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.37 24-May-2000  thorpej Use preempt(), not an open-coded equivalent (which won't be
equivalent for long).
 1.36 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.35 05-Dec-1999  ragge branches: 1.35.2;
clrnd()/clbase() discarding.
 1.34 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.33 26-Oct-1999  itohy Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.
 1.32 03-Aug-1999  dbj branches: 1.32.2; 1.32.4; 1.32.6;
fix prototypes and quiet compiler warnings on next68k
 1.31 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.30 26-Mar-1999  mycroft branches: 1.30.2; 1.30.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.29 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.28 18-Mar-1999  chs if uvm_fault() fails with KERN_RESOURCE_SHORTAGE, send a SIGKILL
and print a message about it. this will be used to recover from
out-of-swap conditions.
 1.27 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.26 15-Dec-1998  itohy branches: 1.26.2;
Added COMPAT_LINUX support.
 1.25 11-Nov-1998  thorpej Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.24 01-Oct-1998  thorpej Adapt to signal changes.
 1.23 22-Aug-1998  scw vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.22 16-Aug-1998  scw Switch to using the common m68k stuff for a couple of things:

. cache control functions <m68k/cacheops.h>
. sigreturn code <m68k/m68k/sigreturn.s>

Also a few of other things found while scouting around for vm_offset_t
changes.
 1.21 04-Jul-1998  jonathan defopt DDB.
 1.20 25-Jun-1998  thorpej defopt COMPAT_HPUX
 1.19 25-Jun-1998  thorpej defopt COMPAT_SUNOS
 1.18 25-Jun-1998  thorpej defopt KTRACE
 1.17 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.16 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.15 21-Feb-1998  scw Implement changes for MACHINE_NEW_NONCONTIG and UVM.
 1.14 13-Feb-1998  scottr Avoid declaring the "astpending" and "want_resched" globals in cpu.h,
as this breaks C++ code that happens to indirectly include this header.
Both Matthias Scheler and I noticed this, independently.

This problem notably does not affect the atari and sun3/sun3x ports,
which have already implemented a similar solution.
 1.13 12-Sep-1997  mycroft Eliminate some uses of FPCOPROC.
 1.12 20-Jul-1997  kleink branches: 1.12.2; 1.12.4;
Fix another oversight from last commit.
 1.11 20-Jul-1997  kleink Fix `return();' vs. `return;' in last commit; pointed out by Steve Woodford.
 1.10 08-Jul-1997  kleink From sun3:
Correct handling for Trap #2 in SunOS executables,
now that we know it is supposed to flush the cache.
(Was thought to be "some obscure FPU operation".)
 1.9 19-May-1997  veego Fix lossage from the latest vm_pmap changes.
 1.8 09-Apr-1997  thorpej regdump() takes a struct trapframe *
 1.7 02-Feb-1997  thorpej Purely cosmetic whitespace frobbing.
 1.6 13-Oct-1996  christos backout previous kprintf change
 1.5 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.4 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.3 11-Oct-1995  chuck changed SUNOS_SYS_sunos_sigreturn to SUNOS_SYS_sigreturn.
 1.2 10-Aug-1995  chuck branches: 1.2.2;
sync with hp300 version
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.2.1 12-Oct-1995  chuck change SUNOS_SYS_sunos_sigreturn to SUNOS_SYS_sigreturn
 1.12.4.1 08-Sep-1997  thorpej Significantly restructure the way signal state for a process is stored.
Rather than using bitmasks to redundantly store the information kept
in the process's sigacts (because the sigacts was kept in the u-area),
hang sigacts directly off the process, and access it directly.

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

Make sigacts sharable by adding reference counting.
 1.12.2.2 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.12.2.1 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.26.2.1 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.30.4.1 02-Aug-1999  thorpej Update from trunk.
 1.30.2.1 21-Nov-1999  he Pull up revision 1.33 (requested by itohy):
Fix the problem where single-step tracing of a trap instruction
makes the system fall into kernel debugger.
 1.32.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.32.4.1 15-Nov-1999  fvdl Sync with -current
 1.32.2.5 27-Mar-2001  bouyer Sync with HEAD.
 1.32.2.4 05-Jan-2001  bouyer Sync with HEAD
 1.32.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.32.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.32.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.35.2.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.39.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.40.2.1 22-Jul-2000  scw Pullup from trunk: 1.43
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.54.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.54.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.60.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.60.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.60.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.61.4.10 07-Jan-2003  thorpej In the SA universe, the switch-to-this-LWP decision is made at a
different level than where preempt() calls are made, which renders
the "newlwp" argument useless. Replace it with a "more work to do"
boolean argument. Returning to userspace preempt() calls pass 0.
"Voluntary" preemptions in e.g. uiomove() pass 1. This will be used
to indicate to the SA subsystem that the LWP is not yet finished in
the kernel.

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

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

XXX It's getting crowded in here. Collapsing posting signals, upcalls, and
XXX kernel-exit handling into one mechanism would be nice.
 1.61.4.8 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.61.4.7 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.61.4.6 28-Feb-2002  nathanw Catch up to -current.
 1.61.4.5 17-Dec-2001  nathanw cpu_upcall() -> sa_upcall_userret().
 1.61.4.4 25-Nov-2001  scw Deal with `want_resched' with trap()'s T_ASTFLT case where it belongs
instead of in userret().
 1.61.4.3 17-Nov-2001  scw Re-sync with current MI SA code.
 1.61.4.2 17-Nov-2001  scw Kernel support for Scheduler Activations on m68k-based ports using
mvme68k as a testbed.

Boots multi-user on an mvme162, although userland support for SA is not
yet integrated/tested.
 1.61.4.1 10-Sep-2001  scw file trap.c was added on branch nathanw_sa on 2001-11-17 13:07:57 +0000
 1.62.12.1 18-Dec-2002  gmcgarry Merge pcred and ucred, and poolify. TBD: check backward compatibility
and factor-out some higher-level functionality.
 1.65.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.65.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.65.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.65.2.2 03-Sep-2004  skrll Sync with HEAD
 1.65.2.1 03-Aug-2004  skrll Sync with HEAD
 1.77.2.6 21-Jan-2008  yamt sync with head
 1.77.2.5 15-Nov-2007  yamt sync with head.
 1.77.2.4 03-Sep-2007  yamt sync with head.
 1.77.2.3 26-Feb-2007  yamt sync with head.
 1.77.2.2 30-Dec-2006  yamt sync with head.
 1.77.2.1 21-Jun-2006  yamt sync with head.
 1.79.6.2 01-Jun-2006  kardel Sync with head.
 1.79.6.1 22-Apr-2006  simonb Sync with head.
 1.79.4.1 09-Sep-2006  rpaulo sync with head
 1.79.2.1 01-Mar-2006  yamt sync with head.
 1.80.4.2 19-Apr-2006  elad sync with head - hopefully this will work
 1.80.4.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.80.2.3 11-Aug-2006  yamt sync with head
 1.80.2.2 24-May-2006  yamt sync with head.
 1.80.2.1 01-Apr-2006  yamt sync with head.
 1.81.2.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.85.10.2 23-Sep-2007  wrstuden Sync with somewhat-recent netbsd-4.
 1.85.10.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.85.8.2 11-Sep-2007  msaitoh Pull up following revision(s) (requested by mhitch in ticket #866):
sys/arch/atari/atari/trap.c: 1.92
sys/arch/mac68k/mac68k/trap.c: 1.129
sys/arch/amiga/amiga/trap.c: 1.116
sys/arch/mvme68k/mvme68k/trap.c: 1.91
sys/arch/news68k/news68k/trap.c: 1.54
sys/arch/sun3/sun3/trap.c: 1.131
sys/arch/next68k/next68k/trap.c: 1.68
sys/arch/luna68k/luna68k/trap.c: 1.47
sys/arch/cesfic/cesfic/trap.c: 1.36
sys/arch/x68k/x68k/trap.c: 1.90
sys/arch/hp300/hp300/trap.c: 1.132
68030 and 68040 processors consider the read portion of a read-modify-write
transfer as a write to ensure the memory is writable before starting any
transfer. The fault status information does not reflect this in the 'read'
status bit (i.e. it shows up as a read access), so faults with a RMW access
to non-writable memory was not getting the correct protection. The page would
be read-only and the instruction would fault over and over.
A specific example is when a process forks, and the child process attempts
to execute a RMW access to a data page, which is read-only because it's CoP
Copy-On-Write.
When checking if the page needs to be writablek, also check the locked transfer
and treat any locked transfer as a write.
68060 already handled this correctly, since it has separate read and write
fault bits, and both are set on a RMW access and the trap code was checking
the write status bit.
Fixes PR#36848.
 1.85.8.1 18-Jun-2007  liamjfoy Pull up following revision(s) (requested by mhitch in ticket #728):
sys/arch/mvme68k/mvme68k/locore.s: revision 1.98
sys/arch/mac68k/mac68k/trap.c: revision 1.128
sys/arch/next68k/next68k/locore.s: revision 1.48
sys/arch/mac68k/mac68k/locore.s: revision 1.152
sys/arch/sun3/sun3/locore.s: revision 1.88
sys/arch/sun2/sun2/locore.s: revision 1.19
sys/arch/sun2/sun2/trap.c: revision 1.32
sys/arch/m68k/m68k/db_trace.c: revision 1.51
sys/arch/mvme68k/mvme68k/trap.c: revision 1.90
sys/arch/news68k/news68k/trap.c: revision 1.53
sys/arch/luna68k/luna68k/locore.s: revision 1.27
sys/arch/atari/atari/locore.s: revision 1.99
sys/arch/sun3/sun3/trap.c: revision 1.130
sys/arch/x68k/x68k/trap.c: revision 1.89
sys/arch/next68k/next68k/trap.c: revision 1.67
sys/arch/x68k/x68k/locore.s: revision 1.79
sys/arch/news68k/news68k/locore.s: revision 1.43
sys/arch/luna68k/luna68k/trap.c: revision 1.46
sys/arch/hp300/hp300/locore.s: revision 1.140
sys/arch/cesfic/cesfic/locore.s: revision 1.15
sys/arch/cesfic/cesfic/trap.c: revision 1.35
sys/arch/m68k/m68k/trap_subr.s: revision 1.12
sys/arch/amiga/amiga/locore.s: revision 1.143
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.85.4.2 06-Feb-2007  ad Update m68k pasteware.
 1.85.4.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.86.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.88.10.3 03-Oct-2007  garbled Sync with HEAD
 1.88.10.2 26-Jun-2007  garbled Sync with HEAD.
 1.88.10.1 22-May-2007  matt Update to HEAD.
 1.88.4.1 11-Jul-2007  mjf Sync with head.
 1.88.2.4 03-Dec-2007  ad Sync with HEAD.
 1.88.2.3 09-Oct-2007  ad Sync with head.
 1.88.2.2 15-Jul-2007  ad Sync with head.
 1.88.2.1 27-May-2007  ad Sync with head.
 1.90.10.3 23-Mar-2008  matt sync with HEAD
 1.90.10.2 09-Jan-2008  matt sync with HEAD
 1.90.10.1 06-Nov-2007  matt sync with HEAD
 1.90.8.2 06-Nov-2007  joerg Sync with HEAD.
 1.90.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.90.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.91.4.1 13-Nov-2007  bouyer Sync with HEAD
 1.93.8.2 19-Jan-2008  bouyer Sync with HEAD
 1.93.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.93.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.95.8.1 18-May-2008  yamt sync with head.
 1.95.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.95.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.96.8.1 19-Oct-2008  haad Sync with HEAD.
 1.96.4.4 30-Jun-2008  wrstuden Change how we make SA threads not generate upcalls. Instead of clearing
LW_SA, use a private flag, LP_SA_NOBLOCK, that we set when we want
to not generate upcalls. This means we do NOT need to lock (l)
(ourselves) to set it.

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

Introduce code pattern to set & remember this:

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

...

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

l->l_pflag ^= f;

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

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

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

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

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

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

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

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

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

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

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

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.96.2.3 11-Aug-2010  yamt sync with head.
 1.96.2.2 11-Mar-2010  yamt sync with head
 1.96.2.1 04-May-2009  yamt sync with head.
 1.97.4.1 02-Feb-2009  snj Pull up following revision(s) (requested by martin in ticket #332):
sys/arch/amiga/amiga/trap.c: revision 1.122
sys/arch/atari/atari/trap.c: revision 1.99
sys/arch/cesfic/cesfic/trap.c: revision 1.43
sys/arch/hp300/hp300/trap.c: revision 1.140
sys/arch/luna68k/luna68k/trap.c: revision 1.55
sys/arch/m68k/include/signal.h: revision 1.25
sys/arch/m68k/m68k/sig_machdep.c: revision 1.41
sys/arch/mac68k/mac68k/trap.c: revision 1.136 via patch
sys/arch/mvme68k/mvme68k/trap.c: revision 1.98
sys/arch/news68k/news68k/trap.c: revision 1.60
sys/arch/next68k/next68k/trap.c: revision 1.75
sys/arch/sun2/sun2/trap.c: revision 1.37
sys/arch/sun3/sun3/trap.c: revision 1.136
sys/arch/x68k/x68k/trap.c: revision 1.97
Centralize fpu exception to siginfo code encoding for all m68k archs,
fixes a failure in the lib/libc/ieeefp/except regression test.
 1.97.2.1 03-Mar-2009  skrll Sync with HEAD.
 1.99.4.3 05-Mar-2011  rmind sync with head
 1.99.4.2 03-Jul-2010  rmind sync with head
 1.99.4.1 30-May-2010  rmind sync with head
 1.99.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.99.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.103.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.104.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.105.8.1 24-Feb-2012  mrg sync to -current.
 1.105.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.105.4.1 17-Apr-2012  yamt sync with head
 1.106.4.1 18-May-2014  rmind sync with head
 1.106.2.2 03-Dec-2017  jdolecek update from HEAD
 1.106.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.107.6.1 06-Apr-2015  skrll Sync with HEAD
 1.108.18.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.108.18.1 10-Jun-2019  christos Sync with HEAD
 1.12 13-Jan-2024  thorpej Switch mvme68k to the common m68k vector table.
 1.11 11-Dec-2005  christos merge ktrace-lwp.
 1.10 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.9 31-May-2001  scw branches: 1.9.8; 1.9.24;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.8 14-Feb-1999  scw branches: 1.8.22;
Merge support for mvme167 into main tree.
 1.7 18-Oct-1998  itohy branches: 1.7.6;
Remove unwanted reference to "_trap1" if !defined(COMPAT_13).
 1.6 04-Oct-1998  thorpej Sigh, we are going to have to burn a vector for Just Sigreturn again,
for now, until we have a more generic {get,set}context(). Update the
comment for trap #3 accordingly.
 1.5 30-Sep-1998  thorpej If !COMPAT_13, make trap #1 produce an illegal instruction. Fix the comment
for trap #2 to reflect that it's the trace trap.
 1.4 30-Sep-1998  thorpej Note that trap #1 is compat_13_sigreturn, and give trap #3 to syscalls
which require special handling, e.g. sigreturn on m68k.

This differs from the old sigreturn trap in that we require the syscall
number to be in register d0, just like the regular syscall entry point.
This will allow sigreturn to be versioned in the future without the need
to allocate another trap vector.
 1.3 09-May-1996  chuck shift code a bit to move "start" to the front of .text [using openbsd ordering]
 1.2 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.7.6.1 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.8.22.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.24.1 03-Aug-2004  skrll Sync with HEAD
 1.9.8.2 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.9.8.1 31-May-2001  scw file vectors.s was added on branch nathanw_sa on 2001-05-31 18:46:11 +0000
 1.44 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.43 04-Mar-2002  simonb Don't need to declare phys_map - it is declared in <uvm/uvm_extern.h>.
 1.42 10-Sep-2001  chris branches: 1.42.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.41 19-Aug-2001  chs branches: 1.41.2;
add missing pmap_update().
 1.40 19-Aug-2001  chs use pmap_k* in vmapbuf() and vunmapbuf() since there's no VAC on this platform.

in vunmapbuf(), call pmap_*remove() explicitly since uvm_km_free_wakeup()
will soon no longer do it for us.
 1.39 02-Jun-2001  chs branches: 1.39.2;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.38 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.37 11-Jan-2001  scw branches: 1.37.2;
g/c the HP/UX core-dump code; it references a function which no longer exists.
 1.36 25-Nov-2000  scw G/C some long-obsolete functions.
 1.35 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.34 09-Sep-2000  scw Partially back-out the previous change. What was I thinking...
 1.33 27-Jul-2000  scw G/C MDP_HPUXTRACE since it is never set anywhere, so we don't actually
support HP-UX processes doing the tracing.
 1.32 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.31 26-Jun-2000  mrg remove/move more mach vm header files:

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

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

This fixes a race condition on multiprocessor systems; a CPU could
grab the newly created processes (which has been placed on a run queue)
before cpu_set_kpc() would be performed.
 1.29 18-Mar-2000  scw branches: 1.29.2;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.28 20-Jan-2000  sommerfeld branches: 1.28.2;
Fix PR9240: comment above cpu_fork() out of synch with reality on most ports.
(comment change only, but was wrong for more than just i386).
 1.27 04-Dec-1999  ragge CL* discarding.
 1.26 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.25 08-Jul-1999  thorpej branches: 1.25.2; 1.25.4; 1.25.8;
Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.24 26-May-1999  thorpej Generally update the comment above vunmapbuf().
 1.23 26-May-1999  thorpej Generally update the comment above the vmapbuf() implementations.
 1.22 14-May-1999  nisimura - Adjust descriptive comment of cpu_fork() which returns nothing and
returns once.
- Minor fixes in mips/vm_machdep.c.
 1.21 13-May-1999  thorpej Allow the caller to specify a stack for the child process. If NULL,
the child inherits the stack pointer from the parent (traditional
behavior). Like the signal stack, the stack area is secified as
a low address and a size; machine-dependent code accounts for stack
direction.

This is required for clone(2).
 1.20 26-Mar-1999  mycroft branches: 1.20.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.19 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.18 11-Nov-1998  thorpej Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.17 09-Sep-1998  thorpej In cpu_coredump(), use MID_MACHINE rather than MID_* (whatever it expands
to).
 1.16 09-Sep-1998  thorpej Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).
 1.15 22-Aug-1998  scw vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.14 16-Aug-1998  scw Switch to using the common m68k stuff for a couple of things:

. cache control functions <m68k/cacheops.h>
. sigreturn code <m68k/m68k/sigreturn.s>

Also a few of other things found while scouting around for vm_offset_t
changes.
 1.13 28-Jul-1998  thorpej Don't cast the null residual pointer passed to vn_rdwr().
 1.12 25-Jun-1998  thorpej defopt COMPAT_HPUX
 1.11 21-Feb-1998  scw Implement changes for MACHINE_NEW_NONCONTIG and UVM.
 1.10 06-Jan-1998  thorpej Garbage-collect PMAP_ACTIVATE() call here; it's no longer necessary.
 1.9 11-Oct-1997  scottr Address PR 4120 by synchronizing v{,un}mapbuf() with the i386 vm_machdep.c,
v 1.27, pulling in changes made there by Charles Hannum. Also, incorporate
a few tweaks made by Gordon W. Ross in the sun3 version of this change.
 1.8 19-May-1997  veego branches: 1.8.4;
Fix lossage from the latest vm_pmap changes.
 1.7 02-Feb-1997  thorpej Garbage-collect extra copy of mappedcopy.
 1.6 26-Apr-1996  chuck "jumbo patch":
- new autoconfig scheme+vme (autoconf.c,clock.c,clockreg.h,
clockvar.h,vm_machdep.c)
- new interrupt scheme (isr.c,isr.h,locore.s,machdep.c,vectors.s)
- switch to MI zs driver (conf.c)
- new disklabel code, from Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
(disksubr.c, compatable with theo and dale's openbsd version)
- new delay() based on sun3 port, using dynamic configuration from
the sparc port (intergrated by me), calibration moved to startup
by jason. (locore.s,machdep.c)
- clean up: nuke eio space (genassym.c,locore.s,pmap.c,pmap_bootstrap.c),
nuke STACKCHECK (locore.s), prevent maxuser overflow (pmap.c),

Contributed by Jason R. Thorpe <thorpej@og.org> (thanks!)
 1.5 03-Apr-1996  chuck change vunmapbuf to void function to match MI code
 1.4 05-Feb-1996  christos vm prototype changes
 1.3 09-Dec-1995  mycroft cpu_fork() now returns void.
 1.2 10-Aug-1995  chuck sync with hp300 version (cpu_coredump changes)
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.8.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.20.4.2 02-Aug-1999  thorpej Update from trunk.
 1.20.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.25.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.25.4.1 15-Nov-1999  fvdl Sync with -current
 1.25.2.4 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.25.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.25.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.25.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.28.2.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.29.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.37.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.39.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.39.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.39.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.41.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.42.4.7 11-Nov-2002  nathanw Catch up to -current
 1.42.4.6 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.42.4.5 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.42.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.42.4.3 08-Dec-2001  thorpej cpu_fork() -> cpu_lwp_fork(). This logically forks an LWP, not a
complete process. As noted by Gregory McGarry on tech-kern.
 1.42.4.2 17-Nov-2001  scw Kernel support for Scheduler Activations on m68k-based ports using
mvme68k as a testbed.

Boots multi-user on an mvme162, although userland support for SA is not
yet integrated/tested.
 1.42.4.1 10-Sep-2001  scw file vm_machdep.c was added on branch nathanw_sa on 2001-11-17 13:07:57 +0000
 1.7 06-May-2021  rin PR port-mvme68k/56146

Build wrtvid as tools.
 1.6 19-Jan-2009  he branches: 1.6.82;
Remove parens around target in .ifmake -- new make doesn't like it.
 1.5 28-May-2002  bjh21 branches: 1.5.112; 1.5.120;
.WAIT after building libbug and libsa, and before building anything that uses
them.
 1.4 19-Jul-2001  scw branches: 1.4.6; 1.4.14;
Descend into wrtvid in all but the install pass.
 1.3 24-Jul-2000  jdolecek branches: 1.3.4;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2 17-May-1996  chuck branches: 1.2.4; 1.2.32;
update for new boot stuff
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 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.4.1 29-May-1996  chuck remove sboot for now
 1.3.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.4.1 03-Aug-2001  lukem update to -current
 1.4.14.1 30-May-2002  gehenna Catch up with -current.
 1.4.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.4.6.1 19-Jul-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-06-20 03:40:02 +0000
 1.5.120.1 03-Mar-2009  skrll Sync with HEAD.
 1.5.112.1 04-May-2009  yamt sync with head.
 1.6.82.1 13-May-2021  thorpej Sync with HEAD.
 1.28 06-May-2021  rin PR port-mvme68k/56146

Build wrtvid as tools.
 1.27 15-Apr-2021  mrg branches: 1.27.2;
more -fcommon for boot programs.
 1.26 08-Apr-2017  christos branches: 1.26.28;
centralize vers.c building for standalone programs.
 1.25 12-Jan-2014  tsutsui branches: 1.25.6; 1.25.10; 1.25.14;
Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

XXX: probabry we should have bsd.saprog.mk or something.
 1.24 21-Sep-2013  tsutsui Explicitly link SRT0.o (Standalone RunTime startup code) first.

This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.

The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.

Should be pulled up to netbsd-6 branches.
 1.23 12-Aug-2013  joerg Build boot loaders without unwind tables.
 1.22 22-Jan-2011  joerg branches: 1.22.4; 1.22.10; 1.22.14; 1.22.16; 1.22.18; 1.22.24;
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.21 02-Jan-2011  tsutsui branches: 1.21.2; 1.21.4;
Switch mvme68k standalone problams to using MI libsa and libkern
for maintainablility. Also bump version for note.

Compile test only, but no functional changes.
 1.20 24-Dec-2009  tsutsui branches: 1.20.4;
Use <bsd.klinks.mk> to create machine and ${MACHINE_CPU} symlinks.
 1.19 06-Dec-2009  tsutsui Create machine and ${MACHINE_CPU} symlinks properly and
remove unnecessary dependencies so that parallel build works.
 1.18 11-Apr-2009  scw Fix for install/40961: The RAMDISK kernel has grown significantly
since bootst was written. Grab 3MB of the kernel image from tape
in hackprom_diskrd() instead of 2MB.

Bump bootst version on account of the above fix.

While here, use -Os instead of -O2 to compile mvme68k stand code.
 1.17 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.16 12-Jan-2009  tsutsui branches: 1.16.2;
Make sure machine and ${MACHINE_ARCH} symlinks are always created.
 1.15 12-Jan-2009  tsutsui Add some make variables to suppress errors on build without DESTDIR.
 1.14 24-Dec-2005  tsutsui branches: 1.14.24; 1.14.68; 1.14.74; 1.14.78; 1.14.86; 1.14.88;
Move some definitions from CFLAGS to CPPFLAGS so that SRT0.S can
include <m68k/asm.h> properly.
 1.13 11-Dec-2005  christos merge ktrace-lwp.
 1.12 26-Oct-2003  lukem branches: 1.12.16;
Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
 1.11 24-Oct-2003  scw Add -ffreestanding
 1.10 27-Feb-2003  scw branches: 1.10.2;
Move the -D__daddr_t from libsa/Makefile to Makefile.booters so
the bootloaders get to benefit from it, not just libsa.
 1.9 28-May-2002  bjh21 Use ${PRINTOBJDIR} rather that rolling our own.
This prevents parallel builds passing "--- xxx ---" (which make prints to
indicate it's building target "xxx") to ld.
 1.8 12-Dec-2001  tv branches: 1.8.8;
MKfoo=no -> NOfoo
 1.7 19-Jul-2001  scw branches: 1.7.6;
Descend into wrtvid in all but the install pass.
 1.6 07-Dec-2000  scw branches: 1.6.4;
Missed this one in yesterday's bootloader commits:
Change BUGCRT from bugcrt.o to bugstart.o.
 1.5 04-Dec-2000  scw Clean up the build process to ensure libsa/libbug are built
before linking the bootloaders.
 1.4 30-Nov-2000  scw Support booting an ELF kernel, plus numerous tweaks due to
the gas.new/ELF transition.
 1.3 20-Nov-2000  scw branches: 1.3.2;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.2 28-Jul-2000  scw Really make this work for `dependall'. Also strip bootst.bug before
running it through wrtvid.
 1.1 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.3.2.5 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.3.2.4 08-Dec-2000  bouyer Sync with HEAD.
 1.3.2.3 22-Nov-2000  bouyer Sync with HEAD.
 1.3.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.2.1 20-Nov-2000  bouyer file Makefile.booters was added on branch thorpej_scsipi on 2000-11-20 20:15:27 +0000
 1.6.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.4.1 03-Aug-2001  lukem update to -current
 1.7.6.3 20-Jun-2002  nathanw Catch up to -current.
 1.7.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.7.6.1 19-Jul-2001  nathanw file Makefile.booters was added on branch nathanw_sa on 2002-01-08 00:26:36 +0000
 1.8.8.1 30-May-2002  gehenna Catch up with -current.
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.16.1 21-Jun-2006  yamt sync with head.
 1.14.88.1 12-Apr-2009  snj Pull up following revision(s) (requested by scw in ticket #688):
sys/arch/mvme68k/stand/Makefile.booters: revision 1.18
sys/arch/mvme68k/stand/bootst/dev_tape.c: revision 1.11
sys/arch/mvme68k/stand/bootst/version: revision 1.5
Fix for install/40961: The RAMDISK kernel has grown significantly
since bootst was written. Grab 3MB of the kernel image from tape
in hackprom_diskrd() instead of 2MB.
Bump bootst version on account of the above fix.
While here, use -Os instead of -O2 to compile mvme68k stand code.
 1.14.86.2 28-Apr-2009  skrll Sync with HEAD.
 1.14.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.14.78.2 11-Mar-2010  yamt sync with head
 1.14.78.1 04-May-2009  yamt sync with head.
 1.14.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.14.68.1 15-Apr-2009  snj Pull up following revision(s) (requested by scw in ticket #1304):
sys/arch/mvme68k/stand/Makefile.booters: revision 1.18
sys/arch/mvme68k/stand/bootst/dev_tape.c: revision 1.11
sys/arch/mvme68k/stand/bootst/version: revision 1.5
Fix for install/40961: The RAMDISK kernel has grown significantly
since bootst was written. Grab 3MB of the kernel image from tape
in hackprom_diskrd() instead of 2MB.
Bump bootst version on account of the above fix.
While here, use -Os instead of -O2 to compile mvme68k stand code.
 1.14.24.1 15-Apr-2009  snj Pull up following revision(s) (requested by scw in ticket #1304):
sys/arch/mvme68k/stand/Makefile.booters: revision 1.18
sys/arch/mvme68k/stand/bootst/dev_tape.c: revision 1.11
sys/arch/mvme68k/stand/bootst/version: revision 1.5
Fix for install/40961: The RAMDISK kernel has grown significantly
since bootst was written. Grab 3MB of the kernel image from tape
in hackprom_diskrd() instead of 2MB.
Bump bootst version on account of the above fix.
While here, use -Os instead of -O2 to compile mvme68k stand code.
 1.16.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.20.4.1 05-Mar-2011  rmind sync with head
 1.21.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.21.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.22.24.1 23-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.22.18.2 18-May-2014  rmind sync with head
 1.22.18.1 28-Aug-2013  rmind sync with head
 1.22.16.1 26-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.22.14.2 03-Dec-2017  jdolecek update from HEAD
 1.22.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.10.1 23-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.22.4.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25.14.1 21-Apr-2017  bouyer Sync with HEAD
 1.25.10.1 26-Apr-2017  pgoyette Sync with HEAD
 1.25.6.1 28-Aug-2017  skrll Sync with HEAD
 1.26.28.1 17-Apr-2021  thorpej Sync with HEAD.
 1.27.2.1 13-May-2021  thorpej Sync with HEAD.
 1.5 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.4 09-Jul-2000  jdolecek Make buildable on NetBSD/mvme68k 1.4.1.
 1.3 17-May-1996  chuck branches: 1.3.32;
update for new boot stuff
 1.2 12-Apr-1996  chuck sync with sun3 version
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.3.32.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.7 02-Jan-2011  tsutsui Switch mvme68k standalone problams to using MI libsa and libkern
for maintainablility. Also bump version for note.

Compile test only, but no functional changes.
 1.6 04-Dec-2000  scw branches: 1.6.152;
Clean up the build process to ensure libsa/libbug are built
before linking the bootloaders.
 1.5 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.4 25-Jun-2000  scw Some tweaks to make things work properly with `dependall'.
 1.3 12-Jun-1998  cgd branches: 1.3.16; 1.3.28;
replace ${MACHINE} with mvme68k, so that these Makefiles can safely
be run when MACHINE != mvme68k.
 1.2 18-Oct-1996  thorpej Use ${INSTALL}.
 1.1 17-May-1996  chuck bootsd: import from sun3 port, adjust for mvme68k port by me
 1.3.28.1 26-Jun-2000  scw Pullup from trunk: 1.3 - 1.4
Approved by: thorpej

DTRT for `dependall' during a make build. This slipped through the net
due to a local fix which got forgotten about.
 1.3.16.2 08-Dec-2000  bouyer Sync with HEAD.
 1.3.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.6.152.1 05-Mar-2011  rmind sync with head
 1.7 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.6 11-Dec-2005  christos branches: 1.6.50; 1.6.56; 1.6.64;
merge ktrace-lwp.
 1.5 28-Jun-2005  junyoung branches: 1.5.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.4 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.3 24-Jul-2000  jdolecek branches: 1.3.24;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2 24-Jul-2000  scw Pass the boot partition number into the loaded kernel, in preparation
for doing away with __BROKEN_DK_ESTABLISH.
 1.1 17-May-1996  chuck branches: 1.1.32;
bootsd: import from sun3 port, adjust for mvme68k port by me
 1.1.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.3.24.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.24.1 03-Aug-2004  skrll Sync with HEAD
 1.5.2.1 21-Jan-2008  yamt sync with head
 1.6.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.6.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.6.50.1 23-Mar-2008  matt sync with HEAD
 1.5 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.4 11-Dec-2005  christos branches: 1.4.50; 1.4.56; 1.4.64;
merge ktrace-lwp.
 1.3 28-Jun-2005  junyoung branches: 1.3.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.2 23-Jun-2005  junyoung Use FS_OPS() macro.
 1.1 17-May-1996  chuck branches: 1.1.68;
bootsd: import from sun3 port, adjust for mvme68k port by me
 1.1.68.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.1 21-Jan-2008  yamt sync with head
 1.4.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.4.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.50.1 23-Mar-2008  matt sync with HEAD
 1.5 02-Jan-2011  tsutsui Switch mvme68k standalone problams to using MI libsa and libkern
for maintainablility. Also bump version for note.

Compile test only, but no functional changes.
 1.4 09-Nov-2001  scw branches: 1.4.144;
Bump the version numbers of all bootloaders which use loadfile_elfXX() now
that it tries hard to avoid backwards seeks.
 1.3 02-Aug-2001  bjh21 branches: 1.3.4; 1.3.6;
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.2 24-Sep-2000  jdolecek branches: 1.2.2; 1.2.6;
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.1 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.6.1 03-Aug-2001  lukem update to -current
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 24-Sep-2000  bouyer file version was added on branch thorpej_scsipi on 2000-11-20 20:15:27 +0000
 1.3.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.6.1 02-Aug-2001  nathanw file version was added on branch nathanw_sa on 2002-01-08 00:26:36 +0000
 1.3.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.4.144.1 05-Mar-2011  rmind sync with head
 1.2 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.1 17-May-1996  chuck branches: 1.1.32;
bootsd: import from sun3 port, adjust for mvme68k port by me
 1.1.32.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.15 02-Jan-2011  tsutsui Switch mvme68k standalone problams to using MI libsa and libkern
for maintainablility. Also bump version for note.

Compile test only, but no functional changes.
 1.14 09-Feb-2002  lukem branches: 1.14.144;
use ${INSTALL_FILE} as appropriate
 1.13 23-Jan-2002  scw Completely re-write wrtvid.c to make it usable during a cross-build.
Instead of parsing the 1st stage booter in wrtvid, use objcopy to
generate a binary image, leaving wrtvid to create the VID/CFG block.
 1.12 04-Dec-2000  scw branches: 1.12.4; 1.12.8;
Clean up the build process to ensure libsa/libbug are built
before linking the bootloaders.
 1.11 30-Nov-2000  scw Support booting an ELF kernel, plus numerous tweaks due to
the gas.new/ELF transition.
 1.10 28-Jul-2000  scw Really make this work for `dependall'. Also strip bootst.bug before
running it through wrtvid.
 1.9 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.8 09-Jul-2000  jdolecek fix accidentaly dropped dependance on wrtvid
 1.7 09-Jul-2000  jdolecek Make buildable on NetBSD/mvme68k 1.4.1.
 1.6 25-Jun-2000  scw Some tweaks to make things work properly with `dependall'.
 1.5 12-Jun-1998  cgd branches: 1.5.16; 1.5.28;
replace ${MACHINE} with mvme68k, so that these Makefiles can safely
be run when MACHINE != mvme68k.
 1.4 18-Oct-1996  thorpej Use ${INSTALL}.
 1.3 28-May-1996  chuck new bootst (based on sun3 tapeboot)
 1.2 17-May-1996  chuck branches: 1.2.4;
fix comment
 1.1 17-May-1996  chuck bootst: from Dale Rahn.
 1.2.4.1 28-May-1996  chuck fix bootst
 1.5.28.1 26-Jun-2000  scw Pullup from trunk: 1.5 - 1.6
Approved by: thorpej

DTRT for `dependall' during a make build. This slipped through the net
due to a local fix which got forgotten about.
 1.5.16.2 08-Dec-2000  bouyer Sync with HEAD.
 1.5.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 28-Feb-2002  nathanw Catch up to -current.
 1.12.4.2 16-Mar-2002  jdolecek Catch up with -current.
 1.12.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.14.144.1 05-Mar-2011  rmind sync with head
 1.10 11-Jun-2016  dholland gets_s -> kgets.

The exact name isn't that important; but it is important not to use
"gets_s" and thereby allow anyone to falsely get the impression we're
implementing Annex K. We aren't.

ok core.
 1.9 05-Jun-2016  christos use gets_s
 1.8 12-Jan-2008  tsutsui branches: 1.8.54; 1.8.74;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.7 11-Dec-2005  christos branches: 1.7.50; 1.7.56; 1.7.64;
merge ktrace-lwp.
 1.6 28-Jun-2005  junyoung branches: 1.6.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.5 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.4 24-Mar-2002  scw branches: 1.4.10;
Pass RB_NOSYM to exec_mvme() otherwise loadfile() tries to lseek()
backwards, which we don't support.
 1.3 24-Jul-2000  jdolecek branches: 1.3.4; 1.3.8;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2 24-Jul-2000  scw Pass the boot partition number into the loaded kernel, in preparation
for doing away with __BROKEN_DK_ESTABLISH.
 1.1 28-May-1996  chuck branches: 1.1.2; 1.1.32;
fix bootst (sync with sun3 tapeboot)
 1.1.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.1.2.2 28-May-1996  chuck fix bootst (sync with sun3 tapeboot)
 1.1.2.1 28-May-1996  chuck file boot.c was added on branch netbsd-1-2 on 1996-05-28 15:23:54 +0000
 1.3.8.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.4.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.10.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.10.1 03-Aug-2004  skrll Sync with HEAD
 1.6.2.1 21-Jan-2008  yamt sync with head
 1.7.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.7.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.7.50.1 23-Mar-2008  matt sync with HEAD
 1.8.74.1 09-Jul-2016  skrll Sync with HEAD
 1.8.54.1 03-Dec-2017  jdolecek update from HEAD
 1.3 28-May-1996  chuck delete non-working bootst
 1.2 17-May-1996  chuck branches: 1.2.4;
fix comment
 1.1 17-May-1996  chuck bootst: from Dale Rahn.
 1.2.4.1 28-May-1996  chuck no longer needed
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 28-Jun-2005  junyoung #include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.2 23-Jun-2005  junyoung Use FS_OPS() macro.
 1.1 28-May-1996  chuck branches: 1.1.2; 1.1.68;
fix bootst (sync with sun3 tapeboot)
 1.1.68.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.2 28-May-1996  chuck fix bootst (sync with sun3 tapeboot)
 1.1.2.1 28-May-1996  chuck file conf.c was added on branch netbsd-1-2 on 1996-05-28 15:23:55 +0000
 1.13 30-Mar-2014  christos fixes for gcc-4.8 (John D. Baker)
 1.12 17-Jul-2011  joerg branches: 1.12.2; 1.12.12; 1.12.16;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.11 11-Apr-2009  scw Fix for install/40961: The RAMDISK kernel has grown significantly
since bootst was written. Grab 3MB of the kernel image from tape
in hackprom_diskrd() instead of 2MB.

Bump bootst version on account of the above fix.

While here, use -Os instead of -O2 to compile mvme68k stand code.
 1.10 28-Apr-2008  martin branches: 1.10.8; 1.10.10; 1.10.14;
Remove clause 3 and 4 from TNF licenses
 1.9 12-Jan-2008  tsutsui branches: 1.9.6; 1.9.8; 1.9.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.8 04-Mar-2007  christos branches: 1.8.20; 1.8.26; 1.8.32;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.7 11-Dec-2005  christos branches: 1.7.24; 1.7.26; 1.7.34;
merge ktrace-lwp.
 1.6 28-Jun-2005  junyoung branches: 1.6.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.5 07-Jul-2001  scw branches: 1.5.8; 1.5.24;
bcopy -> memcpy
bzero -> memset
bcmp -> memcmp (note that the MI libsa's memcmp() still calls bcmp()...)
 1.4 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.3 05-Sep-1998  pk branches: 1.3.14;
Assign my copyrights to TNF.
 1.2 17-Dec-1997  scw Workaround for bug in 147Bug PROM (my version, 2.2, at least) which
prevents booting from tape in the obvious way.
 1.1 28-May-1996  chuck branches: 1.1.2;
fix bootst (sync with sun3 tapeboot)
 1.1.2.2 28-May-1996  chuck fix bootst (sync with sun3 tapeboot)
 1.1.2.1 28-May-1996  chuck file dev_tape.c was added on branch netbsd-1-2 on 1996-05-28 15:23:56 +0000
 1.3.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.24.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.8.2 07-Jul-2001  scw bcopy -> memcpy
bzero -> memset
bcmp -> memcmp (note that the MI libsa's memcmp() still calls bcmp()...)
 1.5.8.1 07-Jul-2001  scw file dev_tape.c was added on branch nathanw_sa on 2001-07-07 09:06:44 +0000
 1.6.2.2 21-Jan-2008  yamt sync with head
 1.6.2.1 03-Sep-2007  yamt sync with head.
 1.7.34.1 15-Apr-2009  snj Pull up following revision(s) (requested by scw in ticket #1304):
sys/arch/mvme68k/stand/Makefile.booters: revision 1.18
sys/arch/mvme68k/stand/bootst/dev_tape.c: revision 1.11
sys/arch/mvme68k/stand/bootst/version: revision 1.5
Fix for install/40961: The RAMDISK kernel has grown significantly
since bootst was written. Grab 3MB of the kernel image from tape
in hackprom_diskrd() instead of 2MB.
Bump bootst version on account of the above fix.
While here, use -Os instead of -O2 to compile mvme68k stand code.
 1.7.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.7.24.1 15-Apr-2009  snj Pull up following revision(s) (requested by scw in ticket #1304):
sys/arch/mvme68k/stand/Makefile.booters: revision 1.18
sys/arch/mvme68k/stand/bootst/dev_tape.c: revision 1.11
sys/arch/mvme68k/stand/bootst/version: revision 1.5
Fix for install/40961: The RAMDISK kernel has grown significantly
since bootst was written. Grab 3MB of the kernel image from tape
in hackprom_diskrd() instead of 2MB.
Bump bootst version on account of the above fix.
While here, use -Os instead of -O2 to compile mvme68k stand code.
 1.8.32.1 19-Jan-2008  bouyer Sync with HEAD
 1.8.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.8.20.1 23-Mar-2008  matt sync with HEAD
 1.9.10.2 04-May-2009  yamt sync with head.
 1.9.10.1 16-May-2008  yamt sync with head.
 1.9.8.1 18-May-2008  yamt sync with head.
 1.9.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.10.1 12-Apr-2009  snj Pull up following revision(s) (requested by scw in ticket #688):
sys/arch/mvme68k/stand/Makefile.booters: revision 1.18
sys/arch/mvme68k/stand/bootst/dev_tape.c: revision 1.11
sys/arch/mvme68k/stand/bootst/version: revision 1.5
Fix for install/40961: The RAMDISK kernel has grown significantly
since bootst was written. Grab 3MB of the kernel image from tape
in hackprom_diskrd() instead of 2MB.
Bump bootst version on account of the above fix.
While here, use -Os instead of -O2 to compile mvme68k stand code.
 1.10.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.12.16.1 18-May-2014  rmind sync with head
 1.12.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.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.4 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.3 24-Jul-2000  jdolecek branches: 1.3.40; 1.3.102; 1.3.108; 1.3.116;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2 05-Jan-1998  perry branches: 1.2.16;
RCSID Police.
 1.1 28-May-1996  chuck branches: 1.1.2;
fix bootst (sync with sun3 tapeboot)
 1.1.2.2 28-May-1996  chuck fix bootst (sync with sun3 tapeboot)
 1.1.2.1 28-May-1996  chuck file dev_tape.h was added on branch netbsd-1-2 on 1996-05-28 15:24:00 +0000
 1.2.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.3.116.1 19-Jan-2008  bouyer Sync with HEAD
 1.3.108.1 18-Feb-2008  mjf Sync with HEAD.
 1.3.102.1 23-Mar-2008  matt sync with HEAD
 1.3.40.1 21-Jan-2008  yamt sync with head
 1.11 21-Oct-2009  snj Drop 3rd and 4th clauses. Approved by gwr@ (copyright holder).
 1.10 12-Jan-2008  tsutsui branches: 1.10.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.9 20-May-2006  mrg branches: 1.9.36; 1.9.42; 1.9.50;
change some variable types from int to size_t, since that's what libsa
dv_strategy() wants for the 6th argument.
 1.8 25-Jan-2006  christos branches: 1.8.2; 1.8.4; 1.8.6; 1.8.10; 1.8.12;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.7 11-Dec-2005  christos branches: 1.7.2;
merge ktrace-lwp.
 1.6 28-Jun-2005  junyoung branches: 1.6.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.5 24-Aug-2003  he Adapt to const-ification of the first arg of the open function of fs_ops.
 1.4 09-Nov-2001  scw branches: 1.4.16;
G/C some debug printfs inadvertently left in the last commit.
 1.3 09-Nov-2001  scw Implement just enough of an lseek() to keep loadfile_elf32() happy.
While I'm here, bump RAWFS_BSIZE up to 8192 since the installation
instructions use "bs=8k oconv=sync". My Archive Viper now streams
nicely while booting.
 1.2 07-Jul-2001  scw branches: 1.2.2; 1.2.6; 1.2.8;
bcopy -> memcpy
bzero -> memset
bcmp -> memcmp (note that the MI libsa's memcmp() still calls bcmp()...)
 1.1 28-May-1996  chuck branches: 1.1.2;
fix bootst (sync with sun3 tapeboot)
 1.1.2.2 28-May-1996  chuck fix bootst (sync with sun3 tapeboot)
 1.1.2.1 28-May-1996  chuck file rawfs.c was added on branch netbsd-1-2 on 1996-05-28 15:23:57 +0000
 1.2.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.8.1 07-Jul-2001  nathanw file rawfs.c was added on branch nathanw_sa on 2002-01-08 00:26:36 +0000
 1.2.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.16.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.16.1 03-Aug-2004  skrll Sync with HEAD
 1.6.2.2 21-Jan-2008  yamt sync with head
 1.6.2.1 21-Jun-2006  yamt sync with head.
 1.7.2.1 01-Feb-2006  yamt sync with head.
 1.8.12.1 19-Jun-2006  chap Sync with head.
 1.8.10.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.8.6.1 24-May-2006  yamt sync with head.
 1.8.4.1 01-Jun-2006  kardel Sync with head.
 1.8.2.1 09-Sep-2006  rpaulo sync with head
 1.9.50.1 19-Jan-2008  bouyer Sync with HEAD
 1.9.42.1 18-Feb-2008  mjf Sync with HEAD.
 1.9.36.1 23-Mar-2008  matt sync with HEAD
 1.10.10.1 11-Mar-2010  yamt sync with head
 1.4 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.3 11-Dec-2005  christos branches: 1.3.50; 1.3.56; 1.3.64;
merge ktrace-lwp.
 1.2 24-Aug-2003  he branches: 1.2.16;
Adapt to const-ification of the first arg of the open function of fs_ops.
 1.1 28-May-1996  chuck branches: 1.1.2; 1.1.68;
fix bootst (sync with sun3 tapeboot)
 1.1.68.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.68.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.68.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.2 28-May-1996  chuck fix bootst (sync with sun3 tapeboot)
 1.1.2.1 28-May-1996  chuck file rawfs.h was added on branch netbsd-1-2 on 1996-05-28 15:24:01 +0000
 1.2.16.1 21-Jan-2008  yamt sync with head
 1.3.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.3.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.3.50.1 23-Mar-2008  matt sync with HEAD
 1.6 02-Jan-2011  tsutsui Switch mvme68k standalone problams to using MI libsa and libkern
for maintainablility. Also bump version for note.

Compile test only, but no functional changes.
 1.5 11-Apr-2009  scw branches: 1.5.4;
Fix for install/40961: The RAMDISK kernel has grown significantly
since bootst was written. Grab 3MB of the kernel image from tape
in hackprom_diskrd() instead of 2MB.

Bump bootst version on account of the above fix.

While here, use -Os instead of -O2 to compile mvme68k stand code.
 1.4 09-Nov-2001  scw branches: 1.4.68; 1.4.112; 1.4.122; 1.4.130; 1.4.132; 1.4.136;
Bump the version numbers of all bootloaders which use loadfile_elfXX() now
that it tries hard to avoid backwards seeks.
 1.3 02-Aug-2001  bjh21 branches: 1.3.4; 1.3.6;
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.2 24-Sep-2000  jdolecek branches: 1.2.2; 1.2.6;
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.1 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.6.1 03-Aug-2001  lukem update to -current
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 24-Sep-2000  bouyer file version was added on branch thorpej_scsipi on 2000-11-20 20:15:27 +0000
 1.3.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.6.1 02-Aug-2001  nathanw file version was added on branch nathanw_sa on 2002-01-08 00:26:37 +0000
 1.3.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.4.136.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.132.1 12-Apr-2009  snj Pull up following revision(s) (requested by scw in ticket #688):
sys/arch/mvme68k/stand/Makefile.booters: revision 1.18
sys/arch/mvme68k/stand/bootst/dev_tape.c: revision 1.11
sys/arch/mvme68k/stand/bootst/version: revision 1.5
Fix for install/40961: The RAMDISK kernel has grown significantly
since bootst was written. Grab 3MB of the kernel image from tape
in hackprom_diskrd() instead of 2MB.
Bump bootst version on account of the above fix.
While here, use -Os instead of -O2 to compile mvme68k stand code.
 1.4.130.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.122.1 04-May-2009  yamt sync with head.
 1.4.112.1 15-Apr-2009  snj Pull up following revision(s) (requested by scw in ticket #1304):
sys/arch/mvme68k/stand/Makefile.booters: revision 1.18
sys/arch/mvme68k/stand/bootst/dev_tape.c: revision 1.11
sys/arch/mvme68k/stand/bootst/version: revision 1.5
Fix for install/40961: The RAMDISK kernel has grown significantly
since bootst was written. Grab 3MB of the kernel image from tape
in hackprom_diskrd() instead of 2MB.
Bump bootst version on account of the above fix.
While here, use -Os instead of -O2 to compile mvme68k stand code.
 1.4.68.1 15-Apr-2009  snj Pull up following revision(s) (requested by scw in ticket #1304):
sys/arch/mvme68k/stand/Makefile.booters: revision 1.18
sys/arch/mvme68k/stand/bootst/dev_tape.c: revision 1.11
sys/arch/mvme68k/stand/bootst/version: revision 1.5
Fix for install/40961: The RAMDISK kernel has grown significantly
since bootst was written. Grab 3MB of the kernel image from tape
in hackprom_diskrd() instead of 2MB.
Bump bootst version on account of the above fix.
While here, use -Os instead of -O2 to compile mvme68k stand code.
 1.5.4.1 05-Mar-2011  rmind sync with head
 1.3 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2 05-Jan-1998  perry branches: 1.2.16;
RCSID Police.
 1.1 28-May-1996  chuck branches: 1.1.2;
fix bootst (sync with sun3 tapeboot)
 1.1.2.2 28-May-1996  chuck fix bootst (sync with sun3 tapeboot)
 1.1.2.1 28-May-1996  chuck file version.c was added on branch netbsd-1-2 on 1996-05-28 15:23:59 +0000
 1.2.16.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.10 21-Jan-2011  joerg Switch remaining platforms to modern CPP for assembler.
 1.9 02-Jan-2011  tsutsui branches: 1.9.2; 1.9.4;
Switch mvme68k standalone problams to using MI libsa and libkern
for maintainablility. Also bump version for note.

Compile test only, but no functional changes.
 1.8 05-Dec-2000  scw branches: 1.8.152;
bootxx doesn't need the code relocating stub linked in.
 1.7 04-Dec-2000  scw Clean up the build process to ensure libsa/libbug are built
before linking the bootloaders.
 1.6 04-Dec-2000  scw Add support for ELF boot blocks.
 1.5 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.4 25-Jun-2000  scw Some tweaks to make things work properly with `dependall'.
 1.3 12-Jun-1998  cgd branches: 1.3.16; 1.3.28;
replace ${MACHINE} with mvme68k, so that these Makefiles can safely
be run when MACHINE != mvme68k.
 1.2 18-Oct-1996  thorpej Use ${INSTALL}.
 1.1 17-May-1996  chuck bootxx: import from sun3 port, adapt to mvme68k by me.
 1.3.28.1 26-Jun-2000  scw Pullup from trunk: 1.3 - 1.4
Approved by: thorpej

DTRT for `dependall' during a make build. This slipped through the net
due to a local fix which got forgotten about.
 1.3.16.2 08-Dec-2000  bouyer Sync with HEAD.
 1.3.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.8.152.1 05-Mar-2011  rmind sync with head
 1.9.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.9.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1 04-Dec-2000  scw branches: 1.1.2;
Add support for ELF boot blocks.
 1.1.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.1.2.1 04-Dec-2000  bouyer file block_x.S was added on branch thorpej_scsipi on 2000-12-08 09:28:41 +0000
 1.16 22-Aug-2009  he This one needs <sys/exec_aout.h>, so include it explicitly.
 1.15 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.14 12-Jan-2008  tsutsui branches: 1.14.6; 1.14.8; 1.14.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.13 20-May-2006  mrg branches: 1.13.36; 1.13.42; 1.13.50;
change some variable types from int to size_t, since that's what libsa
dv_strategy() wants for the 6th argument.
 1.12 11-Dec-2005  christos branches: 1.12.4; 1.12.6; 1.12.8; 1.12.12; 1.12.14;
merge ktrace-lwp.
 1.11 28-Jun-2005  junyoung branches: 1.11.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.10 28-Jun-2005  junyoung ANSI, KNF, drop trailing spaces, and etc.
 1.9 24-Jan-2003  fvdl branches: 1.9.2;
Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
 1.8 05-May-2002  jdolecek remove redundant (and wrong) main() prototype
 1.7 04-May-2002  scw Make sure main() has a prototype and a return type of "int".
 1.6 04-Dec-2000  scw branches: 1.6.4; 1.6.8;
Add support for ELF boot blocks.
 1.5 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.4 09-Jul-2000  jdolecek backout previous change, this should not have been committed (yet)
 1.3 09-Jul-2000  jdolecek Make buildable on NetBSD/mvme68k 1.4.1.
 1.2 05-Sep-1998  pk branches: 1.2.14;
Assign my copyrights to TNF.
 1.1 17-May-1996  chuck bootxx: import from sun3 port, adapt to mvme68k by me.
 1.2.14.2 08-Dec-2000  bouyer Sync with HEAD.
 1.2.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.8.1 20-Jun-2002  nathanw Catch up to -current.
 1.6.4.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.2.2 21-Jan-2008  yamt sync with head
 1.11.2.1 21-Jun-2006  yamt sync with head.
 1.12.14.1 19-Jun-2006  chap Sync with head.
 1.12.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.12.8.1 24-May-2006  yamt sync with head.
 1.12.6.1 01-Jun-2006  kardel Sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.50.1 19-Jan-2008  bouyer Sync with HEAD
 1.13.42.1 18-Feb-2008  mjf Sync with HEAD.
 1.13.36.1 23-Mar-2008  matt sync with HEAD
 1.14.10.2 16-Sep-2009  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.1 04-Dec-2000  scw branches: 1.1.2;
Add support for ELF boot blocks.
 1.1.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.1.2.1 04-Dec-2000  bouyer file bootxx.h was added on branch thorpej_scsipi on 2000-12-08 09:28:41 +0000
 1.4 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.3 11-Dec-2005  christos branches: 1.3.50; 1.3.56; 1.3.64;
merge ktrace-lwp.
 1.2 28-Jun-2005  junyoung branches: 1.2.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.1 17-May-1996  chuck branches: 1.1.68;
bootxx: import from sun3 port, adapt to mvme68k by me.
 1.1.68.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.2.1 21-Jan-2008  yamt sync with head
 1.3.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.3.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.3.50.1 23-Mar-2008  matt sync with HEAD
 1.3 02-Jan-2011  tsutsui Switch mvme68k standalone problams to using MI libsa and libkern
for maintainablility. Also bump version for note.

Compile test only, but no functional changes.
 1.2 24-Sep-2000  jdolecek branches: 1.2.2; 1.2.154;
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.1 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2.154.1 05-Mar-2011  rmind sync with head
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 24-Sep-2000  bouyer file version was added on branch thorpej_scsipi on 2000-11-20 20:15:29 +0000
 1.2 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.1 17-May-1996  chuck branches: 1.1.32;
bootxx: import from sun3 port, adapt to mvme68k by me.
 1.1.32.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.18 25-Jan-2016  christos uses _KERNTYPES
 1.17 21-Aug-2013  matt branches: 1.17.6;
Use <bsd.klinks.mk>
 1.16 28-Dec-2005  skrll branches: 1.16.112; 1.16.122; 1.16.128;
Don't try and create/cleanup symlinks before objdirs are created.

Doesn't everyone use ro src?
 1.15 11-Dec-2005  christos merge ktrace-lwp.
 1.14 11-May-2005  jmc branches: 1.14.2;
Don't need realdepend/realall depends now that .BEGIN works again
 1.13 04-Feb-2003  matt branches: 1.13.2;
Add CPPFLAGS+=-D__daddr_t=int32_t
Add snprintf.c to libsa/Makefile
 1.12 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.11 12-Dec-2001  lukem branches: 1.11.8;
Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly).
Otherwise the appropriate MKxxx=no won't be defined .
 1.10 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.9 31-Oct-2001  thorpej branches: 1.9.2;
Need byteorder.c for loadfile_elf*.c
 1.8 31-Oct-2001  thorpej Build the loadfile() a.out, ECOFF, and ELF back-ends as separate
objects.
 1.7 05-Aug-2001  scw branches: 1.7.4;
Create the `machine' symlink before building.
 1.6 04-Dec-2000  scw branches: 1.6.4;
Add support for ELF boot blocks.
 1.5 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.4 13-Feb-1999  lukem branches: 1.4.8;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.3 02-Mar-1998  cgd allow LDSTATIC definition to be overridden by bsd.own.mk/mk.conf
 1.2 22-Jun-1997  mrg move man pages into share/man.
 1.1 17-May-1996  chuck installboot: from sun ports
 1.4.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.4.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.4.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.6.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.4.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.7.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.9.2.3 27-Aug-2002  nathanw Catch up to -current.
 1.9.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.9.2.1 31-Oct-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:26:37 +0000
 1.11.8.1 31-Aug-2002  gehenna catch up with -current.
 1.13.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.2.1 21-Jun-2006  yamt sync with head.
 1.16.128.1 28-Aug-2013  rmind sync with head
 1.16.122.2 03-Dec-2017  jdolecek update from HEAD
 1.16.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.112.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.17.6.1 19-Mar-2016  skrll Sync with HEAD
 1.2 22-Jun-1997  mrg move man pages into share/man.
 1.1 17-May-1996  chuck installboot: from sun ports
 1.19 21-Sep-2014  christos remove dead code
 1.18 23-Jun-2013  dholland branches: 1.18.8;
fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB()
dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()

(Christos already did the lfs ones a few days back)
 1.17 19-Jun-2013  dholland Rename ambiguous macros:
MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
INOPB -> FFS_INOPB, LFS_INOPB
INOPF -> FFS_INOPF, LFS_INOPF
blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.
 1.16 22-Jan-2013  dholland Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
ROOTINO -> UFS_ROOTINO
WINO -> UFS_WINO
NXADDR -> UFS_NXADDR
NDADDR -> UFS_NDADDR
NIADDR -> UFS_NIADDR
MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
 1.15 28-Apr-2008  martin branches: 1.15.34; 1.15.44;
Remove clause 3 and 4 from TNF licenses
 1.14 12-Jan-2008  tsutsui branches: 1.14.6; 1.14.8; 1.14.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.13 17-Oct-2007  garbled branches: 1.13.2; 1.13.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.12 17-Jul-2007  christos branches: 1.12.8;
kill MFSNAMELEN
 1.11 11-Dec-2005  christos branches: 1.11.30; 1.11.38; 1.11.42;
merge ktrace-lwp.
 1.10 21-May-2004  he branches: 1.10.12;
Adapt to the statfs -> statvfs changes.
 1.9 07-Apr-2003  he branches: 1.9.2;
Fix this so that it compiles after the UFS2 merge. This program can
still only deal with UFS1 file systems.

Reviewed by scw.
 1.8 24-Jan-2003  fvdl Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
 1.7 09-Dec-2000  scw Bah. Somehow the a.out versions of the bootxx symbols got deleted; put
them back.
 1.6 04-Dec-2000  scw Add support for ELF boot blocks.
 1.5 10-Jul-2000  jdolecek make compilable with -Wall -Werror
 1.4 05-Sep-1998  pk branches: 1.4.14;
Assign my copyrights to TNF.
 1.3 17-Dec-1997  scw Always write primary bootstrap code to raw partition, even when the
secondary bootstrap is on partition >= b.
 1.2 01-Nov-1997  lukem getopt returns -1 not EOF
 1.1 17-May-1996  chuck installboot: from sun ports
 1.4.14.3 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.4.14.2 08-Dec-2000  bouyer Sync with HEAD.
 1.4.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.9.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.10.12.2 21-Jan-2008  yamt sync with head
 1.10.12.1 03-Sep-2007  yamt sync with head.
 1.11.42.1 07-Aug-2007  matt Sync with HEAD.
 1.11.38.1 03-Oct-2007  garbled Sync with HEAD
 1.11.30.1 20-Aug-2007  ad Sync with HEAD.
 1.12.8.2 23-Mar-2008  matt sync with HEAD
 1.12.8.1 06-Nov-2007  matt sync with HEAD
 1.13.8.1 19-Jan-2008  bouyer Sync with HEAD
 1.13.2.1 18-Feb-2008  mjf 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.44.4 03-Dec-2017  jdolecek update from HEAD
 1.15.44.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.44.2 23-Jun-2013  tls resync from head
 1.15.44.1 25-Feb-2013  tls resync with head
 1.15.34.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15.34.1 23-Jan-2013  yamt sync with head
 1.18.8.1 30-Oct-2014  martin Pull up following revision(s) (requested by maxv in ticket #165):
sys/arch/newsmips/stand/boot/netif_news.c: revision 1.9
sys/arch/mvme68k/stand/installboot/installboot.c: revision 1.19
sys/arch/arm/arm32/pmap.c: revision 1.300
sys/arch/amiga/dev/siop2.c: revision 1.43
sys/arch/amiga/amiga/disksubr.c: revision 1.62
sys/arch/news68k/news68k/bus_space.c: revision 1.13
sys/arch/amiga/dev/siop.c: revision 1.69
sys/arch/x86/x86/x86_autoconf.c: revision 1.72
Remove dead code in various places under arch/.
 1.18 21-Nov-2014  christos We don't need a special rule now that the file is called .S (having a
just .o rule before broke the MKDEBUG build).
 1.17 21-Nov-2014  christos rename to bugstart.S
 1.16 21-Jan-2011  joerg branches: 1.16.14;
Switch remaining platforms to modern CPP for assembler.
 1.15 06-Dec-2009  tsutsui branches: 1.15.4; 1.15.6; 1.15.8;
Put asm objects into OBJS, not dependencies for all target.
 1.14 12-Dec-2001  tv branches: 1.14.122;
MKfoo=no -> NOfoo
 1.13 14-Nov-2001  tv Work around <bsd.lib.mk> used for kernel libs in other places. Clean up
include paths.
 1.12 05-Dec-2000  scw branches: 1.12.4; 1.12.8;
Replace the startup C code with assembler, which avoids having to
explicitly tell the compiler what registers the Bug args come in on.
 1.11 04-Dec-2000  scw Use -fomit-frame-pointer when compiling bugcrt.c; a6 needs to be reserved
for Bug arguments.
 1.10 28-Jul-2000  scw Really make this work for `dependall'. Also strip bootst.bug before
running it through wrtvid.
 1.9 27-Jul-2000  scw Make these work for the `dependall' target.
 1.8 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.7 13-Feb-1999  lukem branches: 1.7.8;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.6 01-Aug-1998  scw Changes to keep lint happy.
In particular, fix some Makefiles so the include
paths are passed to lint.
 1.5 31-May-1997  cjs Back out BUILDDIR and NOINSTALL changes.
 1.4 30-May-1997  cjs Remove empty libinstall target and add NOINSTALL=1.
 1.3 07-May-1997  mycroft Use libinstall::, not install:, to prevent instaling LIB.
 1.2 17-May-1996  chuck update for libbug.h, console I/O
 1.1 17-May-1996  chuck libbug from Dale Rahn. Revisions by Theo de Raadt and myself.
 1.7.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.7.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.12.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.12.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.122.1 11-Mar-2010  yamt sync with head
 1.15.8.1 08-Feb-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.16.14.1 03-Dec-2017  jdolecek update from HEAD
 1.5 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.4 12-Jun-1998  cgd branches: 1.4.16;
replace ${MACHINE} with mvme68k, so that these Makefiles can safely
be run when MACHINE != mvme68k.
 1.3 07-May-1997  mycroft Add .MAKE to the .OBJDIR hacks, so they work with `make -n'.
 1.2 17-May-1996  chuck update for libbug.h, console I/O
 1.1 17-May-1996  chuck libbug from Dale Rahn. Revisions by Theo de Raadt and myself.
 1.4.16.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.5 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.4 04-May-2002  scw branches: 1.4.26; 1.4.88; 1.4.94; 1.4.102;
Make sure main() has a prototype and a return type of "int".
 1.3 05-Dec-2000  scw branches: 1.3.4; 1.3.8;
Replace the startup C code with assembler, which avoids having to
explicitly tell the compiler what registers the Bug args come in on.
 1.2 30-Nov-2000  scw Support booting an ELF kernel, plus numerous tweaks due to
the gas.new/ELF transition.
 1.1 24-Jul-2000  jdolecek branches: 1.1.2;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.1.2.3 08-Dec-2000  bouyer Sync with HEAD.
 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 24-Jul-2000  bouyer file bugcrt.c was added on branch thorpej_scsipi on 2000-11-20 20:15:29 +0000
 1.3.8.1 20-Jun-2002  nathanw Catch up to -current.
 1.3.4.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.102.1 19-Jan-2008  bouyer Sync with HEAD
 1.4.94.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.88.1 23-Mar-2008  matt sync with HEAD
 1.4.26.1 21-Jan-2008  yamt sync with head
 1.1 21-Nov-2014  christos branches: 1.1.18;
rename to bugstart.S
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 21-Nov-2014  jdolecek file bugstart.S was added on branch tls-maxphys on 2017-12-03 11:36:30 +0000
 1.3 21-Nov-2014  christos rename to bugstart.S
 1.2 14-Apr-2001  scw branches: 1.2.8; 1.2.174;
Fix bootline argument passing from the Bug PROM.
 1.1 05-Dec-2000  scw branches: 1.1.2; 1.1.4;
Replace the startup C code with assembler, which avoids having to
explicitly tell the compiler what registers the Bug args come in on.
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.1.2.1 05-Dec-2000  bouyer file bugstart.s was added on branch thorpej_scsipi on 2000-12-08 09:28:43 +0000
 1.2.174.1 03-Dec-2017  jdolecek update from HEAD
 1.2.8.2 14-Apr-2001  scw Fix bootline argument passing from the Bug PROM.
 1.2.8.1 14-Apr-2001  scw file bugstart.s was added on branch nathanw_sa on 2001-04-14 13:43:09 +0000
 1.3 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.2 17-May-1996  chuck branches: 1.2.84; 1.2.146; 1.2.152; 1.2.160;
update for libbug.h, console I/O
 1.1 17-May-1996  chuck libbug from Dale Rahn. Revisions by Theo de Raadt and myself.
 1.2.160.1 19-Jan-2008  bouyer Sync with HEAD
 1.2.152.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.146.1 23-Mar-2008  matt sync with HEAD
 1.2.84.1 21-Jan-2008  yamt sync with head
 1.3 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.2 17-May-1996  chuck branches: 1.2.84; 1.2.146; 1.2.152; 1.2.160;
update for libbug.h, console I/O
 1.1 17-May-1996  chuck libbug from Dale Rahn. Revisions by Theo de Raadt and myself.
 1.2.160.1 19-Jan-2008  bouyer Sync with HEAD
 1.2.152.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.146.1 23-Mar-2008  matt sync with HEAD
 1.2.84.1 21-Jan-2008  yamt sync with head
 1.3 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.2 17-May-1996  chuck branches: 1.2.84; 1.2.146; 1.2.152; 1.2.160;
update for libbug.h, console I/O
 1.1 17-May-1996  chuck libbug from Dale Rahn. Revisions by Theo de Raadt and myself.
 1.2.160.1 19-Jan-2008  bouyer Sync with HEAD
 1.2.152.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.146.1 23-Mar-2008  matt sync with HEAD
 1.2.84.1 21-Jan-2008  yamt sync with head
 1.3 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.2 17-May-1996  chuck branches: 1.2.84; 1.2.146; 1.2.152; 1.2.160;
update for libbug.h, console I/O
 1.1 17-May-1996  chuck libbug from Dale Rahn. Revisions by Theo de Raadt and myself.
 1.2.160.1 19-Jan-2008  bouyer Sync with HEAD
 1.2.152.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.146.1 23-Mar-2008  matt sync with HEAD
 1.2.84.1 21-Jan-2008  yamt sync with head
 1.4 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.3 11-Dec-2005  christos branches: 1.3.50; 1.3.56; 1.3.64;
merge ktrace-lwp.
 1.2 28-Jun-2005  junyoung branches: 1.2.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.1 17-May-1996  chuck branches: 1.1.68;
update for libbug.h, console I/O
 1.1.68.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.2.1 21-Jan-2008  yamt sync with head
 1.3.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.3.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.3.50.1 23-Mar-2008  matt sync with HEAD
 1.3 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.2 17-May-1996  chuck branches: 1.2.84; 1.2.146; 1.2.152; 1.2.160;
update for libbug.h, console I/O
 1.1 17-May-1996  chuck libbug from Dale Rahn. Revisions by Theo de Raadt and myself.
 1.2.160.1 19-Jan-2008  bouyer Sync with HEAD
 1.2.152.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.146.1 23-Mar-2008  matt sync with HEAD
 1.2.84.1 21-Jan-2008  yamt sync with head
 1.4 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.3 05-Dec-2000  scw branches: 1.3.40; 1.3.102; 1.3.108; 1.3.116;
Replace the startup C code with assembler, which avoids having to
explicitly tell the compiler what registers the Bug args come in on.
 1.2 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.1 17-May-1996  chuck branches: 1.1.32;
update for libbug.h, console I/O
 1.1.32.2 08-Dec-2000  bouyer Sync with HEAD.
 1.1.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.3.116.1 19-Jan-2008  bouyer Sync with HEAD
 1.3.108.1 18-Feb-2008  mjf Sync with HEAD.
 1.3.102.1 23-Mar-2008  matt sync with HEAD
 1.3.40.1 21-Jan-2008  yamt sync with head
 1.4 23-Sep-2013  tsutsui Make MVMEPROM_ARG2() macro take two args in a single asm statement.

Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.

Should be pulled up to netbsd-6 branches.
 1.3 12-Jan-2008  tsutsui branches: 1.3.44; 1.3.50; 1.3.54; 1.3.56; 1.3.60; 1.3.66;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.2 17-May-1996  chuck branches: 1.2.84; 1.2.146; 1.2.152; 1.2.160;
update for libbug.h, console I/O
 1.1 17-May-1996  chuck libbug from Dale Rahn. Revisions by Theo de Raadt and myself.
 1.2.160.1 19-Jan-2008  bouyer Sync with HEAD
 1.2.152.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.146.1 23-Mar-2008  matt sync with HEAD
 1.2.84.1 21-Jan-2008  yamt sync with head
 1.3.66.1 23-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.3.60.1 18-May-2014  rmind sync with head
 1.3.56.1 26-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.3.54.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.50.1 23-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.3.44.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4 23-Sep-2013  tsutsui Make MVMEPROM_ARG2() macro take two args in a single asm statement.

Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.

Should be pulled up to netbsd-6 branches.
 1.3 12-Jan-2008  tsutsui branches: 1.3.44; 1.3.50; 1.3.54; 1.3.56; 1.3.60; 1.3.66;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.2 17-May-1996  chuck branches: 1.2.84; 1.2.146; 1.2.152; 1.2.160;
update for libbug.h, console I/O
 1.1 17-May-1996  chuck libbug from Dale Rahn. Revisions by Theo de Raadt and myself.
 1.2.160.1 19-Jan-2008  bouyer Sync with HEAD
 1.2.152.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.146.1 23-Mar-2008  matt sync with HEAD
 1.2.84.1 21-Jan-2008  yamt sync with head
 1.3.66.1 23-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.3.60.1 18-May-2014  rmind sync with head
 1.3.56.1 26-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.3.54.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.50.1 23-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.3.44.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.1 17-May-1996  chuck branches: 1.1.84; 1.1.146; 1.1.152; 1.1.160;
update for libbug.h, console I/O
 1.1.160.1 19-Jan-2008  bouyer Sync with HEAD
 1.1.152.1 18-Feb-2008  mjf Sync with HEAD.
 1.1.146.1 23-Mar-2008  matt sync with HEAD
 1.1.84.1 21-Jan-2008  yamt sync with head
 1.3 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.2 17-May-1996  chuck branches: 1.2.84; 1.2.146; 1.2.152; 1.2.160;
update for libbug.h, console I/O
 1.1 17-May-1996  chuck libbug from Dale Rahn. Revisions by Theo de Raadt and myself.
 1.2.160.1 19-Jan-2008  bouyer Sync with HEAD
 1.2.152.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.146.1 23-Mar-2008  matt sync with HEAD
 1.2.84.1 21-Jan-2008  yamt sync with head
 1.3 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.2 17-May-1996  chuck branches: 1.2.84; 1.2.146; 1.2.152; 1.2.160;
update for libbug.h, console I/O
 1.1 17-May-1996  chuck libbug from Dale Rahn. Revisions by Theo de Raadt and myself.
 1.2.160.1 19-Jan-2008  bouyer Sync with HEAD
 1.2.152.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.146.1 23-Mar-2008  matt sync with HEAD
 1.2.84.1 21-Jan-2008  yamt sync with head
 1.34 21-Sep-2013  tsutsui Explicitly link SRT0.o (Standalone RunTime startup code) first.

This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.

The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.

Should be pulled up to netbsd-6 branches.
 1.33 02-Jan-2011  tsutsui branches: 1.33.8; 1.33.14; 1.33.18; 1.33.20; 1.33.22; 1.33.28;
Switch mvme68k standalone problams to using MI libsa and libkern
for maintainablility. Also bump version for note.

Compile test only, but no functional changes.
 1.32 15-Mar-2010  he branches: 1.32.2;
Latest change to loadfile_elf32.c grew a dependency on strncmp,
so provide that as well as part of libsa for this platform.
 1.31 06-Dec-2009  tsutsui branches: 1.31.2;
Put asm objects into OBJS, not dependencies for all target.
 1.30 19-Mar-2009  tsutsui Remove bcmp() from MD libsa.

XXX: These ports should be rewritten to use MI libsa for maintainability.
 1.29 26-Feb-2006  he branches: 1.29.72; 1.29.80; 1.29.86;
Follow up rename of in_cksum.c to ip_cksum.c.
 1.28 27-Dec-2005  he branches: 1.28.2; 1.28.4; 1.28.6;
Make this build again after the libc/libkern consolidation by referring
to common/lib/libc/Makefile.inc via ${S}/..

Add use of ashrdi3.c inet_addr.c strncpy.c strlen.c, from common/lib.
 1.27 24-Dec-2005  tsutsui Adapt to libkern reorganization.
 1.26 11-Dec-2005  christos merge ktrace-lwp.
 1.25 22-Aug-2003  dsl branches: 1.25.16;
Add memmove - needed for symlink processing in ufs.c
 1.24 16-Mar-2003  he branches: 1.24.2;
Add the newly separated-out ether_sprintf.c here, so that the booters
can be allowed to link with no unresolved symbols again.
 1.23 27-Feb-2003  scw Move the -D__daddr_t from libsa/Makefile to Makefile.booters so
the bootloaders get to benefit from it, not just libsa.
 1.22 04-Feb-2003  matt Add CPPFLAGS+=-D__daddr_t=int32_t
Add snprintf.c to libsa/Makefile
 1.21 27-Mar-2002  scw Add files.c to SRC_sa.
While I'm here, sort source files alphabetically.
 1.20 14-Nov-2001  tv Work around <bsd.lib.mk> used for kernel libs in other places. Clean up
include paths.
 1.19 31-Oct-2001  thorpej branches: 1.19.2;
Build the loadfile() a.out, ECOFF, and ELF back-ends as separate
objects.
 1.18 02-Oct-2001  chs branches: 1.18.2;
add ashldi3.c, needed by ufs.c due to added cast in lblktosize().
 1.17 07-Jul-2001  scw branches: 1.17.2; 1.17.4;
bcopy -> memcpy
bzero -> memset
bcmp -> memcmp (note that the MI libsa's memcmp() still calls bcmp()...)
 1.16 10-Jun-2001  scw Use the versions of dev_net.[ch] in libsa in order to get DHCP support.

In other words, mvme68k's "netboot" finally supports DHCP.
 1.15 30-Nov-2000  scw branches: 1.15.2;
Support booting an ELF kernel, plus numerous tweaks due to
the gas.new/ELF transition.
 1.14 11-Nov-2000  scw udp.c is now needed in SRC_sa.
 1.13 28-Jul-2000  scw Really make this work for `dependall'. Also strip bootst.bug before
running it through wrtvid.
 1.12 27-Jul-2000  scw Make these work for the `dependall' target.
 1.11 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.10 19-Sep-1999  scw branches: 1.10.2; 1.10.14;
intoa.c is now required in the standalone library.
 1.9 25-Apr-1999  scw Define MKNOLINT=no and _STANDALONE.
 1.8 20-Feb-1999  scw branches: 1.8.2;
Add some missing targets from sys/lib/libsa.
 1.7 13-Feb-1999  lukem convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.6 01-Aug-1998  scw Changes to keep lint happy.
In particular, fix some Makefiles so the include
paths are passed to lint.
 1.5 31-May-1997  cjs Back out BUILDDIR and NOINSTALL changes.
 1.4 30-May-1997  cjs Remove empty libinstall target and add NOINSTALL=1.
 1.3 07-May-1997  mycroft Use libinstall::, not install:, to prevent instaling LIB.
 1.2 17-May-1996  chuck update for my reorg
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.8.2.1 26-Apr-1999  perry branches: 1.8.2.1.2;
pullup 1.8->1.9 (Steve Woodford)
 1.8.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.10.14.1 09-Feb-2002  he Pull up revision 1.18 (via patch, requested by scw):
Add ashldi3.c to libsa, needed by ufs.c due to changes in fs.h.
 1.10.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.10.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.10.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.15.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.17.4.1 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.17.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.17.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.18.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.19.2.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.19.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.19.2.1 31-Oct-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:26:38 +0000
 1.24.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.24.2.1 03-Aug-2004  skrll Sync with HEAD
 1.25.16.1 21-Jun-2006  yamt sync with head.
 1.28.6.1 22-Apr-2006  simonb Sync with head.
 1.28.4.1 09-Sep-2006  rpaulo sync with head
 1.28.2.1 01-Mar-2006  yamt sync with head.
 1.29.86.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.29.80.1 28-Apr-2009  skrll Sync with HEAD.
 1.29.72.3 11-Aug-2010  yamt sync with head.
 1.29.72.2 11-Mar-2010  yamt sync with head
 1.29.72.1 04-May-2009  yamt sync with head.
 1.31.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.32.2.1 05-Mar-2011  rmind sync with head
 1.33.28.1 23-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.33.22.1 18-May-2014  rmind sync with head
 1.33.20.1 26-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.33.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.33.14.1 23-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.33.8.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6 21-Sep-2013  tsutsui Explicitly link SRT0.o (Standalone RunTime startup code) first.

This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.

The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.

Should be pulled up to netbsd-6 branches.
 1.5 02-Jan-2011  tsutsui branches: 1.5.8; 1.5.14; 1.5.18; 1.5.20; 1.5.22; 1.5.28;
Switch mvme68k standalone problams to using MI libsa and libkern
for maintainablility. Also bump version for note.

Compile test only, but no functional changes.
 1.4 24-Jul-2000  jdolecek branches: 1.4.90; 1.4.96;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.3 12-Jun-1998  cgd branches: 1.3.16;
replace ${MACHINE} with mvme68k, so that these Makefiles can safely
be run when MACHINE != mvme68k.
 1.2 07-May-1997  mycroft Add .MAKE to the .OBJDIR hacks, so they work with `make -n'.
 1.1 17-May-1996  chuck update for my reorg
 1.3.16.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.4.96.1 05-Mar-2011  rmind sync with head
 1.4.90.1 10-Jan-2011  jym Sync with HEAD
 1.5.28.1 23-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.5.22.1 18-May-2014  rmind sync with head
 1.5.20.1 26-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.5.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.14.1 23-Sep-2013  riz Pull up following revision(s) (requested by tsutsui in ticket #954):
sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
sys/arch/mvme68k/include/prom.h: revision 1.18
sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.
 1.5.8.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4 21-Oct-2009  snj Drop 3rd and 4th clauses. Approved by gwr@ (copyright holder).
 1.3 30-Nov-2000  scw branches: 1.3.130;
Support booting an ELF kernel, plus numerous tweaks due to
the gas.new/ELF transition.
 1.2 17-May-1996  chuck branches: 1.2.32;
complete revise of sun3 SRT0 so that it works with bugcrt by me.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.32.1 08-Dec-2000  bouyer Sync with HEAD.
 1.3.130.1 11-Mar-2010  yamt sync with head
 1.3 17-May-1996  chuck remove files no longer needed due to reorg.
 1.2 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.2;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.2.1 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.12 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.11 12-Jan-2008  tsutsui branches: 1.11.6; 1.11.8; 1.11.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.10 11-Dec-2005  christos branches: 1.10.50; 1.10.56; 1.10.64;
merge ktrace-lwp.
 1.9 03-Jul-2005  he branches: 1.9.2;
Make the bugscopen() function match it's prototype.
 1.8 28-Jun-2005  junyoung #include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.7 28-Jun-2005  junyoung ANSI, KNF, etc.
 1.6 07-Jul-2001  scw branches: 1.6.8; 1.6.24;
bcopy -> memcpy
bzero -> memset
bcmp -> memcmp (note that the MI libsa's memcmp() still calls bcmp()...)
 1.5 05-Sep-1998  pk Assign my copyrights to TNF.
 1.4 01-Aug-1998  scw Changes to keep lint happy.
In particular, fix some Makefiles so the include
paths are passed to lint.
 1.3 11-Jun-1998  scw Use DEV_BSIZE in place of MAXBSIZE for the static 'iobuf' in devopen().
Use of the latter caused the 1st and 2nd stage boot loaders to occupy
over 64k of memory. This caused them to fail on a 4Mb mvme147 since
they are loaded at 0x3f0000.
Reported by Kristen A. McIntyre and Maxime Kurkdjian.
 1.2 17-Dec-1997  scw Grok boot partition argument delimited by a colon. Force RB_ASKNAME
when partition argument is present.
 1.1 17-May-1996  chuck branches: 1.1.16;
bugdev.c: from Dale Rahn (bug device access)
exec_mvme.c: from sun3 port, adapted by me. I also fixed a bug that
prevented ZMAGIC kernels from running.
libsa.h: new file by me
parse_args.c: by Theo de Raadt from OpenBSD with slight revisions from by me
to make it fit the new format.
 1.1.16.1 18-Jul-1998  mellon Pull up 1.2 and 1.3 (scw)
 1.6.24.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.8.2 07-Jul-2001  scw bcopy -> memcpy
bzero -> memset
bcmp -> memcmp (note that the MI libsa's memcmp() still calls bcmp()...)
 1.6.8.1 07-Jul-2001  scw file bugdev.c was added on branch nathanw_sa on 2001-07-07 09:06:45 +0000
 1.9.2.1 21-Jan-2008  yamt sync with head
 1.10.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.10.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.10.50.1 23-Mar-2008  matt sync with HEAD
 1.11.10.1 16-May-2008  yamt sync with head.
 1.11.8.1 18-May-2008  yamt sync with head.
 1.11.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.7 20-Nov-2014  christos use the inline bcdtobin and bintobcd directly instead through a macro.
 1.6 20-Nov-2014  christos this needs clock.h
 1.5 17-Nov-2014  christos PR/49207: Kamil Rytarowski: Add sys/clock.h with generic time macros
(derived from clock_subr.h). Keep clock_subr.h with the kernel structures
and functions to reduce diffs, and have clock.h only include standalone
constants and macros.
 1.4 12-Jan-2008  tsutsui branches: 1.4.54;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.3 11-Dec-2005  christos branches: 1.3.50; 1.3.56; 1.3.64;
merge ktrace-lwp.
 1.2 28-Jun-2005  junyoung branches: 1.2.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.1 24-Jul-2000  jdolecek branches: 1.1.2; 1.1.26;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.1.26.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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 24-Jul-2000  bouyer file chiptotime.c was added on branch thorpej_scsipi on 2000-11-20 20:15:29 +0000
 1.2.2.1 21-Jan-2008  yamt sync with head
 1.3.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.3.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.3.50.1 23-Mar-2008  matt sync with HEAD
 1.4.54.1 03-Dec-2017  jdolecek update from HEAD
 1.11 20-Nov-2014  christos use the inline bcdtobin and bintobcd directly instead through a macro.
 1.10 17-Nov-2014  christos PR/49207: Kamil Rytarowski: Add sys/clock.h with generic time macros
(derived from clock_subr.h). Keep clock_subr.h with the kernel structures
and functions to reduce diffs, and have clock.h only include standalone
constants and macros.
 1.9 12-Jan-2009  tsutsui branches: 1.9.24;
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.8 12-Jan-2008  tsutsui branches: 1.8.6; 1.8.10; 1.8.18;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.7 11-Dec-2005  christos branches: 1.7.50; 1.7.56; 1.7.64;
merge ktrace-lwp.
 1.6 28-Jun-2005  junyoung branches: 1.6.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.5 28-Jun-2005  junyoung ANSI & KNF.
 1.4 24-Jul-2000  jdolecek branches: 1.4.24;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.3 01-Aug-1998  scw branches: 1.3.14;
Changes to keep lint happy.
In particular, fix some Makefiles so the include
paths are passed to lint.
 1.2 17-May-1996  chuck replace with code to use libbug rather than access directly
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.3.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.24.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.2.1 21-Jan-2008  yamt sync with head
 1.7.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.7.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.7.50.1 23-Mar-2008  matt sync with HEAD
 1.8.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.8.10.1 04-May-2009  yamt sync with head.
 1.8.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.9.24.1 03-Dec-2017  jdolecek update from HEAD
 1.2 17-May-1996  chuck remove files no longer needed due to reorg.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2 17-May-1996  chuck remove files no longer needed due to reorg.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2 17-May-1996  chuck remove files no longer needed due to reorg.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.3 17-May-1996  chuck remove files no longer needed due to reorg.
 1.2 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.2;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.2.1 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.3 17-May-1996  chuck remove files no longer needed due to reorg.
 1.2 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.2;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.2.1 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.16 29-May-2011  tsutsui Avoid backward seek on tape boot.
 1.15 12-Jan-2008  tsutsui branches: 1.15.20; 1.15.32; 1.15.38;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.14 11-Dec-2005  christos branches: 1.14.50; 1.14.56; 1.14.64;
merge ktrace-lwp.
 1.13 28-Jun-2005  junyoung branches: 1.13.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.11 02-Dec-2000  scw branches: 1.11.24;
Fix symbol table loading.
 1.10 30-Nov-2000  scw Support booting an ELF kernel, plus numerous tweaks due to
the gas.new/ELF transition.
 1.9 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.8 24-Jul-2000  scw Pass the boot partition number into the loaded kernel, in preparation
for doing away with __BROKEN_DK_ESTABLISH.
 1.7 10-Jul-2000  jdolecek make buildable with -Wall -Werror
 1.6 10-Jul-2000  jdolecek use <sys/exec_aout.h> instead of <a.out.h> - this is supposed
to be standalone after all
 1.5 22-Aug-1998  scw branches: 1.5.14;
vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.4 01-Aug-1998  scw Changes to keep lint happy.
In particular, fix some Makefiles so the include
paths are passed to lint.
 1.3 28-May-1996  chuck leave room for partition
 1.2 28-May-1996  chuck new kernel call args.
 1.1 17-May-1996  chuck branches: 1.1.4;
bugdev.c: from Dale Rahn (bug device access)
exec_mvme.c: from sun3 port, adapted by me. I also fixed a bug that
prevented ZMAGIC kernels from running.
libsa.h: new file by me
parse_args.c: by Theo de Raadt from OpenBSD with slight revisions from by me
to make it fit the new format.
 1.1.4.1 29-May-1996  chuck import generic boot bug fix
 1.5.14.2 08-Dec-2000  bouyer Sync with HEAD.
 1.5.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.11.24.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.24.1 03-Aug-2004  skrll Sync with HEAD
 1.13.2.1 21-Jan-2008  yamt sync with head
 1.14.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.14.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.14.50.1 23-Mar-2008  matt sync with HEAD
 1.15.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.15.32.1 31-May-2011  rmind sync with head
 1.15.20.1 15-Jul-2011  riz Pull up following revision(s) (requested by tsutsui in ticket #1639):
sys/arch/sun68k/stand/tapeboot/boot.c: revision 1.7 via patch
sys/arch/mvme68k/stand/libsa/exec_mvme.c: revision 1.16 via patch
Disable LOAD_BACKWARDS on tapeboot which can't seek backwards.
Fixes bootstrap tapeboot installation failure on TME reported from ryoon@.
Should be pulled up to netbsd-5.
(note netbsd-5 uses LOAD_NOTE instead of LOAD_BACKWARDS)
Avoid backward seek on tape boot.
 1.2 17-May-1996  chuck remove files no longer needed due to reorg.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2 17-May-1996  chuck remove files no longer needed due to reorg.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.6 12-Jan-2009  tsutsui Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

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

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

Per discussion on current-users.
 1.5 12-Jan-2008  tsutsui branches: 1.5.6; 1.5.10; 1.5.18;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.4 24-Jul-2000  jdolecek branches: 1.4.40; 1.4.102; 1.4.108; 1.4.116;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.3 24-Jul-2000  scw Pass the boot partition number into the loaded kernel, in preparation
for doing away with __BROKEN_DK_ESTABLISH.
 1.2 19-May-1996  chuck branches: 1.2.32;
minor clean
 1.1 17-May-1996  chuck bugdev.c: from Dale Rahn (bug device access)
exec_mvme.c: from sun3 port, adapted by me. I also fixed a bug that
prevented ZMAGIC kernels from running.
libsa.h: new file by me
parse_args.c: by Theo de Raadt from OpenBSD with slight revisions from by me
to make it fit the new format.
 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.116.1 19-Jan-2008  bouyer Sync with HEAD
 1.4.108.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.102.1 23-Mar-2008  matt sync with HEAD
 1.4.40.1 21-Jan-2008  yamt sync with head
 1.5.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.5.10.1 04-May-2009  yamt sync with head.
 1.5.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.2 17-May-1996  chuck remove files no longer needed due to reorg.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.4 17-May-1996  chuck remove files no longer needed due to reorg.
 1.3 12-Apr-1996  chuck fix warning from gcc
 1.2 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.2;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.2.1 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.3 17-May-1996  chuck remove files no longer needed due to reorg.
 1.2 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.2;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.2.1 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.3 17-May-1996  chuck remove files no longer needed due to reorg.
 1.2 13-Feb-1996  gwr Use vprintf where it was intended, and use __dead
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.11 11-Dec-2005  christos merge ktrace-lwp.
 1.10 28-Jun-2005  junyoung #include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.9 28-Jun-2005  junyoung ANSIfy & remove trailing spaces.
 1.8 10-Dec-2003  agc Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
 1.7 24-Sep-2000  jdolecek branches: 1.7.24;
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.6 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.5 24-Jul-2000  scw Pass the boot partition number into the loaded kernel, in preparation
for doing away with __BROKEN_DK_ESTABLISH.
 1.4 10-Jul-2000  jdolecek make buildable with -Wall -Werror
 1.3 10-Jul-2000  jdolecek no need to include <a.out.h> here
 1.2 17-Dec-1997  scw branches: 1.2.16; 1.2.28;
Grok boot partition argument delimited by a colon. Force RB_ASKNAME
when partition argument is present.
 1.1 17-May-1996  chuck bugdev.c: from Dale Rahn (bug device access)
exec_mvme.c: from sun3 port, adapted by me. I also fixed a bug that
prevented ZMAGIC kernels from running.
libsa.h: new file by me
parse_args.c: by Theo de Raadt from OpenBSD with slight revisions from by me
to make it fit the new format.
 1.2.28.1 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.2.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.7.24.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.24.1 03-Aug-2004  skrll Sync with HEAD
 1.16 02-Jan-2011  tsutsui Switch mvme68k standalone problams to using MI libsa and libkern
for maintainablility. Also bump version for note.

Compile test only, but no functional changes.
 1.15 10-Apr-2002  scw branches: 1.15.138;
DTRT to avoid installing "netbsd.tmp" in /usr/mdec.

Addresses port-mvme68k/16282.
 1.14 09-Feb-2002  lukem use ${INSTALL_FILE} as appropriate
 1.13 10-Jun-2001  scw branches: 1.13.2; 1.13.8;
Use the versions of dev_net.[ch] in libsa in order to get DHCP support.

In other words, mvme68k's "netboot" finally supports DHCP.
 1.12 04-Dec-2000  scw branches: 1.12.2;
Clean up the build process to ensure libsa/libbug are built
before linking the bootloaders.
 1.11 30-Nov-2000  scw Support booting an ELF kernel, plus numerous tweaks due to
the gas.new/ELF transition.
 1.10 28-Jul-2000  scw Really make this work for `dependall'. Also strip bootst.bug before
running it through wrtvid.
 1.9 24-Jul-2000  jdolecek add netboot.bin to CLEANFILES
 1.8 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.7 09-Jul-2000  jdolecek uncomment part which has been accidentaly commented out in last commit
 1.6 09-Jul-2000  jdolecek Make buildable on NetBSD/mvme68k 1.4.1.
 1.5 25-Jun-2000  scw Some tweaks to make things work properly with `dependall'.
 1.4 12-Jun-1998  cgd branches: 1.4.16; 1.4.28;
replace ${MACHINE} with mvme68k, so that these Makefiles can safely
be run when MACHINE != mvme68k.
 1.3 18-Oct-1996  thorpej Use ${INSTALL}.
 1.2 17-May-1996  chuck Makefile: update from OpenBSD
boot.c: update from sun3 port, with changes for my new boot code put in.
conf.c: config from openbsd, by Theo de Raadt
dev_net.c: update from openbsd (standard dev_net with changes from theo)
dev_net.h: proto from openbsd
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.4.28.1 26-Jun-2000  scw Pullup from trunk: 1.4 - 1.5
Approved by: thorpej

DTRT for `dependall' during a make build. This slipped through the net
due to a local fix which got forgotten about.
 1.4.16.2 08-Dec-2000  bouyer Sync with HEAD.
 1.4.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.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.13.8.3 17-Apr-2002  nathanw Catch up to -current.
 1.13.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.13.8.1 10-Jun-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-02-28 04:10:54 +0000
 1.13.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.13.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.15.138.1 05-Mar-2011  rmind sync with head
 1.17 11-Jun-2016  dholland PR 51200 gets in libsa considered harmful: use kgets
 1.16 12-Jan-2008  tsutsui branches: 1.16.54; 1.16.74;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.15 11-Dec-2005  christos branches: 1.15.50; 1.15.56; 1.15.64;
merge ktrace-lwp.
 1.14 28-Jun-2005  junyoung branches: 1.14.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.13 28-Jun-2005  junyoung ANSIfy and remove trailing spaces.
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.11 01-Oct-2002  provos branches: 1.11.6;
more trailing \r cleanup; pointed out by wiz
 1.10 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.9 03-May-2002  scw main()'s return type should be `int', not `void'.
 1.8 07-Jul-2001  scw branches: 1.8.2; 1.8.8;
bcopy -> memcpy
bzero -> memset
bcmp -> memcmp (note that the MI libsa's memcmp() still calls bcmp()...)
 1.7 10-Jun-2001  scw Use the versions of dev_net.[ch] in libsa in order to get DHCP support.

In other words, mvme68k's "netboot" finally supports DHCP.
 1.6 24-Jul-2000  jdolecek branches: 1.6.2;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.5 24-Jul-2000  scw Pass the boot partition number into the loaded kernel, in preparation
for doing away with __BROKEN_DK_ESTABLISH.
 1.4 19-May-1996  chuck branches: 1.4.32;
preserve sboot status
 1.3 17-May-1996  chuck Makefile: update from OpenBSD
boot.c: update from sun3 port, with changes for my new boot code put in.
conf.c: config from openbsd, by Theo de Raadt
dev_net.c: update from openbsd (standard dev_net with changes from theo)
dev_net.h: proto from openbsd
 1.2 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.2;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.2.1 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.4.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.6.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.8.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.8.8.1 07-Jul-2001  nathanw file boot.c was added on branch nathanw_sa on 2002-06-20 03:40:03 +0000
 1.8.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.8.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.6.1 03-Aug-2004  skrll Sync with HEAD
 1.14.2.1 21-Jan-2008  yamt sync with head
 1.15.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.15.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.15.50.1 23-Mar-2008  matt sync with HEAD
 1.16.74.1 09-Jul-2016  skrll Sync with HEAD
 1.16.54.1 03-Dec-2017  jdolecek update from HEAD
 1.7 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.6 11-Dec-2005  christos branches: 1.6.50; 1.6.56; 1.6.64;
merge ktrace-lwp.
 1.5 28-Jun-2005  junyoung branches: 1.5.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.4 10-Jun-2001  scw branches: 1.4.8; 1.4.24;
Use the versions of dev_net.[ch] in libsa in order to get DHCP support.

In other words, mvme68k's "netboot" finally supports DHCP.
 1.3 17-May-1996  chuck branches: 1.3.46;
Makefile: update from OpenBSD
boot.c: update from sun3 port, with changes for my new boot code put in.
conf.c: config from openbsd, by Theo de Raadt
dev_net.c: update from openbsd (standard dev_net with changes from theo)
dev_net.h: proto from openbsd
 1.2 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.2;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.2.1 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.3.46.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.24.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.8.2 10-Jun-2001  scw Use the versions of dev_net.[ch] in libsa in order to get DHCP support.

In other words, mvme68k's "netboot" finally supports DHCP.
 1.4.8.1 10-Jun-2001  scw file conf.c was added on branch nathanw_sa on 2001-06-10 14:12:50 +0000
 1.5.2.1 21-Jan-2008  yamt sync with head
 1.6.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.6.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.6.50.1 23-Mar-2008  matt sync with HEAD
 1.5 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.4 11-Dec-2005  christos branches: 1.4.50; 1.4.56; 1.4.64;
merge ktrace-lwp.
 1.3 10-Dec-2003  agc branches: 1.3.16;
Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
 1.2 10-Jun-2001  scw branches: 1.2.8; 1.2.24;
Use the versions of dev_net.[ch] in libsa in order to get DHCP support.

In other words, mvme68k's "netboot" finally supports DHCP.
 1.1 17-May-1996  chuck branches: 1.1.46;
sync with openbsd. [includes if_ie made to work on 16x by Theo de Raadt]
 1.1.46.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.24.1 03-Aug-2004  skrll Sync with HEAD
 1.2.8.2 10-Jun-2001  scw Use the versions of dev_net.[ch] in libsa in order to get DHCP support.

In other words, mvme68k's "netboot" finally supports DHCP.
 1.2.8.1 10-Jun-2001  scw file config.h was added on branch nathanw_sa on 2001-06-10 14:12:50 +0000
 1.3.16.1 21-Jan-2008  yamt sync with head
 1.4.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.4.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.50.1 23-Mar-2008  matt sync with HEAD
 1.9 10-Jun-2001  scw Use the versions of dev_net.[ch] in libsa in order to get DHCP support.

In other words, mvme68k's "netboot" finally supports DHCP.
 1.8 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.7 07-May-1999  drochner branches: 1.7.2;
include <lib/libkern/libkern.h> for intoa()/inet_ntoa()
 1.6 22-Jul-1997  drochner branches: 1.6.18;
Don't use <lib/libsa/if_ether.h> anymore. This was a copy of the
old (before ARP changes) <netinet/if_ether.h>, intended for
temporary use.
 1.5 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.4 17-May-1996  chuck branches: 1.4.8;
Makefile: update from OpenBSD
boot.c: update from sun3 port, with changes for my new boot code put in.
conf.c: config from openbsd, by Theo de Raadt
dev_net.c: update from openbsd (standard dev_net with changes from theo)
dev_net.h: proto from openbsd
 1.3 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.2 10-Aug-1995  chuck branches: 1.2.2;
add bcea[] (as per sun3 port)
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.2.1 12-Oct-1995  chuck sync with sun3 version and libsa changes
 1.4.8.1 07-Mar-1997  is Use libsa copy of oldstyle if_ether.h for now
 1.6.18.1 21-Jun-1999  thorpej Sync w/ -current.
 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.4 10-Jun-2001  scw Use the versions of dev_net.[ch] in libsa in order to get DHCP support.

In other words, mvme68k's "netboot" finally supports DHCP.
 1.3 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2 17-May-1996  chuck branches: 1.2.32;
Makefile: update from OpenBSD
boot.c: update from sun3 port, with changes for my new boot code put in.
conf.c: config from openbsd, by Theo de Raadt
dev_net.c: update from openbsd (standard dev_net with changes from theo)
dev_net.h: proto from openbsd
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 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.3 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.2 24-Jul-2000  jdolecek branches: 1.2.40; 1.2.102; 1.2.108; 1.2.116;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.1 17-May-1996  chuck branches: 1.1.32;
sync with openbsd. [includes if_ie made to work on 16x by Theo de Raadt]
 1.1.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.116.1 19-Jan-2008  bouyer Sync with HEAD
 1.2.108.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.102.1 23-Mar-2008  matt sync with HEAD
 1.2.40.1 21-Jan-2008  yamt sync with head
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 10-Dec-2003  agc Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
 1.1 17-May-1996  chuck branches: 1.1.68;
sync with openbsd. [includes if_ie made to work on 16x by Theo de Raadt]
 1.1.68.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.68.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.68.1 03-Aug-2004  skrll Sync with HEAD
 1.14 04-May-2025  andvar remove redundant inner (status & IE_FD_OK) condition; parent condition already
checks that both IE_FD_COMPLETE and IE_FD_OK flags are set.
 1.13 12-Jan-2009  tsutsui branches: 1.13.102;
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.12 12-Jan-2008  tsutsui branches: 1.12.6; 1.12.10; 1.12.18;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.11 24-Dec-2005  perry branches: 1.11.50; 1.11.56; 1.11.64;
bare asm -> __asm
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 10-Dec-2003  agc branches: 1.9.16;
Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
 1.8 13-Mar-2003  drochner branches: 1.8.2;
adapt for void *io_netif
 1.7 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.6 07-Jul-2001  scw branches: 1.6.2; 1.6.8;
bcopy -> memcpy
bzero -> memset
bcmp -> memcmp (note that the MI libsa's memcmp() still calls bcmp()...)
 1.5 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.4 15-Jul-2000  scw The install ramdisk has grown somewhat, and now overwrites the
`ie' chip's packet buffer... Moving it up to just below the netboot
image (4MB) should leave room for a few more year's bloat. ;-)
 1.3 28-Mar-1999  scw branches: 1.3.8; 1.3.20;
Pull in <net/if{_ether,}.h> and a few others to get ETHER_MAX_LEN.
 1.2 25-Mar-1999  thorpej Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
 1.1 17-May-1996  chuck sync with openbsd. [includes if_ie made to work on 16x by Theo de Raadt]
 1.3.20.1 15-Jul-2000  scw Pullup from trunk: 1.3 - 1.4
Approved by: thorpej

Move the address of the packet buffer to avoid overwriting it with
the ramdisk image.
 1.3.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.6.8.1 07-Jul-2001  nathanw file if_ie.c was added on branch nathanw_sa on 2002-10-18 02:39:00 +0000
 1.6.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.8.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.16.2 21-Jan-2008  yamt sync with head
 1.9.16.1 21-Jun-2006  yamt sync with head.
 1.11.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.11.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.50.1 23-Mar-2008  matt sync with HEAD
 1.12.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.12.10.1 04-May-2009  yamt sync with head.
 1.12.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.13.102.1 02-Aug-2025  perseant Sync with HEAD
 1.2 24-Oct-2021  andvar fix various typos in comments, mainly copypasta.
 1.1 17-May-1996  chuck sync with openbsd. [includes if_ie made to work on 16x by Theo de Raadt]
 1.10 12-Jan-2009  tsutsui Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

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

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

Per discussion on current-users.
 1.9 12-Jan-2008  tsutsui branches: 1.9.6; 1.9.10; 1.9.18;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.8 11-Dec-2005  christos branches: 1.8.50; 1.8.56; 1.8.64;
merge ktrace-lwp.
 1.7 10-Dec-2003  agc branches: 1.7.16;
Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
 1.6 13-Mar-2003  drochner branches: 1.6.2;
adapt for void *io_netif
 1.5 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.4 08-Nov-2001  scw branches: 1.4.2;
Fix a couple of uninitialised variable warnings with New Toolchain.
 1.3 07-Jul-2001  scw branches: 1.3.2; 1.3.6;
bcopy -> memcpy
bzero -> memset
bcmp -> memcmp (note that the MI libsa's memcmp() still calls bcmp()...)
 1.2 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.1 17-May-1996  chuck branches: 1.1.32;
sync with openbsd. [includes if_ie made to work on 16x by Theo de Raadt]
 1.1.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.3.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 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 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.4.2.1 08-Nov-2001  nathanw file if_le.c was added on branch nathanw_sa on 2002-10-18 02:39:01 +0000
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.16.1 21-Jan-2008  yamt sync with head
 1.8.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.8.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.8.50.1 23-Mar-2008  matt sync with HEAD
 1.9.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.9.10.1 04-May-2009  yamt sync with head.
 1.9.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.5 05-Dec-2021  msaitoh s/initialz/initializ/ in comment.
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.2 18-Sep-2001  wiz branches: 1.2.4; 1.2.20;
Give initiali[sz]e all the "i"s it deserves.
 1.1 17-May-1996  chuck branches: 1.1.46; 1.1.48;
sync with openbsd. [includes if_ie made to work on 16x by Theo de Raadt]
 1.1.48.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.46.1 01-Oct-2001  fvdl Catch up with -current.
 1.2.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.20.1 03-Aug-2004  skrll Sync with HEAD
 1.2.4.2 18-Sep-2001  wiz Give initiali[sz]e all the "i"s it deserves.
 1.2.4.1 18-Sep-2001  wiz file if_lereg.h was added on branch nathanw_sa on 2001-09-18 18:15:52 +0000
 1.5 02-Jan-2011  tsutsui Switch mvme68k standalone problams to using MI libsa and libkern
for maintainablility. Also bump version for note.

Compile test only, but no functional changes.
 1.4 09-Nov-2001  scw branches: 1.4.144;
Bump the version numbers of all bootloaders which use loadfile_elfXX() now
that it tries hard to avoid backwards seeks.
 1.3 02-Aug-2001  bjh21 branches: 1.3.4; 1.3.6;
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.2 24-Sep-2000  jdolecek branches: 1.2.2; 1.2.6;
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.1 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.6.1 03-Aug-2001  lukem update to -current
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 24-Sep-2000  bouyer file version was added on branch thorpej_scsipi on 2000-11-20 20:15:31 +0000
 1.3.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.6.1 02-Aug-2001  nathanw file version was added on branch nathanw_sa on 2002-01-08 00:26:38 +0000
 1.3.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.4.144.1 05-Mar-2011  rmind sync with head
 1.3 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2 17-May-1996  chuck branches: 1.2.32;
bump
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.32.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.4 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.3 13-Feb-1999  lukem branches: 1.3.24; 1.3.28;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.2 07-May-1997  mycroft Use proginstall:: to disable installing PROG.
 1.1 17-May-1996  chuck prtvid (print out a VID block). by Dale Rahn.
 1.3.28.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.24.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.2 04-May-2002  scw branches: 1.2.26; 1.2.88; 1.2.94; 1.2.102;
Make sure main() has a prototype and a return type of "int".
 1.1 17-May-1996  chuck branches: 1.1.48; 1.1.52;
prtvid (print out a VID block). by Dale Rahn.
 1.1.52.1 20-Jun-2002  nathanw Catch up to -current.
 1.1.48.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.102.1 19-Jan-2008  bouyer Sync with HEAD
 1.2.94.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.88.1 23-Mar-2008  matt sync with HEAD
 1.2.26.1 21-Jan-2008  yamt sync with head
 1.15 21-Nov-2014  christos Add libkern for umoddi3 needed for correct leap yar computation in is_leap_year.
 1.14 21-Jan-2011  joerg branches: 1.14.14;
Switch remaining platforms to modern CPP for assembler.
 1.13 09-Apr-2002  scw branches: 1.13.138; 1.13.144; 1.13.146;
Simplify generation of the s-record boot file using objcopy instead
of a homebrew tool.

Addresses port-mvme68k/16256.
 1.12 09-Feb-2002  lukem use ${INSTALL_FILE} as appropriate
 1.11 18-Dec-2000  scw branches: 1.11.4; 1.11.8;
s/MDECDIR/MDEC_DIR/
 1.10 04-Dec-2000  scw Clean up the build process to ensure libsa/libbug are built
before linking the bootloaders.
 1.9 30-Nov-2000  scw Support booting an ELF kernel, plus numerous tweaks due to
the gas.new/ELF transition.
 1.8 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.7 09-Jul-2000  jdolecek Make buildable on NetBSD/mvme68k 1.4.1.
 1.6 25-Jun-2000  scw Some tweaks to make things work properly with `dependall'.
 1.5 13-Feb-1999  lukem branches: 1.5.8; 1.5.20;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.4 01-Aug-1998  scw Changes to keep lint happy.
In particular, fix some Makefiles so the include
paths are passed to lint.
 1.3 18-Oct-1996  thorpej Use ${INSTALL}.
 1.2 07-Sep-1996  thorpej Use the stock ld(1) and the srec program to generate the serial line
bootstrap program.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.5.20.1 26-Jun-2000  scw Pullup from trunk: 1.5 - 1.6
Approved by: thorpej

DTRT for `dependall' during a make build. This slipped through the net
due to a local fix which got forgotten about.
 1.5.8.3 05-Jan-2001  bouyer Sync with HEAD
 1.5.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.5.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.11.8.2 17-Apr-2002  nathanw Catch up to -current.
 1.11.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.11.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.13.146.1 08-Feb-2011  bouyer Sync with HEAD
 1.13.144.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.138.1 05-Mar-2011  rmind sync with head
 1.14.14.1 03-Dec-2017  jdolecek update from HEAD
 1.6 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.5 11-Dec-2005  christos branches: 1.5.50; 1.5.56; 1.5.64;
merge ktrace-lwp.
 1.4 07-Aug-2003  agc branches: 1.4.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.3 24-Jul-2000  jdolecek branches: 1.3.24;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2 22-Aug-1998  scw branches: 1.2.14;
vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.24.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.1 21-Jan-2008  yamt sync with head
 1.5.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.5.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.5.50.1 23-Mar-2008  matt sync with HEAD
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.70;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.70.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.1.1.70.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.1.1.70.1 03-Aug-2004  skrll Sync with HEAD
 1.7 02-Feb-2011  chuck udpate license clauses on my code to match the new-style BSD licenses.
based on diff that rmind@ sent me.

no functional change with this commit.
 1.6 12-Jan-2008  tsutsui branches: 1.6.32; 1.6.38; 1.6.40;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.5 24-Jul-2000  jdolecek branches: 1.5.40; 1.5.102; 1.5.108; 1.5.116;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.4 22-Aug-1998  scw branches: 1.4.14;
vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.3 05-Jan-1998  perry RCSID Police.
 1.2 19-May-1996  chuck update for new (SRT0/bugcrt) calling convention
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.4.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.116.1 19-Jan-2008  bouyer Sync with HEAD
 1.5.108.1 18-Feb-2008  mjf Sync with HEAD.
 1.5.102.1 23-Mar-2008  matt sync with HEAD
 1.5.40.1 21-Jan-2008  yamt sync with head
 1.6.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.6.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.32.1 05-Mar-2011  rmind sync with head
 1.14 09-Aug-2025  skrll aknowledgement -> acknowledgement in a comment
 1.13 09-Aug-2025  skrll Trai;ing whitespace
 1.12 29-Sep-2011  he Drop the "static" from the HEXDIGITS declaration, now that there's an
extern definition in sys/systm.h, to allow this to continue to build.
 1.11 25-Feb-2011  joerg Move HEXDIGIT to mvme68k's sboot. It seems to be the only user.
Save a byte by explicitly specifying the size.
 1.10 02-Feb-2011  chuck udpate license clauses on my code to match the new-style BSD licenses.
based on diff that rmind@ sent me.

no functional change with this commit.
 1.9 12-Jan-2008  tsutsui branches: 1.9.32; 1.9.38; 1.9.40;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.8 20-May-2006  mrg branches: 1.8.36; 1.8.42; 1.8.50;
change some char to u_char to match other variables and functions.
 1.7 11-Dec-2005  christos branches: 1.7.4; 1.7.6; 1.7.8; 1.7.12; 1.7.14;
merge ktrace-lwp.
 1.6 17-May-2005  christos branches: 1.6.2;
Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
implement, xtoa(), but I think defining the samestring 50 times is a bit
too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...
 1.5 16-Sep-2001  wiz branches: 1.5.4; 1.5.20;
Spell 'occurred' with two 'r's.
 1.4 07-Jul-2001  scw branches: 1.4.2; 1.4.4;
bcopy -> memcpy
bzero -> memset
bcmp -> memcmp (note that the MI libsa's memcmp() still calls bcmp()...)
 1.3 12-Jun-2001  wiz receive, not recieve
 1.2 05-Jan-1998  perry branches: 1.2.30;
RCSID Police.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.30.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.4.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.20.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.4.2 16-Sep-2001  wiz Spell 'occurred' with two 'r's.
 1.5.4.1 16-Sep-2001  wiz file etherfun.c was added on branch nathanw_sa on 2001-09-16 16:34:34 +0000
 1.6.2.2 21-Jan-2008  yamt sync with head
 1.6.2.1 21-Jun-2006  yamt sync with head.
 1.7.14.1 19-Jun-2006  chap Sync with head.
 1.7.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.7.8.1 24-May-2006  yamt sync with head.
 1.7.6.1 01-Jun-2006  kardel Sync with head.
 1.7.4.1 09-Sep-2006  rpaulo sync with head
 1.8.50.1 19-Jan-2008  bouyer Sync with HEAD
 1.8.42.1 18-Feb-2008  mjf Sync with HEAD.
 1.8.36.1 23-Mar-2008  matt sync with HEAD
 1.9.40.2 05-Mar-2011  bouyer Sync with HEAD
 1.9.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.9.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.9.32.1 05-Mar-2011  rmind sync with head
 1.5 02-Feb-2011  chuck udpate license clauses on my code to match the new-style BSD licenses.
based on diff that rmind@ sent me.

no functional change with this commit.
 1.4 12-Jan-2008  tsutsui branches: 1.4.32; 1.4.38; 1.4.40;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.3 20-May-2006  mrg branches: 1.3.36; 1.3.42; 1.3.50;
change some char to u_char to match other variables and functions.
 1.2 05-Jan-1998  perry branches: 1.2.68; 1.2.82; 1.2.84; 1.2.86; 1.2.90; 1.2.92;
RCSID Police.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.92.1 19-Jun-2006  chap Sync with head.
 1.2.90.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.2.86.1 24-May-2006  yamt sync with head.
 1.2.84.1 01-Jun-2006  kardel Sync with head.
 1.2.82.1 09-Sep-2006  rpaulo sync with head
 1.2.68.2 21-Jan-2008  yamt sync with head
 1.2.68.1 21-Jun-2006  yamt sync with head.
 1.3.50.1 19-Jan-2008  bouyer Sync with HEAD
 1.3.42.1 18-Feb-2008  mjf Sync with HEAD.
 1.3.36.1 23-Mar-2008  matt sync with HEAD
 1.4.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.4.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.4.32.1 05-Mar-2011  rmind sync with head
 1.5 05-Dec-2021  msaitoh s/initialz/initializ/ in comment.
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.2 18-Sep-2001  wiz branches: 1.2.4; 1.2.20;
Give initiali[sz]e all the "i"s it deserves.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.48; 1.1.1.1.50;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.50.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.1.1.48.1 01-Oct-2001  fvdl Catch up with -current.
 1.2.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.20.1 03-Aug-2004  skrll Sync with HEAD
 1.2.4.2 18-Sep-2001  wiz Give initiali[sz]e all the "i"s it deserves.
 1.2.4.1 18-Sep-2001  wiz file if_lereg.h was added on branch nathanw_sa on 2001-09-18 18:15:52 +0000
 1.6 08-Mar-2018  mrg fix various gcc6 m68k issues:
- bad indentation. next68k en.c and mvme68k le_poll.c fixes real issues
in error handling, the rest are NFCI.
- pass 68030 flags as appropriate for mvme68k.
- next68k nextrom.c has -Warray-bounds ignored for an odd expression
that appears to run before relocation, and needs manual offsets
added which trips bounds array checking.

with this all m68k ports build with GCC 6.
 1.5 12-Jan-2008  tsutsui branches: 1.5.96;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.4 08-Nov-2001  scw branches: 1.4.2; 1.4.34; 1.4.96; 1.4.102; 1.4.110;
Fix a couple of uninitialised variable warning with New Toolchain.
 1.3 07-Jul-2001  scw branches: 1.3.2; 1.3.6;
bcopy -> memcpy
bzero -> memset
bcmp -> memcmp (note that the MI libsa's memcmp() still calls bcmp()...)
 1.2 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.34;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.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.3.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.3.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.110.1 19-Jan-2008  bouyer Sync with HEAD
 1.4.102.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.96.1 23-Mar-2008  matt sync with HEAD
 1.4.34.1 21-Jan-2008  yamt sync with head
 1.4.2.2 08-Nov-2001  scw Fix a couple of uninitialised variable warning with New Toolchain.
 1.4.2.1 08-Nov-2001  scw file le_poll.c was added on branch nathanw_sa on 2001-11-08 21:40:26 +0000
 1.5.96.1 15-Mar-2018  pgoyette Synch with HEAD
 1.3 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2 22-Aug-1998  scw branches: 1.2.14;
vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.14.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.2 30-Nov-2000  scw Support booting an ELF kernel, plus numerous tweaks due to
the gas.new/ELF transition.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck branches: 1.1.1.1.34;
mvme68k port -- for the motorola vme147 m68030 card
 1.1.1.1.34.1 08-Dec-2000  bouyer Sync with HEAD.
 1.7 02-Feb-2011  chuck udpate license clauses on my code to match the new-style BSD licenses.
based on diff that rmind@ sent me.

no functional change with this commit.
 1.6 12-Jan-2008  tsutsui branches: 1.6.32; 1.6.38; 1.6.40;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.5 24-Dec-2005  perry branches: 1.5.50; 1.5.56; 1.5.64;
bare asm -> __asm
 1.4 24-Jul-2000  jdolecek branches: 1.4.40;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.3 05-Jan-1998  perry branches: 1.3.16;
RCSID Police.
 1.2 19-May-1996  chuck update for new (SRT0/bugcrt) calling convention
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.3.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.4.40.2 21-Jan-2008  yamt sync with head
 1.4.40.1 21-Jun-2006  yamt sync with head.
 1.5.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.5.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.5.50.1 23-Mar-2008  matt sync with HEAD
 1.6.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.6.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.32.1 05-Mar-2011  rmind sync with head
 1.7 02-Feb-2011  chuck udpate license clauses on my code to match the new-style BSD licenses.
based on diff that rmind@ sent me.

no functional change with this commit.
 1.6 04-Mar-2007  christos branches: 1.6.66; 1.6.72; 1.6.74;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.5 24-Jul-2000  jdolecek branches: 1.5.40; 1.5.78;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.4 23-Nov-1998  scw branches: 1.4.12;
Get rid of memset() prototype, it's not used and egcs doesn't like it.
 1.3 05-Jan-1998  perry RCSID Police.
 1.2 19-May-1996  chuck update for new (SRT0/bugcrt) calling convention
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.4.12.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.78.1 12-Mar-2007  rmind Sync with HEAD.
 1.5.40.1 03-Sep-2007  yamt sync with head.
 1.6.74.1 08-Feb-2011  bouyer Sync with HEAD
 1.6.72.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.66.1 05-Mar-2011  rmind sync with head
 1.4 09-Apr-2002  scw Simplify generation of the s-record boot file using objcopy instead
of a homebrew tool.

Addresses port-mvme68k/16256.
 1.3 24-Jul-2000  jdolecek branches: 1.3.4; 1.3.8;
cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2 10-Jul-2000  jdolecek explicitly specify main() return type (make buildable with
-Wall -Werror)
 1.1 07-Sep-1996  thorpej branches: 1.1.30;
Add a public domain S-record generator.
 1.1.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.3.8.1 17-Apr-2002  nathanw Catch up to -current.
 1.3.4.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.8 01-Feb-2011  chuck udpate license clauses on my code to match the new-style BSD licenses.
remove no-longer-valid wustl email address for me.
based on diff that rmind@ sent me.

no functional change with this commit.
 1.7 04-Dec-2000  scw branches: 1.7.152; 1.7.158; 1.7.160;
Declare `start' in addition to `_start'.
 1.6 30-Nov-2000  scw Support booting an ELF kernel, plus numerous tweaks due to
the gas.new/ELF transition.
 1.5 05-Jan-1998  perry branches: 1.5.16;
RCSID Police.
 1.4 29-May-1996  chuck fix off by one error
 1.3 28-May-1996  chuck bug fix: pass address of le to netboot
 1.2 19-May-1996  chuck branches: 1.2.4;
update for new (SRT0/bugcrt) calling convention
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2.4.1 29-May-1996  chuck fix calling bug, and off by one error
 1.5.16.1 08-Dec-2000  bouyer Sync with HEAD.
 1.7.160.1 08-Feb-2011  bouyer Sync with HEAD
 1.7.158.1 06-Jun-2011  jruoho Sync with HEAD.
 1.7.152.1 05-Mar-2011  rmind sync with head
 1.3 02-Jan-2011  tsutsui Switch mvme68k standalone problams to using MI libsa and libkern
for maintainablility. Also bump version for note.

Compile test only, but no functional changes.
 1.2 24-Sep-2000  jdolecek branches: 1.2.2; 1.2.154;
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.1 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.2.154.1 05-Mar-2011  rmind sync with head
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 24-Sep-2000  bouyer file version was added on branch thorpej_scsipi on 2000-11-20 20:15:32 +0000
 1.13 06-May-2021  rin PR port-mvme68k/56146

Build wrtvid as tools.
 1.12 01-May-2018  christos branches: 1.12.18;
Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
 1.11 23-Jan-2002  scw branches: 1.11.28;
Completely re-write wrtvid.c to make it usable during a cross-build.
Instead of parsing the 1st stage booter in wrtvid, use objcopy to
generate a binary image, leaving wrtvid to create the VID/CFG block.
 1.10 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.9 31-Oct-2001  thorpej branches: 1.9.2;
Need byteorder.c for loadfile_elf*.c
 1.8 31-Oct-2001  thorpej Build the loadfile() a.out, ECOFF, and ELF back-ends as separate
objects.
 1.7 05-Aug-2001  matt branches: 1.7.4;
This is a HOST program, so make compile as one.
 1.6 21-Jan-2001  scw branches: 1.6.4;
Create machine/m68k symlinks before trying to build the program.
 1.5 04-Dec-2000  scw Make this work with the ELF tape bootloader.
 1.4 09-Jul-2000  jdolecek Make buildable on NetBSD/mvme68k 1.4.1.
 1.3 13-Feb-1999  lukem branches: 1.3.8;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.2 07-May-1997  mycroft Use proginstall:: to disable installing PROG.
 1.1 17-May-1996  chuck wrtvid by Dale Rahn.
 1.3.8.3 11-Feb-2001  bouyer Sync with HEAD.
 1.3.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.3.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.4.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.7.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.9.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.9.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.9.2.1 31-Oct-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:26:39 +0000
 1.11.28.1 02-May-2018  pgoyette Synch with HEAD
 1.12.18.1 13-May-2021  thorpej Sync with HEAD.
 1.4 24-Jul-2000  jdolecek cleanup Makefiles, put common stuff to Makefile.booters, ditch unnecessary
stuff
make this all compile with -Wall -Wno-main -Wmissing-prototypes
-Wstrict-prototypes -Werror , also compilable on 1.4.1
label itself as NetBSD/mvme68k instead of "BSD" in bootblock message
move bugcrt.c to libbug, remove bugcrt directory (bugcrt is still built
and used separately to rest of libbug)
convert sboot to use ordinary mvme68 libsa, instead of copying needed
stuff in libc_sa.c
convert to use version info generated by sys/conf/newvers_stand.sh
instead of previous version.c files, add necessary 'version' files
put chiptotime() to separate libsa file (used also by sboot/clock.c)

Thanks to Steve Woodford for help with this. Note that -current build
might be hosed by this change, will be addressed by Steve shortly.
 1.3 12-Jun-1998  cgd branches: 1.3.16;
replace ${MACHINE} with mvme68k, so that these Makefiles can safely
be run when MACHINE != mvme68k.
 1.2 07-May-1997  mycroft Add .MAKE to the .OBJDIR hacks, so they work with `make -n'.
 1.1 17-May-1996  chuck wrtvid by Dale Rahn.
 1.3.16.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.10 06-May-2021  rin PR port-mvme68k/56146

Build wrtvid as tools.
 1.9 08-Jan-2019  rin branches: 1.9.16;
Include unistd.h for write(2) and close(2).
 1.8 28-Apr-2008  martin branches: 1.8.86; 1.8.88;
Remove clause 3 and 4 from TNF licenses
 1.7 12-Jan-2008  tsutsui branches: 1.7.6; 1.7.8; 1.7.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.6 24-Mar-2002  scw branches: 1.6.26; 1.6.88; 1.6.94; 1.6.102;
Round VID_OSL to be a multiple of 32 * 256byte blocks.
 1.5 23-Jan-2002  scw Completely re-write wrtvid.c to make it usable during a cross-build.
Instead of parsing the 1st stage booter in wrtvid, use objcopy to
generate a binary image, leaving wrtvid to create the VID/CFG block.
 1.4 19-Oct-2001  scw branches: 1.4.4;
Use the entry-point returned from the first call to loadfile()
instead of the one from the second call (which has a non-zero
offset included in it).

Fixes port-mvme68k/14292 from Ken Seefried.
 1.3 07-Jul-2001  scw branches: 1.3.2;
bcopy -> memcpy
bzero -> memset
bcmp -> memcmp (note that the MI libsa's memcmp() still calls bcmp()...)
 1.2 04-Dec-2000  scw Make this work with the ELF tape bootloader.
 1.1 17-May-1996  chuck branches: 1.1.32;
wrtvid by Dale Rahn.
 1.1.32.1 08-Dec-2000  bouyer Sync with HEAD.
 1.3.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.1 19-Oct-2001  nathanw file wrtvid.c was added on branch nathanw_sa on 2002-02-28 04:10:55 +0000
 1.6.102.1 19-Jan-2008  bouyer Sync with HEAD
 1.6.94.1 18-Feb-2008  mjf Sync with HEAD.
 1.6.88.1 23-Mar-2008  matt sync with HEAD
 1.6.26.1 21-Jan-2008  yamt sync with head
 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.88.1 10-Jun-2019  christos Sync with HEAD
 1.8.86.1 18-Jan-2019  pgoyette Synch with HEAD
 1.9.16.1 13-May-2021  thorpej Sync with HEAD.

RSS XML Feed