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

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

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

Per lengthy discussion with Andrew Brown.
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.20;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.20.1 07-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file Makefile was added on branch thorpej_scsipi on 2001-01-08 14:56:12 +0000
 1.2.114.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.2.108.1 04-May-2009  yamt sync with head.
 1.2.104.1 17-Jan-2009  mjf Sync with HEAD.
 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 03-Jan-2001  itojun branches: 1.1.2; 1.1.20;
retain empty "compile" directory
 1.1.20.1 07-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 03-Jan-2001  bouyer file .keep_me was added on branch thorpej_scsipi on 2001-01-08 14:56:13 +0000
 1.1 06-Jan-2003  lukem branches: 1.1.2;
Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

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

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

Per lengthy discussion with Andrew Brown.
 1.1.2.2 07-Jan-2003  thorpej Sync with HEAD.
 1.1.2.1 06-Jan-2003  thorpej file Makefile was added on branch nathanw_sa on 2003-01-07 21:05:55 +0000
 1.12 29-Jan-2024  christos PR/57889: Ricardo Branco: ext2fs does not have user immutable and append
file flags, only system ones. Restrict those to the superuser. Before
the behavior was controlled by EXT2FS_SYSTEM_FLAGS. Make that behavior the
default.
 1.11 12-Sep-2023  andvar double quotes should be in front of value, not property name.
fix KGDB enabled builds for dreamcast/hpcsh.
 1.10 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.9 27-Sep-2020  roy vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.8 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.7 26-Apr-2019  sevan Use veriexec.config to reduce duplication
 1.6 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.5 14-Sep-2017  mrg branches: 1.5.2; 1.5.4; 1.5.6;
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.4 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.3 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.2 25-Jul-2017  nat Use the correct attachment for dreamcast audio.

Found and tested by Bjorn Johannesson on port-dreamcast.
 1.1 29-Dec-2016  tsutsui branches: 1.1.2; 1.1.6; 1.1.12;
WIP "G1-ATA" IDE HDD support. Not enabled by default.

Demonstrated on NetBSD booth at Open Source Conference 2016 Tokyo Fall
and Kansai Open Source 2016:
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/09/msg000721.html
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/16/msg000722.html

See my port-dreamcast@ post for more details:
http://mail-index.netbsd.org/port-dreamcast/2016/12/18/msg000295.html
 1.1.12.1 26-Jul-2017  martin Pull up following revision(s) (requested by nat in ticket #160):
sys/arch/dreamcast/conf/G1IDE: revision 1.2
sys/arch/dreamcast/conf/GENERIC: revision 1.126
sys/arch/dreamcast/dev/g2/aica.c: revision 1.23
Dreamcast audio only supports playback so set it in the props.
This makes dreamcast audio work again.
Tested by Bjorn Johannesson.
cvs: ----------------------------------------------------------------------
Use the correct attachment for dreamcast audio.
Found and tested by Bjorn Johannesson on port-dreamcast.
 1.1.6.3 28-Aug-2017  skrll Sync with HEAD
 1.1.6.2 05-Feb-2017  skrll Sync with HEAD
 1.1.6.1 29-Dec-2016  skrll file G1IDE was added on branch nick-nhusb on 2017-02-05 13:40:06 +0000
 1.1.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.2.1 29-Dec-2016  pgoyette file G1IDE was added on branch pgoyette-localcount on 2017-01-07 08:56:12 +0000
 1.5.6.1 10-Jun-2019  christos Sync with HEAD
 1.5.4.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.5.2.2 03-Dec-2017  jdolecek update from HEAD
 1.5.2.1 14-Sep-2017  jdolecek file G1IDE was added on branch tls-maxphys on 2017-12-03 11:36:00 +0000
 1.139 29-Jan-2024  christos PR/57889: Ricardo Branco: ext2fs does not have user immutable and append
file flags, only system ones. Restrict those to the superuser. Before
the behavior was controlled by EXT2FS_SYSTEM_FLAGS. Make that behavior the
default.
 1.138 12-Sep-2023  andvar double quotes should be in front of value, not property name.
fix KGDB enabled builds for dreamcast/hpcsh.
 1.137 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.136 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.135 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.134 27-Sep-2020  roy vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.133 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.132 26-Apr-2019  sevan Use veriexec.config to reduce duplication
 1.131 13-Apr-2019  isaki Add drvctl to kernel which has audio device.
audiocfg(1) requires drvctl(4).
 1.130 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.129 14-Sep-2017  mrg branches: 1.129.2; 1.129.4;
clean up COMPAT_* options for native netbsd code:
- new series of files that are useful for saying "i want everything
since netbsd 1.4", etc.
- use the fact COMPAT_* options have future dependancies to remove
many redundant options.

removes about 3000 lines total across kernel configuration files.
tested about 30 random kernels in the changed list.
 1.128 13-Sep-2017  sevan Remove support for VERIFIED_EXEC_FP_RMD160, VERIFIED_EXEC_FP_SHA1, and VERIFIED_EXEC_FP_MD5 options.
These algorithms are either broken or on their way to being broken.

Discussed on tech-security
http://mail-index.netbsd.org/tech-security/2017/08/21/msg000936.html

ok riastradh
 1.127 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.126 25-Jul-2017  nat Use the correct attachment for dreamcast audio.

Found and tested by Bjorn Johannesson on port-dreamcast.
 1.125 13-Dec-2016  christos branches: 1.125.8;
wildcard speaker attachments, now that we can handle many of them.
 1.124 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.123 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.122 07-Aug-2015  maxv branches: 1.122.2;
Remove KMEMSTATS.
 1.121 16-Nov-2014  manu branches: 1.121.2;
Remove unused extended attributes kernel options

As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
 1.120 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.119 24-Aug-2014  jnemeth Create an "options MODULAR_DEFAULT_AUTOLOAD" config option and add
it to all kernel configs that contain "options MODULAR". This
option turns on module autoloading by default (which is the current
default). This allows people who don't want module autoloading on
by default to disable it by simply removing/commentting this line.
 1.118 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.117 17-Aug-2014  joerg Reorganize symbol table embedding. The existing option SYMTAB_SPACE is
replaced by the make option COPY_SYMTAB set to any value. The copy of
the symbol table is no longer put into a buffer in kern_ksyms.o, but a
small helper object. This object is build first with a dummy size, then
the kernel is linked to compute the real dimension of the symbol table
buffer. After that, the helper object is rebuild and the kernel linked
again.
 1.116 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.115 30-Jun-2013  rmind branches: 1.115.6;
G/C PFIL_HOOKS from the kernel configs.
 1.114 05-Jun-2013  christos branches: 1.114.2;
remove obsolete networking options
 1.113 27-Apr-2013  christos the bogus number police
 1.112 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.111 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.110 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.109 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.108 17-Aug-2012  abs branches: 1.108.2;
Update all kernel configs mentioning WSEMUL_* but not already including
WSDISPLAY_COMPAT_USL using the following rules:
- If WSEMUL_ is commented out, add commented out out WSDISPLAY_COMPAT_USL
- If INSTALL or obviously memory constrained, add WSDISPLAY_DEFAULTSCREENS=1
and commented out WSDISPLAY_COMPAT_USL
- Otherwise add WSDISPLAY_COMPAT_USL

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

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

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

On 5 June 2012 09:47, David Brownlee <abs@absd.org> wrote:
> wsconscfg(8) requires WSDISPLAY_COMPAT_USL in order to switch virtual
> terminals.
>
> Except when in an exceptionally memory or space constrained
> environment (INSTALL being the obvious case), is there any reason why
> all GENERIC and GENERIC-like kernels which have wscons enabled
> shouldn't also have WSDISPLAY_COMPAT_USL?
 1.107 17-Jul-2012  abs On a system with no default writable local media, the union file system can be handy
 1.106 10-Mar-2012  joerg P1003_1B_SEMAPHORE is no longer optional.
 1.105 30-Dec-2011  he branches: 1.105.2;
Bump SYMTAB_SPACE so that the contents fits again.
 1.104 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.103 22-Nov-2011  tls branches: 1.103.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.102 18-Mar-2011  jakllsch branches: 1.102.4;
Bump symtab space.
 1.101 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.100 03-Jan-2011  tsutsui branches: 1.100.2; 1.100.4;
Xref module(7) in comments.
 1.99 23-Nov-2010  hannken Remove unused count from pseudo-device md.
 1.98 13-Oct-2010  tsutsui Add commented out options MODULAR.
 1.97 13-Oct-2010  tsutsui Include std.sh3 to pull options CPU_IN_CKSUM. Noted by Ryo SHIMIZU.
 1.96 01-Sep-2010  he Bump SYMTAB_SPACE so that it fits again.
 1.95 30-Jun-2010  he Bump SYMTAB_SPACE so that the contents fits again.
 1.94 29-Apr-2010  chs enable TMPFS in all GENERICs that have MFS enabled.
 1.93 11-Mar-2010  uwe branches: 1.93.2;
Bump SYMTAB_SPACE so that the contents fits again.
 1.92 05-Dec-2009  pooka branches: 1.92.2;
Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.91 23-Aug-2009  tsutsui Use rlphy(4) instead of ukphy(4) for BbA.
---
rtk0 at pci0 dev 0 function 0: SEGA Broadband Adapter (rev. 0x10)
rtk0: interrupting at SH4 IRL 11
rtk0: Ethernet address 00:d0:f1:03:69:68
rlphy0 at rtk0 phy 7: Realtek internal PHY
rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 1.90 24-Jan-2009  mrg add COMPAT_50 to all the configs with COMPAT_40.
 1.89 23-Dec-2008  tsutsui Remove obsolete options SYSTRACE.
 1.88 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

Proposed on tech-kern@.
 1.87 27-Sep-2008  he branches: 1.87.2; 1.87.4;
Bump SYMTAB_SPACE so that the contents fits again.
 1.86 10-Aug-2008  tls Add accept filters to GENERIC kernels where they exist.
 1.85 31-Jul-2008  simonb Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.84 30-May-2008  tsutsui branches: 1.84.4;
Add options COMPAT_40 to files which have options COMPAT_30.
 1.83 12-May-2008  he Bump SYMTAB_SPACE so that it fits again.
 1.82 25-Dec-2007  he branches: 1.82.6; 1.82.8; 1.82.10; 1.82.12;
Bump SYMTAB_SPACE so the symbol table fits again.
 1.81 04-Nov-2007  xtraeme branches: 1.81.2; 1.81.4; 1.81.8;
Remove System V semaphores and share memory options to set the limits:
SEMMNI, SEMMNS, SEMUME and SHMMAXPGS.

They can be tweaked via sysctl now. Ports that were setting values on
them weren't touched, I only removed the ones that were commented out.
 1.80 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.79 22-Sep-2007  he branches: 1.79.4;
Bump SYMTAB_SPACE so that it fits again.
cVS: ----------------------------------------------------------------------
 1.78 04-Jun-2007  martin branches: 1.78.8; 1.78.10;
Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
 1.77 13-May-2007  he Bump SYMTAB_SPACE so that it fits again.
 1.76 11-Nov-2006  jmmv branches: 1.76.2; 1.76.4; 1.76.8; 1.76.10; 1.76.16; 1.76.18;
Remove tmpfs's experimental status. OK'ed by core@.
 1.75 05-Sep-2006  uwe branches: 1.75.2; 1.75.4;
Switch dreamcast to MI todr(9).

Dreamcast does not use SuperH on-chip RTC, so do it seprately from
other sh3 ports. Convert dreamcast rtc code into a real device
instead of searching/attaching it manually.

Tested by Nick Hudson.
 1.74 26-Aug-2006  christos PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.73 26-Aug-2006  tsutsui Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.72 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.71 28-Jun-2006  liamjfoy branches: 1.71.2;
Add CARP to GENERIC kernel configs. CARP is not enabled by default.

ok: christos
 1.70 16-May-2006  he branches: 1.70.4;
Bump SYMTAB_SPACE so that it fits again.
 1.69 05-Feb-2006  cube branches: 1.69.2; 1.69.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.68 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.67 02-Feb-2006  reinoud branches: 1.67.2;
Add commented out UDF file-system entry in all GENERIC configurations.
 1.66 09-Dec-2005  elad branches: 1.66.2; 1.66.4;
Add (commented out) Veriexec options and pseudo-device to GENERIC kernels,
and remove the i386 GENERIC_VERIEXEC config.
 1.65 08-Dec-2005  he Once more bump SYMTAB_SPACE to make it fit again.
 1.64 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.63 04-Dec-2005  he Bump SYMTAB_SPACE so that it fits again.
 1.62 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.61 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.60 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.59 19-Aug-2005  christos 64 bit inode changes.
 1.58 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.57 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.56 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.55 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.54 25-Jun-2005  rpaulo branches: 1.54.2;
Add file-system PTYFS (commented out) so that people know its existence.

Ok'ed by Christos Zoulas and Hubert Feyrer.
 1.53 19-Feb-2005  tsutsui branches: 1.53.4;
- options<space><tab>
- bump SYMTAB_SPACE
 1.52 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.51 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.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 21-Jan-2005  tsutsui branches: 1.49.2;
Add options COMPAT_16 and COMPAT_20.
 1.48 17-Jan-2005  cube Add tap(4) support to a random^Wcarefully chosen set of kernel configs.
All those kernels have a line for both tun and bridge, and if either is
commented out, tap is commented out also. With the exception of i386's
GENERIC_TINY.

XXX: we _need_ some way of making this more simple.
 1.47 07-Jan-2005  tsutsui branches: 1.47.2;
Add options KLOADER, to make it easier to boot a new kernel on the console.
 1.46 10-Nov-2004  christos Add COMPAT_BSDPTY to the rest of the config files.
 1.45 04-Sep-2004  manu IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
 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 28-Jun-2004  bouyer Add options P1003_1B_SEMAPHORE
to all GENERIC-like kernel config files where SYSV* options were already
present (commented out if the SYSV* options are commented out).
Fix lib/25897 and lib/25898.
 1.42 26-Jun-2004  abs Add (commented out) ALTQ options to all GENERIC-like files
 1.41 22-Jun-2004  itojun have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
 1.40 18-Jun-2004  christos ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM
 1.39 16-Jun-2004  christos Add pseudo-device ptm on all the generic flavored kernels.
 1.38 10-Dec-2003  tsutsui branches: 1.38.2;
Bump SYMTAB_SPACE to 204800.
 1.37 24-Aug-2003  marcus Added AICA sound driver contributed by Ryo Shimizu.
 1.36 14-Jun-2003  tsutsui branches: 1.36.2;
Bump SYMTAB_SPACE to 194000.
 1.35 26-Apr-2003  ragge Add pseudo-device ksyms.
 1.34 10-Apr-2003  christos Bye Bye UCONSOLE
 1.33 02-Mar-2003  tsutsui Bump SYMTAB_SPACE to 192000.
 1.32 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.31 27-Dec-2002  tsutsui Bump SYMTAB_SPACE to 190000.
 1.30 27-Dec-2002  tsutsui Add support for SEGA LAN Adapter, MB86967 based Ethernet adapter.
Based on the patches in port-dreamcast/17493 by Christian Groessler,
with several modification by me.
 1.29 15-Nov-2002  itohy Add mmem (Maple Bus storage device) and mlcd (Maple Bus monochrome LCD).
 1.28 30-Oct-2002  tsutsui Tidy up config files:
- make GENERIC more generic
- add GENERIC_MD, which has MEMORY_DISK stuff and just includes GENERIC
- add a call of dbsym(8) in Makefile.dreamcast.inc

Approved by marcus.
 1.27 14-Oct-2002  elric Added commented out cgd(4)s to GENERIC configs.
 1.26 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.25 17-Jun-2002  lukem branches: 1.25.2;
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.24 03-May-2002  thorpej branches: 1.24.2; 1.24.4;
Move the CPU/clock/memory-related options to std.dreamcast, since
they are constant across all Dreamcast systems.
 1.23 25-Apr-2002  atatat Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.22 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.21 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.20 24-Mar-2002  uch add cpu device. sync with shb change.
 1.19 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.18 02-Mar-2002  uch Initial support for KGDB on the sh3.
 1.17 28-Feb-2002  uch Fix comment to reflect reality.
 1.16 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.15 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.14 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.13 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.12 01-Sep-2001  atatat Add bridge pseudo devices to GENERIC configs
 1.11 30-Jun-2001  darcy branches: 1.11.2;
Add System V semaphore resource limits to each GENERIC file that has an
option for System V semaphores. It appears that there are no overrides
in the code and each file has the following added.

options SYSVSEM # System V semaphores
+#options SEMMNI=10 # number of semaphore identifiers
+#options SEMMNS=60 # number of semaphores in system
+#options SEMUME=10 # max number of undo entries per process
+#options SEMMNU=30 # number of undo structures in system
options SYSVSHM # System V shared memory

If anyone thinks that this is incorrect for any of these files, please
correct it.

Note - the i386 port was not forgotten. It was done separately.
 1.10 24-Jun-2001  msaitoh trim PCLOCK to 49.9MHz
 1.9 14-Feb-2001  itojun have rnd(4)
 1.8 03-Feb-2001  marcus Increased HZ to 100.
 1.7 01-Feb-2001  thorpej Use the BOLD8x16 font for the console, and remove the RCONS_16BPP
option (no longer needed).
 1.6 01-Feb-2001  thorpej Add configuration info for the SEGA Broadband Adapter,
and enable the NFS file system and DHCP NFS root support.
 1.5 31-Jan-2001  thorpej Make the "maple" bus a direct config bus. Now, when a device is
not configured into the kernel, you know about it, e.g.:

Dreamcast Controller at maple0 port 0 not configured
 1.4 21-Jan-2001  marcus Added GDROM device.
 1.3 16-Jan-2001  marcus WSCONS console added.
 1.2 03-Jan-2001  itojun branches: 1.2.2;
share sys/arch/sh3/conf/Makefile.sh3 across sh3-based architectures.
cleanup param.h a bit.
 1.1 11-Dec-2000  marcus Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.2.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.2.2.1 03-Jan-2001  bouyer file GENERIC was added on branch thorpej_scsipi on 2001-01-08 14:56:16 +0000
 1.11.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.11.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.11.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.11.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.11.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.24.4.1 01-Aug-2002  lukem Pull up revision 1.25 (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.24.2.1 14-Jul-2002  gehenna catch up with -current.
 1.25.2.5 29-Dec-2002  thorpej Sync with HEAD.
 1.25.2.4 11-Dec-2002  thorpej Sync with HEAD.
 1.25.2.3 11-Nov-2002  nathanw Catch up to -current
 1.25.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.25.2.1 17-Jun-2002  nathanw file GENERIC was added on branch nathanw_sa on 2002-10-18 02:36:19 +0000
 1.36.2.11 11-Dec-2005  christos Sync with head.
 1.36.2.10 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.36.2.9 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.36.2.8 15-Feb-2005  skrll Sync with HEAD.
 1.36.2.7 04-Feb-2005  skrll Sync with HEAD.
 1.36.2.6 24-Jan-2005  skrll Sync with HEAD.
 1.36.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.36.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.36.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.36.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.36.2.1 03-Aug-2004  skrll Sync with HEAD
 1.38.2.3 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.38.2.2 02-Jul-2004  he Pull up revision 1.43 (requested by bouyer in ticket #573):
Add options P1003_1B_SEMAPHORE to all GENERIC-like kernel
config files where SYSV* options were already present
(commented out if the SYSV* options are commented out).
Fixes PR#25897 and PR#25898.
 1.38.2.1 30-Jun-2004  jdc Pull up revision 1.42 (requested by abs in ticket #567).

Add (commented out) ALTQ options to all GENERIC-like files
 1.47.2.1 29-Apr-2005  kent sync with -current
 1.49.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.49.2.1 12-Feb-2005  yamt sync with head.
 1.53.4.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.53.4.2 14-Aug-2005  riz Pull up revision 1.56 (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.53.4.1 18-Jul-2005  riz Pull up revision 1.55 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.54.2.6 21-Jan-2008  yamt sync with head
 1.54.2.5 15-Nov-2007  yamt sync with head.
 1.54.2.4 27-Oct-2007  yamt sync with head.
 1.54.2.3 03-Sep-2007  yamt sync with head.
 1.54.2.2 30-Dec-2006  yamt sync with head.
 1.54.2.1 21-Jun-2006  yamt sync with head.
 1.66.4.1 09-Sep-2006  rpaulo sync with head
 1.66.2.1 18-Feb-2006  yamt sync with head.
 1.67.2.2 01-Jun-2006  kardel Sync with head.
 1.67.2.1 22-Apr-2006  simonb Sync with head.
 1.69.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.69.2.4 14-Sep-2006  yamt sync with head.
 1.69.2.3 03-Sep-2006  yamt sync with head.
 1.69.2.2 11-Aug-2006  yamt sync with head
 1.69.2.1 24-May-2006  yamt sync with head.
 1.70.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.71.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.71.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.75.4.1 10-Dec-2006  yamt sync with head.
 1.75.2.1 18-Nov-2006  ad Sync with head.
 1.76.18.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.76.16.3 03-Oct-2007  garbled Sync with HEAD
 1.76.16.2 26-Jun-2007  garbled Sync with HEAD.
 1.76.16.1 22-May-2007  matt Update to HEAD.
 1.76.10.1 11-Jul-2007  mjf Sync with head.
 1.76.8.4 03-Dec-2007  ad Sync with HEAD.
 1.76.8.3 09-Oct-2007  ad Sync with head.
 1.76.8.2 09-Jun-2007  ad Sync with head.
 1.76.8.1 27-May-2007  ad Sync with head.
 1.76.4.1 17-May-2007  yamt sync with head.
 1.76.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.78.10.2 09-Jan-2008  matt sync with HEAD
 1.78.10.1 06-Nov-2007  matt sync with HEAD
 1.78.8.2 04-Nov-2007  jmcneill Sync with HEAD.
 1.78.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.79.4.1 13-Nov-2007  bouyer Sync with HEAD
 1.81.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.81.4.1 26-Dec-2007  ad Sync with head.
 1.81.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.82.12.3 10-Oct-2008  skrll Sync with HEAD.
 1.82.12.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.82.12.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.82.10.6 09-Oct-2010  yamt sync with head
 1.82.10.5 11-Aug-2010  yamt sync with head.
 1.82.10.4 11-Mar-2010  yamt sync with head
 1.82.10.3 16-Sep-2009  yamt sync with head
 1.82.10.2 04-May-2009  yamt sync with head.
 1.82.10.1 16-May-2008  yamt sync with head.
 1.82.8.2 04-Jun-2008  yamt sync with head
 1.82.8.1 18-May-2008  yamt sync with head.
 1.82.6.4 17-Jan-2009  mjf Sync with HEAD.
 1.82.6.3 05-Oct-2008  mjf Sync with HEAD.
 1.82.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.82.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.84.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.84.4.1 19-Oct-2008  haad Sync with HEAD.
 1.87.4.1 27-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #208):
sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.8
sys/arch/dreamcast/conf/GENERIC: revision 1.89
Remove obsolete options SYSTRACE.
 1.87.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.87.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.92.2.3 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.92.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.92.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.93.2.4 21-Apr-2011  rmind sync with head
 1.93.2.3 05-Mar-2011  rmind sync with head
 1.93.2.2 03-Jul-2010  rmind sync with head
 1.93.2.1 30-May-2010  rmind sync with head
 1.100.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.100.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.102.4.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.102.4.2 30-Oct-2012  yamt sync with head
 1.102.4.1 17-Apr-2012  yamt sync with head
 1.103.2.2 11-Mar-2012  mrg sync to latest -current
 1.103.2.1 18-Feb-2012  mrg merge to -current.
 1.105.2.1 20-Jul-2012  riz Pull up following revision(s) (requested by abs in ticket #422):
sys/arch/dreamcast/conf/GENERIC: revision 1.107
On a system with no default writable local media, the union file
system can be handy
 1.108.2.4 03-Dec-2017  jdolecek update from HEAD
 1.108.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.108.2.2 23-Jun-2013  tls resync from head
 1.108.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.114.2.1 28-Aug-2013  rmind sync with head
 1.115.6.3 15-May-2015  snj Pull up following revision(s) (requested by jnemeth in ticket #762):
share/man/man4/options.4: revision 1.442
sys/arch/amd64/conf/ALL: revision 1.18
sys/arch/amd64/conf/GENERIC: revision 1.396
sys/arch/dreamcast/conf/GENERIC: revision 1.119
sys/arch/epoc32/conf/GENERIC: revision 1.6
sys/arch/evbarm/conf/BCM5301X: revision 1.24
sys/arch/evbarm/conf/BCM56340: revision 1.9
sys/arch/evbarm/conf/IMX23_OLINUXINO: revision 1.9
sys/arch/evbarm/conf/std.beagle: revision 1.13
sys/arch/evbarm/conf/std.kobo: revision 1.2
sys/arch/evbarm/conf/std.netwalker: revision 1.10
sys/arch/evbppc/conf/P2020DS: revision 1.25
sys/arch/evbppc/conf/RB800: revision 1.30
sys/arch/evbppc/conf/TWRP1025: revision 1.18
sys/arch/hp300/conf/GENERIC: revision 1.187
sys/arch/hpcsh/conf/GENERIC: revision 1.104
sys/arch/i386/conf/GENERIC: revision 1.1111
sys/arch/i386/conf/MONOLITHIC: revision 1.17
sys/arch/landisk/conf/GENERIC: revision 1.43
sys/arch/luna68k/conf/GENERIC: revision 1.117
sys/arch/macppc/conf/GENERIC: revision 1.316
sys/arch/macppc/conf/GENERIC_601: revision 1.5
sys/arch/mmeye/conf/MMEYE_WLF: revision 1.16
sys/arch/news68k/conf/GENERIC: revision 1.123
sys/arch/sandpoint/conf/GENERIC: revision 1.85
sys/arch/shark/conf/GENERIC: revision 1.119
sys/arch/sparc/conf/GENERIC: revision 1.246
sys/arch/sparc64/conf/GENERIC: revision 1.174
sys/arch/sun3/conf/GENERIC3X: revision 1.125
sys/arch/sun3/conf/GENERIC: revision 1.169
sys/arch/x68k/conf/GENERIC: revision 1.177
sys/arch/zaurus/conf/GENERIC: revision 1.62
sys/conf/files: revision 1.1099
sys/kern/kern_module.c: revisions 1.98, 1.99
Create an "options MODULAR_DEFAULT_AUTOLOAD" config option and add
it to all kernel configs that contain "options MODULAR". This
option turns on module autoloading by default (which is the current
default). This allows people who don't want module autoloading on
by default to disable it by simply removing/commentting this line.
--
fix typo. (s/MODULE_DEFAULT_AUTOLOAD/MODULAR_DEFAULT_AUTOLOAD/)
 1.115.6.2 18-Nov-2014  snj Pull up following revision(s) (requested by manu in ticket #251):
sys/arch/acorn26/conf/GENERIC: revision 1.81
sys/arch/acorn32/conf/GENERIC: revision 1.116
sys/arch/alpha/conf/GENERIC: revision 1.362
sys/arch/amd64/conf/ALL: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.404
sys/arch/amd64/conf/XEN3_DOM0: revision 1.112
sys/arch/amd64/conf/XEN3_DOMU: revision 1.60
sys/arch/amiga/conf/GENERIC.in: revision 1.129
sys/arch/amiga/conf/GENERIC: revision 1.311
sys/arch/amigappc/conf/GENERIC: revision 1.24
sys/arch/arc/conf/GENERIC: revision 1.184
sys/arch/bebox/conf/GENERIC: revision 1.145
sys/arch/cats/conf/GENERIC: revision 1.155
sys/arch/cesfic/conf/GENERIC: revision 1.65
sys/arch/cobalt/conf/GENERIC: revision 1.147
sys/arch/dreamcast/conf/GENERIC: revision 1.121
sys/arch/emips/conf/GENERIC: revision 1.15
sys/arch/epoc32/conf/GENERIC: revision 1.8
sys/arch/ews4800mips/conf/GENERIC: revision 1.51
sys/arch/hp300/conf/GENERIC: revision 1.190
sys/arch/hpcmips/conf/GENERIC: revision 1.229
sys/arch/hpcsh/conf/GENERIC: revision 1.106
sys/arch/hppa/conf/GENERIC: revision 1.6
sys/arch/i386/conf/ALL: revision 1.389
sys/arch/i386/conf/GENERIC: revision 1.1118
sys/arch/i386/conf/XEN3_DOM0: revision 1.93
sys/arch/i386/conf/XEN3_DOMU: revision 1.65
sys/arch/ibmnws/conf/GENERIC: revision 1.46
sys/arch/iyonix/conf/GENERIC: revision 1.88
sys/arch/landisk/conf/GENERIC: revision 1.45
sys/arch/luna68k/conf/GENERIC: revision 1.119
sys/arch/mac68k/conf/GENERIC: revision 1.220
sys/arch/macppc/conf/GENERIC: revision 1.320
sys/arch/macppc/conf/MAMBO: revision 1.24
sys/arch/macppc/conf/POWERMAC_G5: revision 1.25
sys/arch/mipsco/conf/GENERIC: revision 1.88
sys/arch/mmeye/conf/GENERIC: revision 1.120
sys/arch/mvme68k/conf/GENERIC: revision 1.94
sys/arch/mvmeppc/conf/GENERIC: revision 1.24
sys/arch/netwinder/conf/GENERIC: revision 1.126
sys/arch/news68k/conf/GENERIC: revision 1.125
sys/arch/newsmips/conf/GENERIC: revision 1.129
sys/arch/next68k/conf/GENERIC: revision 1.139
sys/arch/ofppc/conf/GENERIC: revision 1.157
sys/arch/pmax/conf/GENERIC64: revision 1.21
sys/arch/pmax/conf/GENERIC: revision 1.185
sys/arch/prep/conf/GENERIC: revision 1.174
sys/arch/rs6000/conf/GENERIC: revision 1.33
sys/arch/sandpoint/conf/GENERIC: revision 1.88
sys/arch/sbmips/conf/GENERIC: revision 1.101
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.28
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.104
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.106
sys/arch/shark/conf/GENERIC: revision 1.121
sys/arch/sparc/conf/GENERIC: revision 1.248
sys/arch/sparc/conf/TADPOLE3GX: revision 1.65
sys/arch/sparc64/conf/GENERIC: revision 1.177
sys/arch/sparc64/conf/NONPLUS64: revision 1.44
sys/arch/sun2/conf/GENERIC: revision 1.94
sys/arch/sun3/conf/GENERIC: revision 1.171
sys/arch/vax/conf/GENERIC: revision 1.193
sys/arch/vax/conf/VAX780: revision 1.19
sys/arch/x68k/conf/GENERIC: revision 1.179
sys/arch/zaurus/conf/GENERIC: revision 1.65
sys/ufs/files.ufs: revision 1.38
Remove unused extended attributes kernel options

As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
 1.115.6.1 14-Nov-2014  martin Pull up following revision(s) (requested by manu in ticket #232):
sys/arch/next68k/conf/GENERIC: revision 1.138
sys/arch/cobalt/conf/GENERIC: revision 1.146
sys/arch/mvme68k/conf/GENERIC: revision 1.93
sys/arch/vax/conf/VAX780: revision 1.18
sys/arch/newsmips/conf/GENERIC: revision 1.128
sys/arch/luna68k/conf/GENERIC: revision 1.118
sys/arch/sbmips/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.184
sys/arch/alpha/conf/GENERIC: revision 1.361
sys/arch/sparc64/conf/GENERIC: revision 1.176
sys/arch/sun3/conf/GENERIC: revision 1.170
sys/arch/shark/conf/GENERIC: revision 1.120
sys/arch/landisk/conf/GENERIC: revision 1.44
sys/arch/bebox/conf/GENERIC: revision 1.144
sys/arch/sparc64/conf/NONPLUS64: revision 1.43
sys/arch/sandpoint/conf/GENERIC: revision 1.87
sys/arch/emips/conf/GENERIC: revision 1.14
sys/arch/amd64/conf/XEN3_DOM0: revision 1.111
sys/arch/dreamcast/conf/GENERIC: revision 1.120
sys/arch/cesfic/conf/GENERIC: revision 1.64
sys/arch/mmeye/conf/GENERIC: revision 1.119
sys/arch/epoc32/conf/GENERIC: revision 1.7
sys/arch/x68k/conf/GENERIC: revision 1.178
sys/arch/iyonix/conf/GENERIC: revision 1.87
sys/arch/sun2/conf/GENERIC: revision 1.93
sys/arch/ews4800mips/conf/GENERIC: revision 1.50
sys/arch/amd64/conf/XEN3_DOMU: revision 1.59
sys/arch/acorn26/conf/GENERIC: revision 1.80
sys/arch/acorn32/conf/GENERIC: revision 1.115
sys/arch/macppc/conf/POWERMAC_G5: revision 1.24
sys/arch/i386/conf/GENERIC: revision 1.1117
sys/arch/arc/conf/GENERIC: revision 1.183
sys/arch/cats/conf/GENERIC: revision 1.154
sys/arch/amiga/conf/GENERIC.in: revision 1.128
sys/arch/zaurus/conf/GENERIC: revision 1.64
sys/arch/netwinder/conf/GENERIC: revision 1.125
sys/arch/hppa/conf/GENERIC: revision 1.5
sys/arch/mvmeppc/conf/GENERIC: revision 1.23
sys/arch/macppc/conf/GENERIC: revision 1.319
sys/arch/amiga/conf/GENERIC: revision 1.310
sys/arch/pmax/conf/GENERIC64: revision 1.20
sys/arch/macppc/conf/MAMBO: revision 1.23
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.27
sys/arch/amigappc/conf/GENERIC: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.403
sys/arch/ofppc/conf/GENERIC: revision 1.156
sys/arch/mac68k/conf/GENERIC: revision 1.219
sys/arch/i386/conf/XEN3_DOMU: revision 1.64
sys/arch/mipsco/conf/GENERIC: revision 1.87
sys/arch/hp300/conf/GENERIC: revision 1.189
sys/arch/vax/conf/GENERIC: revision 1.192
sys/arch/news68k/conf/GENERIC: revision 1.124
sys/arch/ibmnws/conf/GENERIC: revision 1.45
sys/arch/hpcsh/conf/GENERIC: revision 1.105
sys/arch/sparc/conf/TADPOLE3GX: revision 1.64
sys/arch/i386/conf/XEN3_DOM0: revision 1.92
sys/arch/sparc/conf/GENERIC: revision 1.247
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.105
sys/arch/prep/conf/GENERIC: revision 1.173
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.103
sys/arch/rs6000/conf/GENERIC: revision 1.32
sys/arch/hpcmips/conf/GENERIC: revision 1.228
Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels
This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr
Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
 1.121.2.3 28-Aug-2017  skrll Sync with HEAD
 1.121.2.2 05-Feb-2017  skrll Sync with HEAD
 1.121.2.1 22-Sep-2015  skrll Sync with HEAD
 1.122.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.125.8.1 26-Jul-2017  martin Pull up following revision(s) (requested by nat in ticket #160):
sys/arch/dreamcast/conf/G1IDE: revision 1.2
sys/arch/dreamcast/conf/GENERIC: revision 1.126
sys/arch/dreamcast/dev/g2/aica.c: revision 1.23
Dreamcast audio only supports playback so set it in the props.
This makes dreamcast audio work again.
Tested by Bjorn Johannesson.
cvs: ----------------------------------------------------------------------
Use the correct attachment for dreamcast audio.
Found and tested by Bjorn Johannesson on port-dreamcast.
 1.129.4.1 10-Jun-2019  christos Sync with HEAD
 1.129.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2 29-Feb-2008  jmmv Remove GENERIC.local from the repository

Make all the kernels that currently include their corresponding GENERIC.local
file use the cinclude directive instead of include. This way config(1) will
not complain if the file cannot be found.

After doing this, remove the GENERIC.local files from the repository so that
the user will not see modified files during updates, and local changes to
them cannot end up in the repository by mistake.

Discussed in tech-kern@ earlier this month. No strong objections.
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.42; 1.1.104; 1.1.124; 1.1.128;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.128.1 03-Apr-2008  mjf Sync with HEAD.
 1.1.124.1 24-Mar-2008  keiichi sync with head.
 1.1.104.1 23-Mar-2008  matt sync with HEAD
 1.1.42.1 17-Mar-2008  yamt sync with head.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file GENERIC.local was added on branch thorpej_scsipi on 2001-01-08 14:56:17 +0000
 1.2 06-Feb-2009  jym 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.1 30-Oct-2002  tsutsui branches: 1.1.2; 1.1.114; 1.1.122;
Tidy up config files:
- make GENERIC more generic
- add GENERIC_MD, which has MEMORY_DISK stuff and just includes GENERIC
- add a call of dbsym(8) in Makefile.dreamcast.inc

Approved by marcus.
 1.1.122.1 03-Mar-2009  skrll Sync with HEAD.
 1.1.114.1 04-May-2009  yamt sync with head.
 1.1.2.2 11-Nov-2002  nathanw Catch up to -current
 1.1.2.1 30-Oct-2002  nathanw file GENERIC_MD was added on branch nathanw_sa on 2002-11-11 21:57:50 +0000
 1.3 03-Jan-2001  itojun share sys/arch/sh3/conf/Makefile.sh3 across sh3-based architectures.
cleanup param.h a bit.
 1.2 17-Dec-2000  jdolecek delete obsolete comment
 1.1 11-Dec-2000  marcus Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.11 04-Oct-2010  tsutsui Build a raw binary format GENERIC kernel and put it into distribution dir.
This would make it possible to create a bootable CD using root on gdrom
without toolchain (i.e. without whole src tree).
 1.10 06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.9 24-Nov-2005  dbj branches: 1.9.78; 1.9.98; 1.9.100;
. Have dbsym explicitly suggest increasing SYMTAB_SPACE when
an overflow occurs.
. Make this error a fatal build time error
. Move the support for dbsym into the MI Makefile.kern.inc,
conditional upon the SYMTAB_SPACE option being defined in
the kernel config file.
 1.8 30-Oct-2002  tsutsui branches: 1.8.6; 1.8.12; 1.8.22; 1.8.28;
Tidy up config files:
- make GENERIC more generic
- add GENERIC_MD, which has MEMORY_DISK stuff and just includes GENERIC
- add a call of dbsym(8) in Makefile.dreamcast.inc

Approved by marcus.
 1.7 09-Dec-2001  atatat branches: 1.7.12;
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.6 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.5 23-Oct-2001  thorpej No need to set MACHINE now that config(8) sets it.
 1.4 14-Feb-2001  msaitoh branches: 1.4.4;
sync with Makefile.mmeye.in for ELF
 1.3 04-Jan-2001  itojun branches: 1.3.2;
split MACHINE_ARCH sh3e[lb]. userland build still needs checking.
 1.2 03-Jan-2001  itojun $NetBSD$
 1.1 03-Jan-2001  itojun share sys/arch/sh3/conf/Makefile.sh3 across sh3-based architectures.
cleanup param.h a bit.
 1.3.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.3.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.3.2.1 04-Jan-2001  bouyer file Makefile.dreamcast.inc was added on branch thorpej_scsipi on 2001-01-08 14:56:17 +0000
 1.4.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.12.2 22-Jun-2002  thorpej Add support for dbsym'ing the kernel.
 1.7.12.1 09-Dec-2001  thorpej file Makefile.dreamcast.inc was added on branch nathanw_sa on 2002-06-22 04:17:45 +0000
 1.8.28.1 29-Nov-2005  yamt sync with head.
 1.8.22.1 21-Jun-2006  yamt sync with head.
 1.8.12.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.8.6.1 11-Dec-2005  christos Sync with head.
 1.9.100.1 05-Mar-2011  rmind sync with head
 1.9.98.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.9.98.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.9.78.2 09-Oct-2010  yamt sync with head
 1.9.78.1 11-Aug-2010  yamt sync with head.
 1.32 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.31 29-Dec-2016  tsutsui branches: 1.31.16; 1.31.18;
WIP "G1-ATA" IDE HDD support. Not enabled by default.

Demonstrated on NetBSD booth at Open Source Conference 2016 Tokyo Fall
and Kansai Open Source 2016:
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/09/msg000721.html
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/16/msg000722.html

See my port-dreamcast@ post for more details:
http://mail-index.netbsd.org/port-dreamcast/2016/12/18/msg000295.html
 1.30 20-Feb-2008  drochner branches: 1.30.54; 1.30.74; 1.30.78;
Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
 1.29 10-Apr-2007  macallan branches: 1.29.14;
include files.wsfb
 1.28 05-Sep-2006  uwe branches: 1.28.8; 1.28.12; 1.28.14;
Switch dreamcast to MI todr(9).

Dreamcast does not use SuperH on-chip RTC, so do it seprately from
other sh3 ports. Convert dreamcast rtc code into a real device
instead of searching/attaching it manually.

Tested by Nick Hudson.
 1.27 11-Dec-2005  christos branches: 1.27.4; 1.27.8;
merge ktrace-lwp.
 1.26 06-Jul-2004  uch branches: 1.26.12;
MI part of kloader moved to dev/kloader.c from arch/hpc/hpc/
dreamcast and playstation2 port are changed to use this.
 1.25 24-Aug-2003  marcus Added AICA sound driver contributed by Ryo Shimizu.
 1.24 14-Jun-2003  tsutsui branches: 1.24.2;
Add kloader (in-kernel kernel bootloader) support written by
UCHIYAMA Yasushi (uch@netbsd).

XXX Some of these code should be moved into MI place to share
XXX between other ports.
 1.23 27-Dec-2002  tsutsui Add support for SEGA LAN Adapter, MB86967 based Ethernet adapter.
Based on the patches in port-dreamcast/17493 by Christian Groessler,
with several modification by me.
 1.22 19-Nov-2002  itohy maxpartitions 8 -> 16 (the value MAXPARTITIONS in <machine/disklabel.h>)
 1.21 15-Nov-2002  itohy Add mmem (Maple Bus storage device) and mlcd (Maple Bus monochrome LCD).
 1.20 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.19 16-Apr-2002  thorpej branches: 1.19.2; 1.19.6;
* Move the mii_bitbang attribute into dev/mii/files.mii
* Pull in dev/mii/files.mii from conf/files, rather than playing
the magic "files include order" dance in N machine-dependent
configuration definitions.
 1.18 27-Mar-2002  uch All the sh3 ports had an identical procfs_machdep.c, so use a common
file under arch/sh3/sh3.
 1.17 24-Mar-2002  uch add cpu device. sync with shb change.
 1.16 08-Mar-2002  uch remove unneeded code and files.
 1.15 22-Feb-2002  uch New NetBSD/sh3 clock framework.
+ hardclock source is moved from TMU1 to TMU0.
+ SH3/SH4 common kernel support.
+ PCLOCK estimation.
+ remove duplicated code.
 1.14 20-Nov-2001  lukem - replace "defopt" with "defparam" for options which must take a value,
as config(8) will warn for value-less defparam options
- minor whitespace/formatting cleanup
- consolidate opt_tcp_recvspace.h and opt_tcp_sendspace.h into opt_tcp_space.h
 1.13 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.12 06-Sep-2001  thorpej Driver for the Dreamcast mouse, based on the programming info
on Marcus's web site.

Not yet thoroughly tested, but does appear to generate events
that look okay.
 1.11 26-May-2001  marcus branches: 1.11.2;
Changed maple device to attach per function instead of per unit.
Raw maple unit access is now possible through /dev/maple*.
 1.10 23-Apr-2001  uch dreamcast clock module was separated.
 1.9 21-Feb-2001  uch branches: 1.9.2;
move disksubr.c define to machine-port.
 1.8 06-Feb-2001  uch move machine-port specific file to machine directory.
for evbsh3, mmeye and dreamcast, use MI md_root.c
 1.7 01-Feb-2001  thorpej Config glue for rasops/wsfont.
 1.6 31-Jan-2001  thorpej G2/GAPS PCI configuration glue, for the Broadband Adapter.
 1.5 31-Jan-2001  thorpej Make the "maple" bus a direct config bus. Now, when a device is
not configured into the kernel, you know about it, e.g.:

Dreamcast Controller at maple0 port 0 not configured
 1.4 21-Jan-2001  marcus Added GDROM device.
 1.3 17-Jan-2001  fvdl Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
 1.2 16-Jan-2001  marcus WSCONS console added.
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file files.dreamcast was added on branch thorpej_scsipi on 2001-01-08 14:56:18 +0000
 1.9.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.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.11.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.11.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.19.6.4 29-Dec-2002  thorpej Sync with HEAD.
 1.19.6.3 11-Dec-2002  thorpej Sync with HEAD.
 1.19.6.2 17-Sep-2002  nathanw Catch up to -current.
 1.19.6.1 16-Apr-2002  nathanw file files.dreamcast was added on branch nathanw_sa on 2002-09-17 21:14:10 +0000
 1.19.2.2 17-May-2002  gehenna Remove old block majors list.
 1.19.2.1 16-May-2002  gehenna Include the list of block/character major numbers.
 1.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.12.3 27-Feb-2008  yamt sync with head.
 1.26.12.2 03-Sep-2007  yamt sync with head.
 1.26.12.1 30-Dec-2006  yamt sync with head.
 1.27.8.1 14-Sep-2006  yamt sync with head.
 1.27.4.1 09-Sep-2006  rpaulo sync with head
 1.28.14.1 11-Jul-2007  mjf Sync with head.
 1.28.12.1 10-Apr-2007  ad Sync with head.
 1.28.8.1 15-Apr-2007  yamt sync with head.
 1.29.14.1 23-Mar-2008  matt sync with HEAD
 1.30.78.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.30.74.1 05-Feb-2017  skrll Sync with HEAD
 1.30.54.1 03-Dec-2017  jdolecek update from HEAD
 1.31.18.1 05-May-2019  isaki Remove obsoleted au{,rate,vol}conv and mulaw attributes.
audio provides the equivalent of them inseparably.
 1.31.16.1 10-Jun-2019  christos Sync with HEAD
 1.7 24-Mar-2002  uch branches: 1.7.4;
adapted to new interrupt code and shb changes.
 1.6 03-Mar-2002  uch remove unneeded configuration.
 1.5 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.4 20-Nov-2001  lukem - replace "defopt" with "defparam" for options which must take a value,
as config(8) will warn for value-less defparam options
- minor whitespace/formatting cleanup
- consolidate opt_tcp_recvspace.h and opt_tcp_sendspace.h into opt_tcp_space.h
 1.3 22-Aug-2001  msaitoh devclass of sci[f] is tty
 1.2 24-Apr-2001  marcus branches: 1.2.2;
Abstracted handling of System ASIC controlled IRQ:s a little.
Three different IRQ:s can be selected for each event, 9, 11, or 13
(which selects hardware priority). More events to be added as they
are discovered. Do not use shb_intr_establish() to register IRQ 9, 11
or 13 anymore.
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.4;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file files.shbus was added on branch thorpej_scsipi on 2001-01-08 14:56:18 +0000
 1.2.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.7.4.2 24-Mar-2002  uch adapted to new interrupt code and shb changes.
 1.7.4.1 24-Mar-2002  uch file files.shbus was added on branch nathanw_sa on 2002-03-24 18:21:11 +0000
 1.26 25-Nov-2020  tsutsui Reserve device-major for ld(4) on possible sdmmc(4) at scimci.

https://mail-index.netbsd.org/port-dreamcast/2014/10/25/msg000263.html
https://mail-index.netbsd.org/port-dreamcast/2014/10/30/msg000265.html
 1.25 04-Apr-2020  jdolecek branches: 1.25.4;
mark nsmb major obsolete
 1.24 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.23 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.22 30-Jun-2011  wiz branches: 1.22.52; 1.22.54;
dependant -> dependent
 1.21 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.20 31-Dec-2007  ad branches: 1.20.6; 1.20.10; 1.20.16; 1.20.18;
Remove systrace. Ok core@.
 1.19 24-Nov-2006  wiz branches: 1.19.28; 1.19.34; 1.19.42;
s/independant/independent/, from Zafer.
 1.18 11-Dec-2005  christos branches: 1.18.20; 1.18.22;
merge ktrace-lwp.
 1.17 17-Sep-2005  yamt make VMSWAP optional again.
 1.16 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.15 30-Jul-2005  yamt defflag VMSWAP.
 1.14 10-May-2005  jdolecek branches: 1.14.2;
assign major for nsmb(4)
 1.13 10-Dec-2003  jmc Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
 1.12 24-Oct-2003  jdolecek add major for sci
 1.11 22-Oct-2003  jdolecek add wsfont major to archs which have the other wscons devices
 1.10 10-Oct-2003  jdolecek reassing majors for crypto and pf to use the newly defined MI major
range
 1.9 10-Oct-2003  jdolecek update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
 1.8 05-Oct-2003  jdolecek Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

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

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

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 16-May-2002  gehenna branches: 1.1.2; 1.1.4;
file majors.dreamcast was initially added on branch gehenna-devsw.
 1.1.4.3 11-Dec-2002  thorpej Sync with HEAD.
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 17-Sep-2002  nathanw Catch up to -current.
 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.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.dreamcast was added on branch kqueue on 2002-10-10 18:32:20 +0000
 1.5.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.2.3 21-Jan-2008  yamt sync with head
 1.14.2.2 30-Dec-2006  yamt sync with head.
 1.14.2.1 21-Jun-2006  yamt sync with head.
 1.18.22.1 10-Dec-2006  yamt sync with head.
 1.18.20.1 12-Jan-2007  ad Sync with head.
 1.19.42.1 02-Jan-2008  bouyer Sync with HEAD
 1.19.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.19.28.1 09-Jan-2008  matt sync with HEAD
 1.20.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.20.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.20.10.1 04-May-2009  yamt sync with head.
 1.20.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.22.54.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.22.54.1 10-Jun-2019  christos Sync with HEAD
 1.22.52.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.25.4.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.9 24-Aug-2015  uebayasi Don't mention stab and DWARF sections, because these (poorly mtaintained)
lists only help to make them harder to read.

If those sections are found in inputs, they simply appear in outputs as
orphaned sections, sorted by section types and attributes.
 1.8 20-Aug-2015  uebayasi Kill trailing blank lines.
 1.7 25-Apr-2002  uch branches: 1.7.6; 1.7.162; 1.7.182;
switch to NEW_TOOLCHAIN
 1.6 02-Mar-2002  uch Initial support for KGDB on the sh3.
 1.5 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.4 03-Mar-2001  marcus branches: 1.4.4;
Support cross-compilers that add the underscore for a little longer.
This _will_ go away.
 1.3 01-Mar-2001  marcus Kernel binary format is hereby officially changed to ELF32.
 1.2 05-Jan-2001  marcus branches: 1.2.2;
Updated linker script set include only RAM based image for Dreamcast.
 1.1 11-Dec-2000  marcus Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.2.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.2.2.1 05-Jan-2001  bouyer file shl.x was added on branch thorpej_scsipi on 2001-01-08 14:56:18 +0000
 1.4.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.4.2 16-Mar-2002  jdolecek Catch up with -current.
 1.4.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.182.1 22-Sep-2015  skrll Sync with HEAD
 1.7.162.1 03-Dec-2017  jdolecek update from HEAD
 1.7.6.2 25-Apr-2002  uch switch to NEW_TOOLCHAIN
 1.7.6.1 25-Apr-2002  uch file shl.x was added on branch nathanw_sa on 2002-04-25 17:02:42 +0000
 1.2 05-Jan-2001  marcus Updated linker script set include only RAM based image for Dreamcast.
 1.1 11-Dec-2000  marcus Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.2 05-Jan-2001  marcus Updated linker script set include only RAM based image for Dreamcast.
 1.1 11-Dec-2000  marcus Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.2 05-Jan-2001  marcus Updated linker script set include only RAM based image for Dreamcast.
 1.1 11-Dec-2000  marcus Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.9 13-Oct-2010  tsutsui Include std.sh3 to pull options CPU_IN_CKSUM. Noted by Ryo SHIMIZU.
 1.8 17-Mar-2006  uebayasi branches: 1.8.86; 1.8.88;
Stop using linker scripts on all sh3 ports.

The only information to be compensated is text section start address.
The default value is set arch-wise as DEFTEXTADDR. Each kernel config
can override the default value by setting TEXTADDR.

Tested on COMPUTEXEVB (evbsh3).

Reviewed By: uwe
 1.7 11-Dec-2005  christos branches: 1.7.4; 1.7.6; 1.7.8; 1.7.10; 1.7.12;
merge ktrace-lwp.
 1.6 17-Sep-2005  yamt include "conf/std".
 1.5 09-May-2002  uch branches: 1.5.6; 1.5.12; 1.5.28;
IOM_RAM_BEGIN is changed to specify physical address.
 1.4 03-May-2002  thorpej Move the CPU/clock/memory-related options to std.dreamcast, since
they are constant across all Dreamcast systems.
 1.3 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.2 03-Jan-2001  itojun branches: 1.2.2; 1.2.6;
share sys/arch/sh3/conf/Makefile.sh3 across sh3-based architectures.
cleanup param.h a bit.
 1.1 11-Dec-2000  marcus Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.2.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.2.2.1 03-Jan-2001  bouyer file std.dreamcast was added on branch thorpej_scsipi on 2001-01-08 14:56:19 +0000
 1.5.28.1 21-Jun-2006  yamt sync with head.
 1.5.12.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.6.2 09-May-2002  uch IOM_RAM_BEGIN is changed to specify physical address.
 1.5.6.1 09-May-2002  uch file std.dreamcast was added on branch nathanw_sa on 2002-05-09 12:32:33 +0000
 1.7.12.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.7.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.7.8.1 01-Apr-2006  yamt sync with head.
 1.7.6.1 22-Apr-2006  simonb Sync with head.
 1.7.4.1 09-Sep-2006  rpaulo sync with head
 1.8.88.1 05-Mar-2011  rmind sync with head
 1.8.86.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.42 13-Mar-2016  christos PR/50964: David Binderman: Avoid signed overflow warning
 1.41 26-Apr-2015  mlelstv Use C99-style initializers for struct dkdriver.
 1.40 25-Jul-2014  dholland branches: 1.40.4;
Add d_discard to all struct cdevsw instances I could find.

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

I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
 1.38 18-Mar-2014  martin branches: 1.38.2;
Fix typo
 1.37 16-Mar-2014  dholland Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.36 14-Mar-2014  martin Remove an unused variable
 1.35 27-Jul-2012  abs branches: 1.35.2; 1.35.4;
- Adjust the TOC parsing to reject an TOC with invalid (zero) track ids.
Avoids dereferencing off the start of the TOC track array.
- Add #ifdef GDROMDEBUGTOC for dumping out the gdrom TOC values
 1.34 01-Sep-2010  tsutsui branches: 1.34.8; 1.34.14;
- misc KNF and cosmetics
- use DPRINTF() style debug printf macro
 1.33 01-Sep-2010  tsutsui Make local functions static, and comment out an unused function.
 1.32 01-Sep-2010  tsutsui Use appropriate variable data types.
 1.31 01-Sep-2010  tsutsui Replace an empty for() loop (which would be optimized out) with DELAY(1).
No visible performance difference.
 1.30 01-Sep-2010  tsutsui - use bufq(9)
- account busy counter of disk(9)
 1.29 01-Sep-2010  tsutsui Return ENOTTY rather than EINVAL for unhandled ioctl(2)s.
 1.28 31-Aug-2010  tsutsui - split device_t/softc
- include "ioconf.h" for struct cfdriver
 1.27 31-Aug-2010  tsutsui Set bp->b_resid properly after data transfer is complete.
Fixes unexpected "Bad address" errors on file read ops since January 2006.

The problem is reported and tracked by Yasushi Oshima.
 1.26 01-Aug-2008  marcus branches: 1.26.4; 1.26.14; 1.26.16;
sysasic_intr_string() takes an IRL, not an IPL.
 1.25 11-Jun-2008  tsutsui branches: 1.25.2;
Use device_lookup_private() to get softc.
 1.24 17-Oct-2007  garbled branches: 1.24.16; 1.24.18; 1.24.20; 1.24.22; 1.24.24;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.23 08-Oct-2007  ad Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
 1.22 29-Jul-2007  ad branches: 1.22.4; 1.22.6; 1.22.8;
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.21 12-Mar-2007  tsutsui branches: 1.21.8; 1.21.10; 1.21.12;
IRL line connected to each device on sysasic is not always corresponding
with MI IPL_* definitions, so add an independent arg to pass IRL lines
to sysasic_intr_establish() and use appropriate macro for them.
 1.20 04-Mar-2007  christos branches: 1.20.2;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.19 24-Dec-2005  perry branches: 1.19.26;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.18 11-Dec-2005  christos merge ktrace-lwp.
 1.17 19-Feb-2005  tsutsui branches: 1.17.6;
- u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.16 15-Jul-2003  lukem branches: 1.16.8; 1.16.10;
__KERNEL_RCSID()
 1.15 15-Nov-2002  itohy branches: 1.15.6;
Allow multiple event handlers to be installed to an IRL.
The IRL is specified as IPL (2nd arg of sysasic_intr_establish()).
Current mapping:
IRL9 IPL_BIO
IRL11 IPL_NET
IRL13 IPL_TTY
 1.14 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.13 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.12 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.11 27-Sep-2002  thorpej When in a match routine, the cfdata we're passed always references
our own cfdriver, so don't bother comparing the names, since they
will always match.
 1.10 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.9 27-Jul-2002  hannken Convert to new device buffer queue interface.

Approved by: Marcus Comstedt <marcus@netbsd.org>
 1.8 25-Mar-2002  uch branches: 1.8.2; 1.8.6;
ANSIfy, KNF
 1.7 24-Mar-2002  uch adapted to new interrupt code and shb changes.
 1.6 04-Dec-2001  atatat Fixes to eliminate some compiler complaints, such as:

suggest explicit braces to avoid ambiguous `else'
suggest parentheses around assignment used as truth value
 1.5 22-Jul-2001  wiz branches: 1.5.2;
bcopy -> memcpy, bzero -> memset
 1.4 24-Apr-2001  marcus branches: 1.4.2;
Abstracted handling of System ASIC controlled IRQ:s a little.
Three different IRQ:s can be selected for each event, 9, 11, or 13
(which selects hardware priority). More events to be added as they
are discovered. Do not use shb_intr_establish() to register IRQ 9, 11
or 13 anymore.
 1.3 20-Feb-2001  marcus branches: 1.3.2;
New, interrupt-driven implementation.
 1.2 25-Jan-2001  marcus branches: 1.2.2;
Changed implementation of partitions, multisession discs now work better.
 1.1 21-Jan-2001  marcus Primitive GDROM support.
 1.2.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 25-Jan-2001  bouyer file gdrom.c was added on branch thorpej_scsipi on 2001-02-11 19:09:14 +0000
 1.3.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 03-Aug-2001  lukem update to -current
 1.5.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.8.6.6 11-Dec-2002  thorpej Sync with HEAD.
 1.8.6.5 11-Nov-2002  nathanw Catch up to -current
 1.8.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.8.6.3 17-Sep-2002  nathanw Catch up to -current.
 1.8.6.2 01-Aug-2002  nathanw Catch up to -current.
 1.8.6.1 25-Mar-2002  nathanw file gdrom.c was added on branch nathanw_sa on 2002-08-01 02:41:29 +0000
 1.8.2.3 30-Aug-2002  gehenna catch up with -current.
 1.8.2.2 06-Jun-2002  gehenna fix missing #include <sys/conf.h>
 1.8.2.1 17-May-2002  gehenna Add device switch.
 1.15.6.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.15.6.4 17-Jan-2005  skrll Adapt to branch.
 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.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.16.8.1 29-Apr-2005  kent sync with -current
 1.17.6.3 27-Oct-2007  yamt sync with head.
 1.17.6.2 03-Sep-2007  yamt sync with head.
 1.17.6.1 21-Jun-2006  yamt sync with head.
 1.19.26.2 24-Mar-2007  yamt sync with head.
 1.19.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.20.2.3 20-Aug-2007  ad - Alter disk attach/detach to fix a panic when closing a vnd device.
- Sync with HEAD.
 1.20.2.2 19-Aug-2007  ad - Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).
 1.20.2.1 13-Mar-2007  ad Sync with head.
 1.21.12.1 15-Aug-2007  skrll Sync with HEAD.
 1.21.10.1 07-Aug-2007  matt Sync with HEAD.
 1.21.8.2 16-Oct-2007  garbled Sync with HEAD
 1.21.8.1 03-Oct-2007  garbled Sync with HEAD
 1.22.8.1 14-Oct-2007  yamt sync with head.
 1.22.6.1 06-Nov-2007  matt sync with HEAD
 1.22.4.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.24.24.1 18-Jun-2008  simonb Sync with head.
 1.24.22.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.24.22.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.24.20.2 09-Oct-2010  yamt sync with head
 1.24.20.1 04-May-2009  yamt sync with head.
 1.24.18.1 17-Jun-2008  yamt sync with head.
 1.24.16.2 28-Sep-2008  mjf Sync with HEAD.
 1.24.16.1 29-Jun-2008  mjf Sync with HEAD.
 1.25.2.1 19-Oct-2008  haad Sync with HEAD.
 1.26.16.1 05-Mar-2011  rmind sync with head
 1.26.14.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.26.4.1 26-Nov-2010  riz Pull up following revision(s) (requested by tsutsui in ticket #1483):
sys/arch/dreamcast/dev/gdrom.c: revision 1.27
Set bp->b_resid properly after data transfer is complete.
Fixes unexpected "Bad address" errors on file read ops since January 2006.
The problem is reported and tracked by Yasushi Oshima.
 1.34.14.1 30-Jul-2012  martin Pull up following revision(s) (requested by abs in ticket #451):
sys/arch/dreamcast/dev/gdrom.c: revision 1.35
- Adjust the TOC parsing to reject an TOC with invalid (zero) track ids.
Avoids dereferencing off the start of the TOC track array.
- Add #ifdef GDROMDEBUGTOC for dumping out the gdrom TOC values
 1.34.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.34.8.1 30-Oct-2012  yamt sync with head
 1.35.4.1 18-May-2014  rmind sync with head
 1.35.2.2 03-Dec-2017  jdolecek update from HEAD
 1.35.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.38.2.1 10-Aug-2014  tls Rebase.
 1.40.4.2 19-Mar-2016  skrll Sync with HEAD
 1.40.4.1 06-Jun-2015  skrll Sync with HEAD
 1.39 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.38 31-Jul-2021  andvar branches: 1.38.2;
fix more typos in style found one in file - check/fix them all.
 1.37 24-Apr-2021  thorpej branches: 1.37.2;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.36 11-Mar-2016  tsutsui branches: 1.36.32;
Properly zero out struct fb_devconfig, including rasops_info.

Fix panic after wsconscfg(8) from serial console, caused by
a junk function pointer.
 1.35 26-Mar-2014  christos branches: 1.35.4; 1.35.6; 1.35.10;
kill sprintf
 1.34 11-Jan-2012  macallan branches: 1.34.6; 1.34.10;
adjust for wsfont_find() change
 1.33 19-Jul-2011  dyoung branches: 1.33.2; 1.33.6;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.32 21-May-2011  tsutsui Move several static wsdisplay variables into proper device specific structures
to resolve XXX comments. Tested on GXemul.
 1.31 26-Jan-2011  tsutsui Add proper prefix to structures.
 1.30 24-Oct-2010  tsutsui branches: 1.30.2; 1.30.4;
- make local functions/variables static
- export more cons(9) functions in pvrvar.h
 1.29 20-Oct-2010  tsutsui Split device_t/softc.
 1.28 19-Jun-2010  tsutsui Add WSDISPLAYIO_LINEBYTES, required by Xorg wsfb server.
 1.27 15-May-2010  tsutsui Clear RI_NO_AUTO in actual attach functions during autoconf(9)
for console devices that set the flag during consinit().
 1.26 15-May-2010  tsutsui Set RI_NO_AUTO in ri_flg if pvr_getdevconfig() is invoked from cninit.
Tested on gxemul.
 1.25 26-May-2008  nisimura branches: 1.25.18; 1.25.20;
- assign 2 clause TNF license to the files cited as my ownership.
- abandon and remove my copyright notice from the three files were
copied in order to adapt HW I don't have; pvr.c, pm.c and stic.c
 1.24 04-Mar-2007  christos branches: 1.24.40; 1.24.42; 1.24.44; 1.24.46;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.23 14-May-2006  elad branches: 1.23.14;
integrate kauth.
 1.22 12-Apr-2006  jmmv Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called. The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place. There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.
 1.21 24-Dec-2005  perry branches: 1.21.4; 1.21.6; 1.21.8; 1.21.10; 1.21.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.20 11-Dec-2005  christos merge ktrace-lwp.
 1.19 19-Feb-2005  tsutsui branches: 1.19.6;
- u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.18 10-Dec-2003  tsutsui branches: 1.18.8; 1.18.10;
Add WSDISPLAYIO_VIDEO_{ON,OFF} support for WSDISPLAYIO_SVIDEO ioctl.
Patch from Yasushi Oshima.
 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 27-Sep-2002  thorpej When in a match routine, the cfdata we're passed always references
our own cfdriver, so don't bother comparing the names, since they
will always match.
 1.14 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.13 04-Jul-2002  junyoung alloc_attr -> allocattr

Approved by Matthias Drochner.
 1.12 03-May-2002  thorpej branches: 1.12.2; 1.12.6;
De-obfuscate somewhat; define and use register bit constants, etc.
 1.11 24-Mar-2002  uch adapted to new interrupt code and shb changes.
 1.10 17-Mar-2002  atatat Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.9 13-Mar-2002  ad Reorganise the wsfont stuff slightly so that multiple display adapters
with different bit/byte order requirements can co-exist happily.
 1.8 05-Mar-2001  marcus branches: 1.8.4;
Off-by-one error on v_absolute_size fixed.
 1.7 04-Mar-2001  marcus Made it possible to mmap the frame buffer.
 1.6 19-Feb-2001  marcus PAL support...
 1.5 02-Feb-2001  thorpej branches: 1.5.2;
Report the VGA/NTSC RGB/composite mode of the display.
 1.4 01-Feb-2001  thorpej New PowerVR display driver, based on the TURBOchannel "cfb"
driver by Tohru Nisimura (a very good framework for a FB driver,
BTW!), using bits of Marcus's original driver for the hardware
access.

The main advantage of this version is that is uses rasops (which
is faster than the rcons stuff) and wsfont, so you can select the
console font in the kernel config file. Using the BOLD8x16 font,
you get an 80x30 console (vast improvement compared to the Gallant12x22
font).
 1.3 21-Jan-2001  marcus Corrected license text.
 1.2 21-Jan-2001  christos knf, some symbolic constants would be nice [pvrreg.h]

christos
 1.1 16-Jan-2001  marcus PowerVR display driver.
 1.5.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.5.2.1 02-Feb-2001  bouyer file pvr.c was added on branch thorpej_scsipi on 2001-03-12 13:28:07 +0000
 1.8.4.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.8.4.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.8.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.8.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.12.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.12.6.3 17-Sep-2002  nathanw Catch up to -current.
 1.12.6.2 01-Aug-2002  nathanw Catch up to -current.
 1.12.6.1 03-May-2002  nathanw file pvr.c was added on branch nathanw_sa on 2002-08-01 02:41:29 +0000
 1.12.2.2 16-Jul-2002  gehenna catch up with -current.
 1.12.2.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.17.6.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.17.6.4 17-Jan-2005  skrll Adapt to branch.
 1.17.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.6.1 03-Aug-2004  skrll Sync with HEAD
 1.18.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.18.8.1 29-Apr-2005  kent sync with -current
 1.19.6.2 03-Sep-2007  yamt sync with head.
 1.19.6.1 21-Jun-2006  yamt sync with head.
 1.21.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.21.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.21.8.1 24-May-2006  yamt sync with head.
 1.21.6.1 22-Apr-2006  simonb Sync with head.
 1.21.4.1 09-Sep-2006  rpaulo sync with head
 1.23.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.24.46.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.24.44.2 11-Aug-2010  yamt sync with head.
 1.24.44.1 04-May-2009  yamt sync with head.
 1.24.42.1 04-Jun-2008  yamt sync with head
 1.24.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.25.20.4 31-May-2011  rmind sync with head
 1.25.20.3 05-Mar-2011  rmind sync with head
 1.25.20.2 03-Jul-2010  rmind sync with head
 1.25.20.1 30-May-2010  rmind sync with head
 1.25.18.3 06-Nov-2010  uebayasi Sync with HEAD.
 1.25.18.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.25.18.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.30.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.30.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.33.6.1 18-Feb-2012  mrg merge to -current.
 1.33.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.33.2.1 17-Apr-2012  yamt sync with head
 1.34.10.1 18-May-2014  rmind sync with head
 1.34.6.2 03-Dec-2017  jdolecek update from HEAD
 1.34.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.35.10.1 18-Jan-2017  skrll Sync with netbsd-5
 1.35.6.1 19-Mar-2016  skrll Sync with HEAD
 1.35.4.1 06-Dec-2016  snj Pull up following revision(s) (requested by tsutsui in ticket #1284):
sys/arch/dreamcast/dev/pvr.c: revision 1.36
Properly zero out struct fb_devconfig, including rasops_info.
Fix panic after wsconscfg(8) from serial console, caused by
a junk function pointer.
 1.36.32.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.37.2.1 01-Aug-2021  thorpej Sync with HEAD.
 1.38.2.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.4 24-Oct-2010  tsutsui - make local functions/variables static
- export more cons(9) functions in pvrvar.h
 1.3 01-Feb-2001  thorpej branches: 1.3.2; 1.3.152; 1.3.154;
New PowerVR display driver, based on the TURBOchannel "cfb"
driver by Tohru Nisimura (a very good framework for a FB driver,
BTW!), using bits of Marcus's original driver for the hardware
access.

The main advantage of this version is that is uses rasops (which
is faster than the rcons stuff) and wsfont, so you can select the
console font in the kernel config file. Using the BOLD8x16 font,
you get an 80x30 console (vast improvement compared to the Gallant12x22
font).
 1.2 21-Jan-2001  marcus Corrected license text.
 1.1 16-Jan-2001  marcus PowerVR display driver.
 1.3.154.1 05-Mar-2011  rmind sync with head
 1.3.152.1 06-Nov-2010  uebayasi Sync with HEAD.
 1.3.2.2 01-Feb-2001  thorpej New PowerVR display driver, based on the TURBOchannel "cfb"
driver by Tohru Nisimura (a very good framework for a FB driver,
BTW!), using bits of Marcus's original driver for the hardware
access.

The main advantage of this version is that is uses rasops (which
is faster than the rcons stuff) and wsfont, so you can select the
console font in the kernel config file. Using the BOLD8x16 font,
you get an 80x30 console (vast improvement compared to the Gallant12x22
font).
 1.3.2.1 01-Feb-2001  thorpej file pvrvar.h was added on branch thorpej_scsipi on 2001-02-01 01:25:57 +0000
 1.4 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.3 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.2 24-Apr-2021  thorpej branches: 1.2.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.1 29-Dec-2016  tsutsui branches: 1.1.2; 1.1.6; 1.1.18; 1.1.36;
WIP "G1-ATA" IDE HDD support. Not enabled by default.

Demonstrated on NetBSD booth at Open Source Conference 2016 Tokyo Fall
and Kansai Open Source 2016:
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/09/msg000721.html
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/16/msg000722.html

See my port-dreamcast@ post for more details:
http://mail-index.netbsd.org/port-dreamcast/2016/12/18/msg000295.html
 1.1.36.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.1.36.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.1.36.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.1.36.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.1.36.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.1.36.1 20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 29-Dec-2016  jdolecek file g1bus.c was added on branch tls-maxphys on 2017-12-03 11:36:00 +0000
 1.1.6.2 05-Feb-2017  skrll Sync with HEAD
 1.1.6.1 29-Dec-2016  skrll file g1bus.c was added on branch nick-nhusb on 2017-02-05 13:40:06 +0000
 1.1.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.2.1 29-Dec-2016  pgoyette file g1bus.c was added on branch pgoyette-localcount on 2017-01-07 08:56:12 +0000
 1.2.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 29-Dec-2016  tsutsui branches: 1.1.2; 1.1.6; 1.1.18;
WIP "G1-ATA" IDE HDD support. Not enabled by default.

Demonstrated on NetBSD booth at Open Source Conference 2016 Tokyo Fall
and Kansai Open Source 2016:
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/09/msg000721.html
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/16/msg000722.html

See my port-dreamcast@ post for more details:
http://mail-index.netbsd.org/port-dreamcast/2016/12/18/msg000295.html
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 29-Dec-2016  jdolecek file g1bus_bus_mem.c was added on branch tls-maxphys on 2017-12-03 11:36:00 +0000
 1.1.6.2 05-Feb-2017  skrll Sync with HEAD
 1.1.6.1 29-Dec-2016  skrll file g1bus_bus_mem.c was added on branch nick-nhusb on 2017-02-05 13:40:06 +0000
 1.1.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.2.1 29-Dec-2016  pgoyette file g1bus_bus_mem.c was added on branch pgoyette-localcount on 2017-01-07 08:56:12 +0000
 1.1 29-Dec-2016  tsutsui branches: 1.1.2; 1.1.6; 1.1.18;
WIP "G1-ATA" IDE HDD support. Not enabled by default.

Demonstrated on NetBSD booth at Open Source Conference 2016 Tokyo Fall
and Kansai Open Source 2016:
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/09/msg000721.html
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/16/msg000722.html

See my port-dreamcast@ post for more details:
http://mail-index.netbsd.org/port-dreamcast/2016/12/18/msg000295.html
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 29-Dec-2016  jdolecek file g1busvar.h was added on branch tls-maxphys on 2017-12-03 11:36:00 +0000
 1.1.6.2 05-Feb-2017  skrll Sync with HEAD
 1.1.6.1 29-Dec-2016  skrll file g1busvar.h was added on branch nick-nhusb on 2017-02-05 13:40:06 +0000
 1.1.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.2.1 29-Dec-2016  pgoyette file g1busvar.h was added on branch pgoyette-localcount on 2017-01-07 08:56:12 +0000
 1.1 29-Dec-2016  tsutsui branches: 1.1.2; 1.1.6; 1.1.18;
WIP "G1-ATA" IDE HDD support. Not enabled by default.

Demonstrated on NetBSD booth at Open Source Conference 2016 Tokyo Fall
and Kansai Open Source 2016:
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/09/msg000721.html
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/16/msg000722.html

See my port-dreamcast@ post for more details:
http://mail-index.netbsd.org/port-dreamcast/2016/12/18/msg000295.html
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 29-Dec-2016  jdolecek file gdrom.c was added on branch tls-maxphys on 2017-12-03 11:36:00 +0000
 1.1.6.2 05-Feb-2017  skrll Sync with HEAD
 1.1.6.1 29-Dec-2016  skrll file gdrom.c was added on branch nick-nhusb on 2017-02-05 13:40:06 +0000
 1.1.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.2.1 29-Dec-2016  pgoyette file gdrom.c was added on branch pgoyette-localcount on 2017-01-07 08:56:12 +0000
 1.6 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.5 14-Sep-2019  tsutsui Restore interface to pass a MD reset function to MI wdcprobe().

Fixes silent hang on G1IDE on Dreamcast. PR kern/54538
Should be pulled up to netbsd-9 with the previous changes.
 1.4 09-Sep-2019  jdolecek adjust several missed drivers for wdcprobe() changes of ATA NCQ branch

for dreamcast g1 just drop the custom reset function, it doesn't seem to do
anything useful over the generic variant

PR kern/54538 by Izumi Tsutsui
 1.3 20-Oct-2017  jdolecek branches: 1.3.2; 1.3.6; 1.3.10;
move ata_queue_alloc(1) and ata_queue_free() calls to ata_channel_init()
and ata_channel_destroy() respectively, to make attachment code simpler,
and to make it easier to spot special queue manipulation like cmdide(4)

on topic of PR kern/52606
 1.2 07-Oct-2017  jdolecek adapt the rest of wdc attachments for NCQ branch merge
 1.1 29-Dec-2016  tsutsui branches: 1.1.2; 1.1.6;
WIP "G1-ATA" IDE HDD support. Not enabled by default.

Demonstrated on NetBSD booth at Open Source Conference 2016 Tokyo Fall
and Kansai Open Source 2016:
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/09/msg000721.html
http://mail-index.netbsd.org/netbsd-advocacy/2016/11/16/msg000722.html

See my port-dreamcast@ post for more details:
http://mail-index.netbsd.org/port-dreamcast/2016/12/18/msg000295.html
 1.1.6.2 05-Feb-2017  skrll Sync with HEAD
 1.1.6.1 29-Dec-2016  skrll file wdc_g1.c was added on branch nick-nhusb on 2017-02-05 13:40:06 +0000
 1.1.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.2.1 29-Dec-2016  pgoyette file wdc_g1.c was added on branch pgoyette-localcount on 2017-01-07 08:56:12 +0000
 1.3.10.1 23-Sep-2019  martin Pull up following revision(s) (requested by tsutsui in ticket #232):

sys/arch/evbppc/mpc85xx/wdc_obio.c: revision 1.7
sys/arch/dreamcast/dev/g1/wdc_g1.c: revision 1.4
sys/arch/dreamcast/dev/g1/wdc_g1.c: revision 1.5
sys/arch/mmeye/dev/wdc_mainbus.c: revision 1.7
sys/dev/ic/wdcvar.h: revision 1.99
sys/dev/ic/wdc.c: revision 1.292
sys/arch/mips/adm5120/dev/wdc_extio.c: revision 1.11

adjust several missed drivers for wdcprobe() changes of ATA NCQ branch
for dreamcast g1 just drop the custom reset function, it doesn't seem to do
anything useful over the generic variant

PR kern/54538 by Izumi Tsutsui

Restore interface to pass a MD reset function to MI wdcprobe().

Fixes silent hang on G1IDE on Dreamcast. PR kern/54538
Should be pulled up to netbsd-9 with the previous changes.
 1.3.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 20-Oct-2017  jdolecek file wdc_g1.c was added on branch tls-maxphys on 2017-12-03 11:36:00 +0000
 1.31 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.30 09-Feb-2021  isaki Update function name in a comment.
 1.29 06-Feb-2021  isaki Remove sc_open flag.
Counting {open,close} is done by the MI audio layer.
 1.28 23-Feb-2020  isaki branches: 1.28.6;
Make start_input/halt_input optional if the driver has no recording,
make start_output/halt_output optional if the driver has no playback.
And remove such never called functions.
 1.27 08-May-2019  isaki branches: 1.27.4;
Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.26 06-May-2019  ryo don't use tsleep() in interrupt context.
when the audio starts playing, initialization is performed on the aica arm driver side.
 1.25 16-Mar-2019  isaki branches: 1.25.2;
Use C99 style struct initializer to audio_hw_if.
 1.24 03-Mar-2018  christos branches: 1.24.4;
this ain't python, thanks gcc6.
 1.23 25-Jul-2017  nat Dreamcast audio only supports playback so set it in the props.
This makes dreamcast audio work again.

Tested by Bjorn Johannesson.
cvs: ----------------------------------------------------------------------
 1.22 23-Nov-2011  jmcneill branches: 1.22.8; 1.22.26; 1.22.42;
Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.
 1.21 19-Jul-2011  dyoung branches: 1.21.2; 1.21.4;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.20 21-Nov-2010  tsutsui Split softc/device_t.
 1.19 20-Nov-2010  tsutsui Make aica_round_blocksize() always return a fixed buffer size.

I'm not sure if this is correct, but audio playback doesn't work
on dreamcast without this workaround. (since kent-audio1 merge?)
 1.18 01-Aug-2008  marcus branches: 1.18.4; 1.18.16;
sysasic_intr_string() takes an IRL, not an IPL.
 1.17 06-Jan-2008  he branches: 1.17.6; 1.17.10; 1.17.12; 1.17.16;
Include <sys/device.h> explicitly to pull in needed definitions.
 1.16 17-Oct-2007  garbled branches: 1.16.2; 1.16.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.15 16-Jul-2007  marcus branches: 1.15.10;
Clear the correct amount of audio RAM in AICA driver (fixes port-dreamcast/35022).
 1.14 12-Mar-2007  tsutsui branches: 1.14.8;
IRL line connected to each device on sysasic is not always corresponding
with MI IPL_* definitions, so add an independent arg to pass IRL lines
to sysasic_intr_establish() and use appropriate macro for them.
 1.13 22-Feb-2007  thorpej branches: 1.13.4;
TRUE -> true, FALSE -> false
 1.12 10-May-2006  skrll branches: 1.12.14;
Fix a bunch of cast lvalues.
 1.11 24-Dec-2005  perry branches: 1.11.4; 1.11.6; 1.11.8; 1.11.10; 1.11.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 02-Jun-2005  he branches: 1.9.2;
Fix const fallout.
 1.8 19-Feb-2005  tsutsui - u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.7 15-Jan-2005  kent branches: 1.7.2; 1.7.4;
ansify and KNF
 1.6 10-Jan-2005  kent merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes
 1.5 29-Oct-2004  yamt branches: 1.5.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.
 1.4 25-Aug-2003  marcus branches: 1.4.4;
mulaw/alaw timing bugfix from Izumi Tsutsui.
 1.3 24-Aug-2003  marcus LINEAR and LINEAR_LE need to be interchangeable (fixes 8bit unsigned bug).
 1.2 24-Aug-2003  marcus Added some encodings which were supported but not listed.
 1.1 24-Aug-2003  marcus Added AICA sound driver contributed by Ryo Shimizu.
 1.4.4.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.4.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.4.4.6 17-Jan-2005  skrll Sync with HEAD.
 1.4.4.5 02-Nov-2004  skrll Sync with HEAD.
 1.4.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.4.4.2 03-Aug-2004  skrll Sync with HEAD
 1.4.4.1 25-Aug-2003  skrll file aica.c was added on branch ktrace-lwp on 2004-08-03 10:33:53 +0000
 1.5.2.2 09-Jan-2005  kent audio_hw_if change
* make open() and close() optional
* add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()
 1.5.2.1 03-Jan-2005  kent adopt the filter pipeline framework
 1.7.4.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.7.2.1 29-Apr-2005  kent sync with -current
 1.9.2.4 21-Jan-2008  yamt sync with head
 1.9.2.3 03-Sep-2007  yamt sync with head.
 1.9.2.2 26-Feb-2007  yamt sync with head.
 1.9.2.1 21-Jun-2006  yamt sync with head.
 1.11.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.11.10.1 11-May-2006  elad sync with head
 1.11.8.1 24-May-2006  yamt sync with head.
 1.11.6.1 01-Jun-2006  kardel Sync with head.
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.12.14.2 24-Mar-2007  yamt sync with head.
 1.12.14.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.13.4.2 20-Aug-2007  ad Sync with HEAD.
 1.13.4.1 13-Mar-2007  ad Sync with head.
 1.14.8.1 03-Oct-2007  garbled Sync with HEAD
 1.15.10.2 09-Jan-2008  matt sync with HEAD
 1.15.10.1 06-Nov-2007  matt sync with HEAD
 1.16.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.16.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.17.16.1 19-Oct-2008  haad Sync with HEAD.
 1.17.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.10.1 04-May-2009  yamt sync with head.
 1.17.6.1 28-Sep-2008  mjf Sync with HEAD.
 1.18.16.1 05-Mar-2011  rmind sync with head
 1.18.4.1 21-Dec-2010  riz Pull up following revision(s) (requested by tsutsui in ticket #1497):
sys/arch/dreamcast/dev/g2/aica.c: revision 1.19
Make aica_round_blocksize() always return a fixed buffer size.
I'm not sure if this is correct, but audio playback doesn't work
on dreamcast without this workaround. (since kent-audio1 merge?)
 1.21.4.2 22-Nov-2011  jmcneill get rid of unused 'powerstate' callback in audio_hw_if
 1.21.4.1 20-Nov-2011  jmcneill adapt to audiomp api changes
 1.21.2.1 17-Apr-2012  yamt sync with head
 1.22.42.1 26-Jul-2017  martin Pull up following revision(s) (requested by nat in ticket #160):
sys/arch/dreamcast/conf/G1IDE: revision 1.2
sys/arch/dreamcast/conf/GENERIC: revision 1.126
sys/arch/dreamcast/dev/g2/aica.c: revision 1.23
Dreamcast audio only supports playback so set it in the props.
This makes dreamcast audio work again.
Tested by Bjorn Johannesson.
cvs: ----------------------------------------------------------------------
Use the correct attachment for dreamcast audio.
Found and tested by Bjorn Johannesson on port-dreamcast.
 1.22.26.1 28-Aug-2017  skrll Sync with HEAD
 1.22.8.1 03-Dec-2017  jdolecek update from HEAD
 1.24.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.24.4.1 10-Jun-2019  christos Sync with HEAD
 1.25.2.3 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.25.2.2 03-May-2019  isaki Adapt to audio2.
- audio2 limits the lowest frequency.
- Remove unused sc_encodings.
- In audio2, round_buffersize(RECORD) will not be called if the
driver does not support recording.
 1.25.2.1 21-Apr-2019  isaki Use C99 style struct initializer to audio_format.
 1.27.4.1 29-Feb-2020  ad Sync with head.
 1.28.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 15-Jan-2005  kent ansify and KNF
 1.1 24-Aug-2003  marcus branches: 1.1.4;
Added AICA sound driver contributed by Ryo Shimizu.
 1.1.4.5 17-Jan-2005  skrll Sync with HEAD.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 24-Aug-2003  skrll file aicavar.h was added on branch ktrace-lwp on 2004-08-03 10:33:53 +0000
 1.17 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.16 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.15 24-Apr-2021  thorpej branches: 1.15.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.14 21-Nov-2010  tsutsui branches: 1.14.74;
Split softc/device_t.
 1.13 07-Aug-2006  tsutsui branches: 1.13.84;
KNF, TAB/space cosmetics
 1.12 11-Dec-2005  christos branches: 1.12.4; 1.12.8;
merge ktrace-lwp.
 1.11 26-Aug-2005  drochner s/locdesc_t/int/g
 1.10 30-Jun-2005  drochner branches: 1.10.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.9 19-Feb-2005  tsutsui - u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.8 15-Jul-2003  lukem branches: 1.8.8; 1.8.10;
__KERNEL_RCSID()
 1.7 02-Oct-2002  thorpej branches: 1.7.6;
Add trailing ; to CFATTACH_DECL
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.3 27-Sep-2002  thorpej When in a match routine, the cfdata we're passed always references
our own cfdriver, so don't bother comparing the names, since they
will always match.
 1.2 24-Mar-2002  uch branches: 1.2.6;
adapted to new interrupt code and shb changes.
 1.1 31-Jan-2001  thorpej branches: 1.1.2; 1.1.6;
G2 bus support. Low level stuff by Marcus, bus_space stuff by me.
 1.1.6.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 31-Jan-2001  bouyer file g2bus.c was added on branch thorpej_scsipi on 2001-02-11 19:09:15 +0000
 1.2.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.6.1 24-Mar-2002  nathanw file g2bus.c was added on branch nathanw_sa on 2002-10-18 02:36:20 +0000
 1.7.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.6.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 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.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.8.8.1 29-Apr-2005  kent sync with -current
 1.10.2.2 30-Dec-2006  yamt sync with head.
 1.10.2.1 21-Jun-2006  yamt sync with head.
 1.12.8.1 11-Aug-2006  yamt sync with head
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.84.1 05-Mar-2011  rmind sync with head
 1.14.74.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.14.74.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.14.74.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.14.74.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.14.74.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.14.74.1 20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.15.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.16 19-Jul-2011  dyoung Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.15 23-Aug-2009  tsutsui Add an empty bus_space_mmap(9) function as temporary workaround
for MI pci(4) mmap function in sys/dev/pci/pci_usrreq.c.

XXX: no bus_space_subregion(9) for g2bus.
 1.14 28-Apr-2008  martin branches: 1.14.10; 1.14.18;
Remove clause 3 and 4 from TNF licenses
 1.13 07-Aug-2006  tsutsui branches: 1.13.58; 1.13.60; 1.13.62;
KNF, TAB/space cosmetics
 1.12 24-Dec-2005  perry branches: 1.12.4; 1.12.8;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.11 11-Dec-2005  christos merge ktrace-lwp.
 1.10 19-Feb-2005  tsutsui branches: 1.10.6;
- u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.9 24-Aug-2003  marcus branches: 1.9.8; 1.9.10;
Added AICA sound driver contributed by Ryo Shimizu.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 02-Mar-2003  tsutsui branches: 1.7.2;
Cleanup G2_LOCK/G2_UNLOCK macros per discussion on port-dreamcast:
- Use _cpu_intr_suspend()/_cpu_intr_resume() in G2_LOCK/G2_UNLOCK macros
rather than _cpu_exception_suspend()/_cpu_exception_resume().
TLB miss exceptions could happen on accessing buffer, but it will never
block G2bus cycle anyway.
- Restore the previous SR.IMASK value in G2_UNLOCK().
- some misc cosmetics.

Should fix spontaneous reboots by "ping -s 8192 host" on the LAN Adapter.
 1.6 27-Dec-2002  tsutsui Add a set of bus_space(9) functions for g2bus devices with
sparse address space. This is required for SEGA LAN adapter support.
 1.5 03-Mar-2002  uch branches: 1.5.10;
SR related parts moved to psl.h. cpufunc.h segments.h are removed.
kernel mode checking is only SR.MD. no check stack pointer.
 1.4 19-Feb-2002  uch Clean up functions
disable_intr, enable_intr, disable_interrupt, enable_interrupt,
disable_ext_intr, enable_ext_intr.
New functions:
for external interrupt:
_cpu_intr_suspend and _cpu_intr_resume.
for exception:
_cpu_exception_suspend and _cpu_exception_resume.
 1.3 01-Feb-2001  thorpej branches: 1.3.2; 1.3.6;
Implement {read,write}_region_1, and sprinkle some __volatile
around for sanity.
 1.2 31-Jan-2001  marcus Basic G2 locking implemented.
 1.1 31-Jan-2001  thorpej G2 bus support. Low level stuff by Marcus, bus_space stuff by me.
 1.3.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.3.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.3.2.1 01-Feb-2001  bouyer file g2bus_bus_mem.c was added on branch thorpej_scsipi on 2001-02-11 19:09:15 +0000
 1.5.10.2 29-Dec-2002  thorpej Sync with HEAD.
 1.5.10.1 03-Mar-2002  thorpej file g2bus_bus_mem.c was added on branch nathanw_sa on 2002-12-29 19:21:38 +0000
 1.7.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.9.8.1 29-Apr-2005  kent sync with -current
 1.10.6.2 30-Dec-2006  yamt sync with head.
 1.10.6.1 21-Jun-2006  yamt sync with head.
 1.12.8.1 11-Aug-2006  yamt sync with head
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.62.2 16-Sep-2009  yamt sync with head
 1.13.62.1 16-May-2008  yamt sync with head.
 1.13.60.1 18-May-2008  yamt sync with head.
 1.13.58.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.18.1 21-Apr-2010  matt sync to netbsd-5
 1.14.10.1 16-Sep-2009  snj Pull up following revision(s) (requested by mrg in ticket #952):
sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c: revision 1.15
sys/arch/dreamcast/include/bus.h: revision 1.15
Add an empty bus_space_mmap(9) function as a workaround
for MI pci(4) mmap function in sys/dev/pci/pci_usrreq.c.
XXX: no bus_space_subregion(9) for g2bus.
 1.7 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.6 19-Jul-2011  dyoung branches: 1.6.2; 1.6.12;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.5 21-Nov-2010  tsutsui Split softc/device_t.
 1.4 27-Dec-2002  tsutsui branches: 1.4.130;
Add a set of bus_space(9) functions for g2bus devices with
sparse address space. This is required for SEGA LAN adapter support.
 1.3 23-Dec-2002  tsutsui Fix pasto in comment.
 1.2 24-Mar-2002  uch branches: 1.2.6;
adapted to new interrupt code and shb changes.
 1.1 31-Jan-2001  thorpej branches: 1.1.2; 1.1.6;
G2 bus support. Low level stuff by Marcus, bus_space stuff by me.
 1.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 31-Jan-2001  bouyer file g2busvar.h was added on branch thorpej_scsipi on 2001-02-11 19:09:15 +0000
 1.2.6.2 29-Dec-2002  thorpej Sync with HEAD.
 1.2.6.1 24-Mar-2002  thorpej file g2busvar.h was added on branch nathanw_sa on 2002-12-29 19:21:38 +0000
 1.4.130.1 05-Mar-2011  rmind sync with head
 1.6.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.2.1 30-Oct-2012  yamt sync with head
 1.9 07-Sep-2025  thorpej Change todr_chip_handle::cookie -> todr_chip_handle::todr_dev, and
make it a device_t. Upcoming functional changes will require the
device_t associated with a TODR device.

Change todr_chip_handle::bus_cookie -> todr_chip_handle::todr_devaux.
Nothing was using the old field, but I decided to keep it around just
in cause something needs it in the future.

And with these largely mechanical yet semantically meaningful changes,
thus spake the Oracle: "Welcome to NetBSD 11.99.2."
 1.8 09-Oct-2016  christos PR/51540: Henning Petersen: replace , with ;
 1.7 17-Nov-2014  christos branches: 1.7.2; 1.7.4;
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.6 19-Jul-2011  dyoung branches: 1.6.12;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.5 01-Sep-2010  tsutsui - split device_t/softc
- allocate struct todr_chip_handle in per-device softc
- some cosmetics
 1.4 12-Dec-2009  tsutsui branches: 1.4.2; 1.4.4;
Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 06-Jan-2008  he branches: 1.2.6; 1.2.8; 1.2.10;
Include <sys/device.h> explicitly to pull in needed definitions.
 1.1 05-Sep-2006  uwe branches: 1.1.4; 1.1.6; 1.1.12; 1.1.38; 1.1.44; 1.1.52;
Switch dreamcast to MI todr(9).

Dreamcast does not use SuperH on-chip RTC, so do it seprately from
other sh3 ports. Convert dreamcast rtc code into a real device
instead of searching/attaching it manually.

Tested by Nick Hudson.
 1.1.52.1 08-Jan-2008  bouyer Sync with HEAD
 1.1.44.1 18-Feb-2008  mjf Sync with HEAD.
 1.1.38.1 09-Jan-2008  matt sync with HEAD
 1.1.12.3 21-Jan-2008  yamt sync with head
 1.1.12.2 30-Dec-2006  yamt sync with head.
 1.1.12.1 05-Sep-2006  yamt file g2rtc.c was added on branch yamt-lazymbuf on 2006-12-30 20:45:46 +0000
 1.1.6.2 14-Sep-2006  yamt sync with head.
 1.1.6.1 05-Sep-2006  yamt file g2rtc.c was added on branch yamt-pdpolicy on 2006-09-14 12:31:09 +0000
 1.1.4.2 09-Sep-2006  rpaulo sync with head
 1.1.4.1 05-Sep-2006  rpaulo file g2rtc.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:29 +0000
 1.2.10.3 09-Oct-2010  yamt sync with head
 1.2.10.2 11-Mar-2010  yamt sync with head
 1.2.10.1 16-May-2008  yamt sync with head.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.4.1 05-Mar-2011  rmind sync with head
 1.4.2.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.6.12.1 03-Dec-2017  jdolecek update from HEAD
 1.7.4.1 04-Nov-2016  pgoyette Sync with HEAD
 1.7.2.1 05-Dec-2016  skrll Sync with HEAD
 1.22 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.21 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.20 24-Apr-2021  thorpej branches: 1.20.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.19 19-Jul-2011  dyoung branches: 1.19.68;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.18 17-May-2011  dyoung PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name. Correct that.

Rename PCI_FLAGS_IO_ENABLED to PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_ENABLED to PCI_FLAGS_MEM_OKAY, thus making their names
consistent with the other PCI flags and poisoning 3rd-party driver
sources that use the flags in the old bad way.

This patch produces no binary changes in this set of PCI kernels when
they are compiled w/o 'options DIAGNOSTIC' and w/ -V MKREPRO=yes:

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
 1.17 21-Nov-2010  tsutsui branches: 1.17.2;
Split softc/device_t.
 1.16 01-Aug-2008  marcus branches: 1.16.16;
Fixed a compilation warning.
 1.15 07-Aug-2006  tsutsui branches: 1.15.58; 1.15.62; 1.15.64; 1.15.68;
KNF, TAB/space cosmetics
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.8;
merge ktrace-lwp.
 1.13 19-Feb-2005  tsutsui branches: 1.13.6;
- u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.12 30-Aug-2004  drochner branches: 1.12.4; 1.12.6;
Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 15-Jun-2003  fvdl branches: 1.10.2;
Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
 1.9 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.8 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.7 02-Oct-2002  itohy ../../../../arch/dreamcast/dev/g2/gapspci.c:62: macro `CFATTACH_DECL' used with only 5 args
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Sep-2002  thorpej When in a match routine, the cfdata we're passed always references
our own cfdriver, so don't bother comparing the names, since they
will always match.
 1.3 16-May-2002  thorpej branches: 1.3.2; 1.3.6;
* Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses. For busses behind a bridge, it points to
a persistent copy of the bridge's pcitag_t. This can be very useful
for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
uses OFW device nodes to enumerate the bus. When a PCI bus that is
behind a bridge is attached, pci_attach_hook() allocates a new PCI
chipset tag for the new bus and sets it's "curnode" to the OFW node
of the bridge. This is used as a starting point when enumerating
that bus. Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
 1.2 01-Feb-2001  marcus branches: 1.2.2; 1.2.6;
Fixed the last raw accesses to use bus_space. Also added DMA mem size field.
 1.1 01-Feb-2001  thorpej GAPS PCI bridge support. Low-level stuff from Marcus, bus_dma
implementation from me.
 1.2.6.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 01-Feb-2001  bouyer file gapspci.c was added on branch thorpej_scsipi on 2001-02-11 19:09:15 +0000
 1.3.6.3 03-Jan-2003  thorpej Sync with HEAD.
 1.3.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.3.6.1 16-May-2002  nathanw file gapspci.c was added on branch nathanw_sa on 2002-10-18 02:36:21 +0000
 1.3.2.2 16-May-2002  thorpej * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses. For busses behind a bridge, it points to
a persistent copy of the bridge's pcitag_t. This can be very useful
for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
uses OFW device nodes to enumerate the bus. When a PCI bus that is
behind a bridge is attached, pci_attach_hook() allocates a new PCI
chipset tag for the new bus and sets it's "curnode" to the OFW node
of the bridge. This is used as a starting point when enumerating
that bus. Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
 1.3.2.1 16-May-2002  thorpej file gapspci.c was added on branch gehenna-devsw on 2002-05-16 01:01:36 +0000
 1.10.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.10.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.2 03-Sep-2004  skrll Sync with HEAD
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.12.4.1 29-Apr-2005  kent sync with -current
 1.13.6.1 30-Dec-2006  yamt sync with head.
 1.14.8.1 11-Aug-2006  yamt sync with head
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.15.68.1 19-Oct-2008  haad Sync with HEAD.
 1.15.64.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.15.62.1 04-May-2009  yamt sync with head.
 1.15.58.1 28-Sep-2008  mjf Sync with HEAD.
 1.16.16.2 31-May-2011  rmind sync with head
 1.16.16.1 05-Mar-2011  rmind sync with head
 1.17.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.19.68.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.20.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.21 02-Dec-2023  thorpej Use vmem(9) rather than extent(9) to manage the GAPS PCI DMA buffer.
 1.20 27-Jan-2012  para converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.19 19-Jul-2011  dyoung branches: 1.19.2; 1.19.6;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.18 12-Nov-2010  uebayasi Pull in uvm/uvm.h where UVM's page level interface is used.
 1.17 07-Nov-2009  cegger branches: 1.17.4;
Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
 1.16 04-Jun-2008  ad vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both.
 1.15 28-Apr-2008  martin branches: 1.15.2;
Remove clause 3 and 4 from TNF licenses
 1.14 04-Mar-2007  christos branches: 1.14.40; 1.14.42; 1.14.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13 07-Aug-2006  tsutsui branches: 1.13.10;
KNF, TAB/space cosmetics
 1.12 24-Nov-2005  yamt branches: 1.12.4; 1.12.8;
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.11 01-Apr-2005  yamt branches: 1.11.2; 1.11.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.10 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.9 19-Feb-2005  tsutsui - u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.8 15-Jul-2003  lukem branches: 1.8.8; 1.8.10;
__KERNEL_RCSID()
 1.7 02-Jun-2002  drochner branches: 1.7.2; 1.7.8;
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.6 10-Sep-2001  chris branches: 1.6.10;
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.5 26-May-2001  chs branches: 1.5.2; 1.5.4;
replace vm_page_t with struct vm_page *.
 1.4 24-Apr-2001  thorpej Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.3 01-Feb-2001  thorpej branches: 1.3.2; 1.3.4;
Add some info to the dmamap_sync assertion messages.
 1.2 01-Feb-2001  marcus Fixed the last raw accesses to use bus_space. Also added DMA mem size field.
 1.1 01-Feb-2001  thorpej GAPS PCI bridge support. Low-level stuff from Marcus, bus_dma
implementation from me.
 1.3.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.3.2.1 01-Feb-2001  bouyer file gapspci_dma.c was added on branch thorpej_scsipi on 2001-02-11 19:09:16 +0000
 1.5.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.5.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.6.10.1 14-Jul-2002  gehenna catch up with -current.
 1.7.8.6 11-Dec-2005  christos Sync with head.
 1.7.8.5 01-Apr-2005  skrll Sync with HEAD.
 1.7.8.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.7.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.8.1 03-Aug-2004  skrll Sync with HEAD
 1.7.2.2 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.7.2.1 02-Jun-2002  drochner file gapspci_dma.c was added on branch nathanw_sa on 2002-06-02 14:44:45 +0000
 1.8.10.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.8.10.1 26-Jan-2005  yamt convert arch/dreamcast to new apis.
 1.8.8.1 29-Apr-2005  kent sync with -current
 1.11.8.1 29-Nov-2005  yamt sync with head.
 1.11.2.3 03-Sep-2007  yamt sync with head.
 1.11.2.2 30-Dec-2006  yamt sync with head.
 1.11.2.1 21-Jun-2006  yamt sync with head.
 1.12.8.1 11-Aug-2006  yamt sync with head
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.10.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.44.3 11-Mar-2010  yamt sync with head
 1.14.44.2 04-May-2009  yamt sync with head.
 1.14.44.1 16-May-2008  yamt sync with head.
 1.14.42.2 17-Jun-2008  yamt sync with head.
 1.14.42.1 18-May-2008  yamt sync with head.
 1.14.40.2 05-Jun-2008  mjf Sync with HEAD.

Also fix build.
 1.14.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.17.4.1 05-Mar-2011  rmind sync with head
 1.19.6.1 18-Feb-2012  mrg merge to -current.
 1.19.2.1 17-Apr-2012  yamt sync with head
 1.18 07-Aug-2021  andvar s/configuraiton/configuration/ in comments and man pages.
 1.17 23-Oct-2015  knakahara fix build failure on dreamcast.
 1.16 02-Oct-2015  msaitoh PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.15 31-Mar-2014  christos branches: 1.15.6;
make a copy of the interrupt string in buf.
 1.14 31-Mar-2014  martin Adapt intr_string signature
 1.13 19-Jul-2011  dyoung branches: 1.13.2; 1.13.12; 1.13.16;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.12 21-Nov-2010  tsutsui Split softc/device_t.
 1.11 01-Aug-2008  marcus branches: 1.11.16;
sysasic_intr_string() takes an IRL, not an IPL.
 1.10 12-Mar-2007  tsutsui branches: 1.10.38; 1.10.42; 1.10.44; 1.10.48;
IRL line connected to each device on sysasic is not always corresponding
with MI IPL_* definitions, so add an independent arg to pass IRL lines
to sysasic_intr_establish() and use appropriate macro for them.
 1.9 07-Aug-2006  tsutsui branches: 1.9.10; 1.9.14;
KNF, TAB/space cosmetics
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.8;
merge ktrace-lwp.
 1.7 19-Feb-2005  tsutsui branches: 1.7.6;
- u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.6 15-Jul-2003  lukem branches: 1.6.8; 1.6.10;
__KERNEL_RCSID()
 1.5 15-Nov-2002  itohy branches: 1.5.6;
Allow multiple event handlers to be installed to an IRL.
The IRL is specified as IPL (2nd arg of sysasic_intr_establish()).
Current mapping:
IRL9 IPL_BIO
IRL11 IPL_NET
IRL13 IPL_TTY
 1.4 15-May-2002  thorpej branches: 1.4.6;
Implement pci_decompose_tag().
 1.3 24-Mar-2002  uch adapted to new interrupt code and shb changes.
 1.2 24-Apr-2001  marcus branches: 1.2.2;
Abstracted handling of System ASIC controlled IRQ:s a little.
Three different IRQ:s can be selected for each event, 9, 11, or 13
(which selects hardware priority). More events to be added as they
are discovered. Do not use shb_intr_establish() to register IRQ 9, 11
or 13 anymore.
 1.1 01-Feb-2001  thorpej branches: 1.1.2; 1.1.4;
GAPS PCI bridge support. Low-level stuff from Marcus, bus_dma
implementation from me.
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 01-Feb-2001  bouyer file gapspci_pci.c was added on branch thorpej_scsipi on 2001-02-11 19:09:16 +0000
 1.2.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.6.2 11-Dec-2002  thorpej Sync with HEAD.
 1.4.6.1 15-May-2002  thorpej file gapspci_pci.c was added on branch nathanw_sa on 2002-12-11 05:58:26 +0000
 1.5.6.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.6.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.6.8.1 29-Apr-2005  kent sync with -current
 1.7.6.2 03-Sep-2007  yamt sync with head.
 1.7.6.1 30-Dec-2006  yamt sync with head.
 1.8.8.1 11-Aug-2006  yamt sync with head
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.9.14.1 13-Mar-2007  ad Sync with head.
 1.9.10.1 24-Mar-2007  yamt sync with head.
 1.10.48.1 19-Oct-2008  haad Sync with HEAD.
 1.10.44.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.10.42.1 04-May-2009  yamt sync with head.
 1.10.38.1 28-Sep-2008  mjf Sync with HEAD.
 1.11.16.1 05-Mar-2011  rmind sync with head
 1.13.16.1 18-May-2014  rmind sync with head
 1.13.12.2 03-Dec-2017  jdolecek update from HEAD
 1.13.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.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.15.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.4 02-Dec-2023  thorpej Use vmem(9) rather than extent(9) to manage the GAPS PCI DMA buffer.
 1.3 21-Nov-2010  tsutsui Split softc/device_t.
 1.2 01-Feb-2001  marcus branches: 1.2.2; 1.2.154;
Fixed the last raw accesses to use bus_space. Also added DMA mem size field.
 1.1 01-Feb-2001  thorpej GAPS PCI bridge support. Low-level stuff from Marcus, bus_dma
implementation from me.
 1.2.154.1 05-Mar-2011  rmind sync with head
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 01-Feb-2001  bouyer file gapspcivar.h was added on branch thorpej_scsipi on 2001-02-11 19:09:16 +0000
 1.9 18-Jul-2018  sevan Be consistent among ethernet drivers on the convention for printing ethernet
addresses.

NFC
 1.8 19-Jul-2011  dyoung branches: 1.8.52; 1.8.54;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.7 12-Apr-2008  tsutsui Split device_t/softc for MI mb86960, with misc cosmetics.
 1.6 12-Mar-2007  tsutsui branches: 1.6.38;
IRL line connected to each device on sysasic is not always corresponding
with MI IPL_* definitions, so add an independent arg to pass IRL lines
to sysasic_intr_establish() and use appropriate macro for them.
 1.5 11-Dec-2005  christos branches: 1.5.26; 1.5.30;
merge ktrace-lwp.
 1.4 19-Feb-2005  tsutsui branches: 1.4.6;
- u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.3 05-Feb-2003  tsutsui branches: 1.3.2; 1.3.10; 1.3.12;
It seems the LAN Adapter on dreamcast actually uses slow 150ns SRAM,
so handle it properly by an additional quirk flag in sc_flags.

The problem was reported by Pat Wendorf on port-dreamcast, and
the fix was suggested and confirmed by Christian Groessler.
 1.2 04-Jan-2003  tsutsui Check chip type first in mbe_g2_detect() to reduce unexpected device access
in mbe_g2_match() when the device does not exist.
 1.1 27-Dec-2002  tsutsui branches: 1.1.2;
Add support for SEGA LAN Adapter, MB86967 based Ethernet adapter.
Based on the patches in port-dreamcast/17493 by Christian Groessler,
with several modification by me.
 1.1.2.3 07-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 29-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 27-Dec-2002  thorpej file if_mbe_g2.c was added on branch nathanw_sa on 2002-12-29 19:21:39 +0000
 1.3.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.3.10.1 29-Apr-2005  kent sync with -current
 1.3.2.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.4.6.1 03-Sep-2007  yamt sync with head.
 1.5.30.1 13-Mar-2007  ad Sync with head.
 1.5.26.1 24-Mar-2007  yamt sync with head.
 1.6.38.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.54.1 10-Jun-2019  christos Sync with HEAD
 1.8.52.1 28-Jul-2018  pgoyette Sync with HEAD
 1.57 05-Jul-2022  andvar s/retrys/retries/ in comments.
 1.56 28-Mar-2022  riastradh sys: Split struct device into a private device_impl.h.

Include this only inside autoconf itself, and a few files that abuse
autoconf in ways I can't confidently make easy fixes for.

XXX kernel ABI change requires bump -- no more use of struct device
internals allowed, previously done by some drivers
 1.55 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.54 24-Apr-2021  thorpej branches: 1.54.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.53 06-May-2019  ryo branches: 1.53.12;
cv_init() must be done before calling maple_scanbus().
ok tsutsui@
 1.52 06-Dec-2015  tsutsui branches: 1.52.18;
Convert tsleep(9)/wakeup(9) pairs to condvar(9) with mutex(9).

Briefly tested with mkbd(4).
 1.51 25-Jul-2014  dholland branches: 1.51.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.50 27-Mar-2014  christos branches: 1.50.2;
correct/add protection against snprintf overflow.
 1.49 26-Mar-2014  christos kill sprintf
 1.48 16-Mar-2014  dholland Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.47 14-Mar-2014  martin Remove unused variables
 1.46 13-Oct-2013  riz Catch up to recent changes in config_pending_{incr,decr}().
 1.45 27-Oct-2012  chs branches: 1.45.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.44 19-Jul-2011  dyoung branches: 1.44.2; 1.44.12;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.43 12-Nov-2010  uebayasi Pull in uvm/uvm.h where UVM's page level interface is used.
 1.42 17-Oct-2010  tsutsui Include "ioconf.h" for struct cfdriver.
 1.41 17-Oct-2010  tsutsui Split device_t/softc.
 1.40 19-Oct-2008  mjf branches: 1.40.14; 1.40.16;
Fix debug code that had bitrotted. This allows the maple(4) driver to
be compiled with MAPLE_DEBUG defined.

o line 798: variable buf shadows previous local
o line 1425: event_thread is no longer a struct proc but now is
a lwp_t. Use the correct p_pid member.
 1.39 01-Aug-2008  marcus sysasic_intr_string() takes an IRL, not an IPL.
 1.38 08-Jun-2008  tsutsui branches: 1.38.4;
Use device_lookup_private() to get softc.
 1.37 04-Jun-2008  ad vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both.
 1.36 28-Apr-2008  martin branches: 1.36.2;
Remove clause 3 and 4 from TNF licenses
 1.35 17-Oct-2007  garbled branches: 1.35.16; 1.35.18; 1.35.20;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.34 09-Jul-2007  ad branches: 1.34.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.33 12-Mar-2007  tsutsui branches: 1.33.2; 1.33.8;
IRL line connected to each device on sysasic is not always corresponding
with MI IPL_* definitions, so add an independent arg to pass IRL lines
to sysasic_intr_establish() and use appropriate macro for them.
 1.32 04-Mar-2007  christos branches: 1.32.2;
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 26-Aug-2005  drochner s/locdesc_t/int/g
 1.29 03-Jul-2005  he branches: 1.29.2;
Make the prototype declaration of maplesubmatch() match the function decl.
 1.28 28-Jun-2005  drochner convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose
(untested, sorry)
 1.27 19-Feb-2005  tsutsui - u_intNN_t -> uintNN_t
- ANSI function decls
- ntohl -> be32toh, htonl -> htobe32, htons -> htobe16
- bcopy -> memcpy, bcmp -> memcmp, bzero -> memset
- some KNF
 1.26 15-Jul-2003  lukem branches: 1.26.8; 1.26.10;
__KERNEL_RCSID()
 1.25 15-Feb-2003  itohy branches: 1.25.2;
constify command buffer
 1.24 11-Feb-2003  itohy Tweak unit ping (removal detect) code to work around problems
with some 3rd party memory cards.
 1.23 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.22 06-Dec-2002  itohy Pass devinfo of the base device (subunit == 0 of the same port)
to sub-drivers.
 1.21 15-Nov-2002  itohy New Maple Bus driver
- interrupt driven
- support hot swapping
- sub-drivers can send commands
 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 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.18 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.17 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.16 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.15 27-Sep-2002  thorpej When in a match routine, the cfdata we're passed always references
our own cfdriver, so don't bother comparing the names, since they
will always match.
 1.14 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.13 02-Jun-2002  drochner branches: 1.13.2;
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.12 25-Mar-2002  uch branches: 1.12.2;
ANSIfy, KNF
 1.11 24-Mar-2002  uch adapted to new interrupt code and shb changes.
 1.10 04-Dec-2001  atatat Fixes to eliminate some compiler complaints, such as:

suggest explicit braces to avoid ambiguous `else'
suggest parentheses around assignment used as truth value
 1.9 22-Jul-2001  wiz branches: 1.9.2;
bcopy -> memcpy, bzero -> memset
 1.8 26-May-2001  chs branches: 1.8.2;
replace vm_page_t with struct vm_page *.
 1.7 26-May-2001  marcus Changed maple device to attach per function instead of per unit.
Raw maple unit access is now possible through /dev/maple*.
 1.6 16-Mar-2001  marcus sc_port_units was set incorrectly at probe time.
 1.5 03-Feb-2001  marcus branches: 1.5.2; 1.5.4;
Added subunit scan.
 1.4 31-Jan-2001  thorpej Make the "maple" bus a direct config bus. Now, when a device is
not configured into the kernel, you know about it, e.g.:

Dreamcast Controller at maple0 port 0 not configured
 1.3 21-Jan-2001  marcus Corrected license text.
 1.2 19-Jan-2001  marcus Better DMA allocator (thanks to Jason R. Thorpe).
 1.1 16-Jan-2001  marcus Maple bus driver.
 1.5.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.5.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.5.2.2 27-Mar-2001  bouyer Sync with HEAD.
 1.5.2.1 03-Feb-2001  bouyer file maple.c was added on branch thorpej_scsipi on 2001-03-27 15:30:39 +0000
 1.8.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.8.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.12.2.2 14-Jul-2002  gehenna catch up with -current.
 1.12.2.1 17-May-2002  gehenna Add device switch.
 1.13.2.6 03-Jan-2003  thorpej Sync with HEAD.
 1.13.2.5 11-Dec-2002  thorpej Sync with HEAD.
 1.13.2.4 11-Nov-2002  nathanw Catch up to -current
 1.13.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.13.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.13.2.1 02-Jun-2002  nathanw file maple.c was added on branch nathanw_sa on 2002-09-17 21:14:12 +0000
 1.25.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.25.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.25.2.4 17-Jan-2005  skrll Adapt to branch.
 1.25.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.25.2.1 03-Aug-2004  skrll Sync with HEAD
 1.26.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.26.8.1 29-Apr-2005  kent sync with -current
 1.29.2.2 03-Sep-2007  yamt sync with head.
 1.29.2.1 21-Jun-2006  yamt sync with head.
 1.31.26.2 24-Mar-2007  yamt sync with head.
 1.31.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.32.2.2 15-Jul-2007  ad Sync with head.
 1.32.2.1 13-Mar-2007  ad Sync with head.
 1.33.8.1 03-Oct-2007  garbled Sync with HEAD
 1.33.2.1 11-Jul-2007  mjf Sync with head.
 1.34.10.1 06-Nov-2007  matt sync with HEAD
 1.35.20.2 04-May-2009  yamt sync with head.
 1.35.20.1 16-May-2008  yamt sync with head.
 1.35.18.2 17-Jun-2008  yamt sync with head.
 1.35.18.1 18-May-2008  yamt sync with head.
 1.35.16.5 17-Jan-2009  mjf Sync with HEAD.
 1.35.16.4 28-Sep-2008  mjf Sync with HEAD.
 1.35.16.3 29-Jun-2008  mjf Sync with HEAD.
 1.35.16.2 05-Jun-2008  mjf Sync with HEAD.

Also fix build.
 1.35.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.36.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.36.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.38.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.38.4.1 19-Oct-2008  haad Sync with HEAD.
 1.40.16.1 05-Mar-2011  rmind sync with head
 1.40.14.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.44.12.3 03-Dec-2017  jdolecek update from HEAD
 1.44.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.44.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.44.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.44.2.1 30-Oct-2012  yamt sync with head
 1.45.2.1 18-May-2014  rmind sync with head
 1.50.2.1 10-Aug-2014  tls Rebase.
 1.51.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.52.18.1 10-Jun-2019  christos Sync with HEAD
 1.53.12.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.53.12.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.54.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.12 17-Oct-2010  tsutsui Split device_t/softc.
 1.11 28-Apr-2008  martin branches: 1.11.20; 1.11.22;
Remove clause 3 and 4 from TNF licenses
 1.10 04-Mar-2007  christos branches: 1.10.40; 1.10.42; 1.10.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.9 11-Dec-2005  christos branches: 1.9.26;
merge ktrace-lwp.
 1.8 19-Feb-2005  tsutsui branches: 1.8.6;
- u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.7 15-Feb-2003  itohy branches: 1.7.2; 1.7.10; 1.7.12;
constify command buffer
 1.6 06-Dec-2002  itohy The value of di_connector_direction is 1 for Dreamcast Gun, 0 for
other devices. It looks like that the value represents the direction
of expansion units (Visual Memory, etc.).
Add definition of the directions.
 1.5 15-Nov-2002  itohy New Maple Bus driver
- interrupt driven
- support hot swapping
- sub-drivers can send commands
 1.4 25-Mar-2002  uch branches: 1.4.6;
ANSIfy, KNF
 1.3 26-May-2001  marcus branches: 1.3.2;
Changed maple device to attach per function instead of per unit.
Raw maple unit access is now possible through /dev/maple*.
 1.2 21-Jan-2001  marcus branches: 1.2.2; 1.2.4;
Corrected license text.
 1.1 16-Jan-2001  marcus Maple bus driver.
 1.2.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.2 21-Jan-2001  marcus Corrected license text.
 1.2.2.1 21-Jan-2001  marcus file maple.h was added on branch thorpej_scsipi on 2001-01-21 22:45:58 +0000
 1.3.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.6.2 11-Dec-2002  thorpej Sync with HEAD.
 1.4.6.1 25-Mar-2002  thorpej file maple.h was added on branch nathanw_sa on 2002-12-11 05:58:27 +0000
 1.7.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.7.10.1 29-Apr-2005  kent sync with -current
 1.7.2.2 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.7.2.1 17-Jan-2005  skrll Adapt to branch.
 1.8.6.2 03-Sep-2007  yamt sync with head.
 1.8.6.1 21-Jun-2006  yamt sync with head.
 1.9.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.10.44.1 16-May-2008  yamt sync with head.
 1.10.42.1 18-May-2008  yamt sync with head.
 1.10.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.22.1 05-Mar-2011  rmind sync with head
 1.11.20.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.6 06-Dec-2002  itohy Pass devinfo of the base device (subunit == 0 of the same port)
to sub-drivers.
 1.5 15-Nov-2002  itohy New Maple Bus driver
- interrupt driven
- support hot swapping
- sub-drivers can send commands
 1.4 25-Mar-2002  uch branches: 1.4.6;
ANSIfy, KNF
 1.3 26-May-2001  marcus branches: 1.3.2;
Changed maple device to attach per function instead of per unit.
Raw maple unit access is now possible through /dev/maple*.
 1.2 21-Jan-2001  marcus branches: 1.2.2; 1.2.4;
Corrected license text.
 1.1 16-Jan-2001  marcus Maple bus driver.
 1.2.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.2 21-Jan-2001  marcus Corrected license text.
 1.2.2.1 21-Jan-2001  marcus file mapleconf.h was added on branch thorpej_scsipi on 2001-01-21 22:45:59 +0000
 1.3.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.6.2 11-Dec-2002  thorpej Sync with HEAD.
 1.4.6.1 25-Mar-2002  thorpej file mapleconf.h was added on branch nathanw_sa on 2002-12-11 05:58:27 +0000
 1.1 26-May-2001  marcus branches: 1.1.2; 1.1.20;
Changed maple device to attach per function instead of per unit.
Raw maple unit access is now possible through /dev/maple*.
 1.1.20.2 26-May-2001  marcus Changed maple device to attach per function instead of per unit.
Raw maple unit access is now possible through /dev/maple*.
 1.1.20.1 26-May-2001  marcus file mapleio.h was added on branch nathanw_sa on 2001-05-26 19:04:40 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 19-Feb-2005  tsutsui - u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.3 25-Mar-2002  uch branches: 1.3.6; 1.3.12; 1.3.20; 1.3.22;
ANSIfy, KNF
 1.2 21-Jan-2001  marcus branches: 1.2.2; 1.2.6;
Corrected license text.
 1.1 16-Jan-2001  marcus Maple bus driver.
 1.2.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 21-Jan-2001  marcus Corrected license text.
 1.2.2.1 21-Jan-2001  marcus file maplereg.h was added on branch thorpej_scsipi on 2001-01-21 22:45:59 +0000
 1.3.22.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.3.20.1 29-Apr-2005  kent sync with -current
 1.3.12.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.3.6.2 25-Mar-2002  uch ANSIfy, KNF
 1.3.6.1 25-Mar-2002  uch file maplereg.h was added on branch nathanw_sa on 2002-03-25 18:59:41 +0000
 1.15 06-Dec-2015  tsutsui Convert tsleep(9)/wakeup(9) pairs to condvar(9) with mutex(9).

Briefly tested with mkbd(4).
 1.14 27-Oct-2012  chs branches: 1.14.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.13 17-Oct-2010  tsutsui branches: 1.13.8; 1.13.18;
Split device_t/softc.
 1.12 28-Apr-2008  martin branches: 1.12.20; 1.12.22;
Remove clause 3 and 4 from TNF licenses
 1.11 17-Oct-2007  garbled branches: 1.11.16; 1.11.18; 1.11.20;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.10 09-Jul-2007  ad branches: 1.10.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.9 11-Dec-2005  christos branches: 1.9.30; 1.9.32; 1.9.38;
merge ktrace-lwp.
 1.8 19-Feb-2005  tsutsui branches: 1.8.6;
- u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.7 15-Feb-2003  itohy branches: 1.7.2; 1.7.10; 1.7.12;
constify command buffer
 1.6 11-Feb-2003  itohy Tweak unit ping (removal detect) code to work around problems
with some 3rd party memory cards.
 1.5 15-Nov-2002  itohy New Maple Bus driver
- interrupt driven
- support hot swapping
- sub-drivers can send commands
 1.4 26-May-2001  marcus branches: 1.4.18;
Changed maple device to attach per function instead of per unit.
Raw maple unit access is now possible through /dev/maple*.
 1.3 03-Feb-2001  marcus branches: 1.3.2; 1.3.4;
Added subunit scan.
 1.2 21-Jan-2001  marcus Corrected license text.
 1.1 16-Jan-2001  marcus Maple bus driver.
 1.3.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.2.2 03-Feb-2001  marcus Added subunit scan.
 1.3.2.1 03-Feb-2001  marcus file maplevar.h was added on branch thorpej_scsipi on 2001-02-03 23:25:52 +0000
 1.4.18.2 11-Dec-2002  thorpej Sync with HEAD.
 1.4.18.1 26-May-2001  thorpej file maplevar.h was added on branch nathanw_sa on 2002-12-11 05:58:27 +0000
 1.7.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.7.10.1 29-Apr-2005  kent sync with -current
 1.7.2.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.8.6.1 03-Sep-2007  yamt sync with head.
 1.9.38.1 03-Oct-2007  garbled Sync with HEAD
 1.9.32.1 11-Jul-2007  mjf Sync with head.
 1.9.30.1 15-Jul-2007  ad Sync with head.
 1.10.10.1 06-Nov-2007  matt sync with HEAD
 1.11.20.1 16-May-2008  yamt sync with head.
 1.11.18.1 18-May-2008  yamt sync with head.
 1.11.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.22.1 05-Mar-2011  rmind sync with head
 1.12.20.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.13.18.2 03-Dec-2017  jdolecek update from HEAD
 1.13.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.8.1 30-Oct-2012  yamt sync with head
 1.14.14.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.32 18-Sep-2021  tsutsui Remove unnecessary (and unimplemented) WSKBD_*BELL ioctls in kbd drivers.

It looks the only ioctl(4) to be implemented for WSKBDIO_*BELL in
the backend keyboard driver is WSKBDIO_COMPLEXBELL.
All other BELL ioctls (WSKBDIO_BELL, WSKBDIO_SETBELL, WSKBDIO_GETBELL,
WSKBDIO_SETDEFAULTBELL, and WSKBDIO_GETDEFAULTBELL) are handled in the
MI wskbd driver (in wskbd_displayioctl() in src/sys/dev/wscons/wskbd.c).
 1.31 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.30 24-Apr-2021  thorpej branches: 1.30.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.29 19-Jul-2011  dyoung branches: 1.29.68;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.28 17-Oct-2010  tsutsui Split device_t/softc.
 1.27 19-Oct-2008  marcus branches: 1.27.14; 1.27.16;
Removed a local variable that is no longer needed (should have been removed in last commit...)
 1.26 19-Oct-2008  marcus Replaced funky delay loop with a call to DELAY (fixed problems with newer GCCs).
 1.25 17-Oct-2007  garbled branches: 1.25.16; 1.25.20; 1.25.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.24 16-Jul-2007  marcus branches: 1.24.10;
Fixed incorrect logic in mkbd_cngetc() (fixes port-dreamcast/28711).
 1.23 04-Mar-2007  christos branches: 1.23.2; 1.23.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.22 11-Dec-2005  christos branches: 1.22.26;
merge ktrace-lwp.
 1.21 06-Mar-2005  tsutsui branches: 1.21.4;
Add two options to change the default keymap:
- options MKBD_LAYOUT="KB_xx"
allow user to override the default keymap
- options MKBD_SWAPCTRLCAPS
allow user to specify swapctrlcaps with the default (probed) keymap
 1.20 19-Feb-2005  tsutsui - u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.19 15-Jul-2003  lukem branches: 1.19.8; 1.19.10;
__KERNEL_RCSID()
 1.18 10-Dec-2002  itohy branches: 1.18.6;
Use WSKBD_TYPE_MAPLE.
 1.17 15-Nov-2002  itohy New Maple Bus driver
- interrupt driven
- support hot swapping
- sub-drivers can send commands
 1.16 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.15 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.14 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.13 25-Mar-2002  uch branches: 1.13.6;
ANSIfy, KNF
 1.12 17-Mar-2002  atatat Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.11 04-Dec-2001  atatat Fixes to eliminate some compiler complaints, such as:

suggest explicit braces to avoid ambiguous `else'
suggest parentheses around assignment used as truth value
 1.10 06-Sep-2001  thorpej Indent.
 1.9 22-Jul-2001  wiz bcopy -> memcpy, bzero -> memset
 1.8 26-May-2001  marcus branches: 1.8.2;
Changed maple device to attach per function instead of per unit.
Raw maple unit access is now possible through /dev/maple*.
 1.7 02-Mar-2001  marcus branches: 1.7.2;
Harmonized keycodes with USB.
 1.6 22-Feb-2001  msaitoh fix a check code whether mkbs is console or not
 1.5 02-Feb-2001  thorpej branches: 1.5.2;
Don't make the reporting of the keyboard type a parenthetical.
 1.4 31-Jan-2001  thorpej Set the keyboard layout based on what type of keyboard
we probe, defaulting to Japanese if we don't know what
kind of keyboard we have.

XXX This should be done differently, if we ever want to
support multiple keyboards.
 1.3 31-Jan-2001  thorpej Recognize the US keyboard.
 1.2 21-Jan-2001  marcus Fixed double-stroke bug.
 1.1 16-Jan-2001  marcus Maple bus keyboard driver.
 1.5.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.5.2.1 02-Feb-2001  bouyer file mkbd.c was added on branch thorpej_scsipi on 2001-03-12 13:28:07 +0000
 1.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.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.8.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.8.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.8.2.1 03-Aug-2001  lukem update to -current
 1.13.6.3 11-Dec-2002  thorpej Sync with HEAD.
 1.13.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.13.6.1 25-Mar-2002  nathanw file mkbd.c was added on branch nathanw_sa on 2002-10-18 02:36:22 +0000
 1.18.6.6 08-Mar-2005  skrll Sync with HEAD.
 1.18.6.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.18.6.4 17-Jan-2005  skrll Adapt to branch.
 1.18.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.18.6.1 03-Aug-2004  skrll Sync with HEAD
 1.19.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.19.8.1 29-Apr-2005  kent sync with -current
 1.21.4.2 03-Sep-2007  yamt sync with head.
 1.21.4.1 21-Jun-2006  yamt sync with head.
 1.22.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.23.10.1 03-Oct-2007  garbled Sync with HEAD
 1.23.2.1 20-Aug-2007  ad Sync with HEAD.
 1.24.10.1 06-Nov-2007  matt sync with HEAD
 1.25.26.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.25.20.1 04-May-2009  yamt sync with head.
 1.25.16.1 17-Jan-2009  mjf Sync with HEAD.
 1.27.16.1 05-Mar-2011  rmind sync with head
 1.27.14.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.29.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.30.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.6 05-Jul-2002  tsutsui Add keydescs for swapctrlcaps, and clean up formating.
 1.5 02-Mar-2001  marcus branches: 1.5.4; 1.5.14; 1.5.18;
Harmonized keycodes with USB.
 1.4 31-Jan-2001  thorpej branches: 1.4.2;
Add a US keyboard map. This may need to be reworked, as this
uses the Japanese keyboard map as the base.
 1.3 21-Jan-2001  marcus Corrected license text.
 1.2 16-Jan-2001  marcus Added keymap for European keyboards.
 1.1 16-Jan-2001  marcus Maple bus keyboard driver.
 1.4.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.4.2.1 31-Jan-2001  bouyer file mkbdmap.h was added on branch thorpej_scsipi on 2001-03-12 13:28:07 +0000
 1.5.18.1 01-Aug-2002  nathanw Catch up to -current.
 1.5.14.1 16-Jul-2002  gehenna catch up with -current.
 1.5.4.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.7 17-Oct-2010  tsutsui Split device_t/softc.
 1.6 11-Dec-2005  christos branches: 1.6.98; 1.6.100;
merge ktrace-lwp.
 1.5 19-Feb-2005  tsutsui - u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.4 15-Nov-2002  itohy branches: 1.4.6; 1.4.14; 1.4.16;
New Maple Bus driver
- interrupt driven
- support hot swapping
- sub-drivers can send commands
 1.3 25-Mar-2002  uch branches: 1.3.6;
ANSIfy, KNF
 1.2 21-Jan-2001  marcus branches: 1.2.2; 1.2.6;
Corrected license text.
 1.1 16-Jan-2001  marcus Maple bus keyboard driver.
 1.2.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 21-Jan-2001  marcus Corrected license text.
 1.2.2.1 21-Jan-2001  marcus file mkbdvar.h was added on branch thorpej_scsipi on 2001-01-21 22:45:59 +0000
 1.3.6.2 11-Dec-2002  thorpej Sync with HEAD.
 1.3.6.1 25-Mar-2002  thorpej file mkbdvar.h was added on branch nathanw_sa on 2002-12-11 05:58:28 +0000
 1.4.16.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.4.14.1 29-Apr-2005  kent sync with -current
 1.4.6.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.6.100.1 05-Mar-2011  rmind sync with head
 1.6.98.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.18 25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

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

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.15 14-Mar-2014  martin Remove unused variables
 1.14 17-Oct-2010  tsutsui branches: 1.14.8; 1.14.18; 1.14.22;
Include "ioconf.h" for struct cfdriver.
 1.13 17-Oct-2010  tsutsui Split device_t/softc.
 1.12 24-Feb-2010  dyoung branches: 1.12.2;
Use device_t, device_private().
 1.11 11-Jun-2008  tsutsui branches: 1.11.16;
Use device_lookup_private() to get softc.
 1.10 08-Jun-2008  tsutsui branches: 1.10.2;
Use device_lookup_private() to get softc.
 1.9 28-Apr-2008  martin branches: 1.9.2;
Remove clause 3 and 4 from TNF licenses
 1.8 04-Mar-2007  christos branches: 1.8.40; 1.8.42; 1.8.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.7 28-Mar-2006  thorpej branches: 1.7.14;
Use device_unit().
 1.6 24-Dec-2005  perry branches: 1.6.4; 1.6.6; 1.6.8; 1.6.10; 1.6.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 19-Feb-2005  tsutsui branches: 1.4.6;
- u_intNN_t -> uintNN_t
- ANSI function decls
- ntohl -> be32toh, htonl -> htobe32, htons -> htobe16
- bcopy -> memcpy, bcmp -> memcmp, bzero -> memset
- some KNF
 1.3 15-Jul-2003  lukem branches: 1.3.8; 1.3.10;
__KERNEL_RCSID()
 1.2 06-Dec-2002  itohy branches: 1.2.2; 1.2.8;
The buf structure (<sys/buf.h>) is not flexible since it is designed for disks,
and use home-grown buffer structure.

Handle display orientation (normal or upside-down) appropriately
by making use of devinfo of base device.
If the LCD is at an expansion slot of a base unit
whose di_connector_direction == MAPLE_CONN_TOP,
the driver automatically rotates the bitmap.
You need not rotate the bitmap before passing to the driver (spec change).
 1.1 15-Nov-2002  itohy Maple Bus monochrome LCD device driver
Reference: US Patent 6,338,105
 1.2.8.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.2.8.4 17-Jan-2005  skrll Adapt to branch.
 1.2.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.8.1 03-Aug-2004  skrll Sync with HEAD
 1.2.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.2.2.1 06-Dec-2002  thorpej file mlcd.c was added on branch nathanw_sa on 2002-12-11 05:58:28 +0000
 1.3.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.3.8.1 29-Apr-2005  kent sync with -current
 1.4.6.2 03-Sep-2007  yamt sync with head.
 1.4.6.1 21-Jun-2006  yamt sync with head.
 1.6.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.6.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.6.8.1 01-Apr-2006  yamt sync with head.
 1.6.6.1 22-Apr-2006  simonb Sync with head.
 1.6.4.1 09-Sep-2006  rpaulo sync with head
 1.7.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.8.44.3 11-Mar-2010  yamt sync with head
 1.8.44.2 04-May-2009  yamt sync with head.
 1.8.44.1 16-May-2008  yamt sync with head.
 1.8.42.2 17-Jun-2008  yamt sync with head.
 1.8.42.1 18-May-2008  yamt sync with head.
 1.8.40.2 29-Jun-2008  mjf Sync with HEAD.
 1.8.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.10.2.1 18-Jun-2008  simonb Sync with head.
 1.11.16.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.11.16.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.12.2.1 05-Mar-2011  rmind sync with head
 1.14.22.1 18-May-2014  rmind sync with head
 1.14.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.8.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.17.2.1 10-Aug-2014  tls Rebase.
 1.26 26-Apr-2015  mlelstv Use C99-style initializers for struct dkdriver.
 1.25 02-Jan-2015  christos We have three sets of DTYPE_ constants in the kernel:
altq Drop Type
disklabel Disk Type
file Descriptor Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.
 1.24 25-Jul-2014  dholland branches: 1.24.4;
Add d_discard to all struct cdevsw instances I could find.

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

I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
 1.22 26-Mar-2014  christos branches: 1.22.2;
kill sprintf
 1.21 16-Mar-2014  dholland Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.20 17-Oct-2010  tsutsui branches: 1.20.8; 1.20.18; 1.20.22;
Include "ioconf.h" for struct cfdriver.
 1.19 17-Oct-2010  tsutsui Split device_t/softc.
 1.18 13-Jan-2009  yamt branches: 1.18.4; 1.18.6;
g/c BUFQ_FOO() macros and use bufq_foo() directly.
 1.17 11-Jun-2008  tsutsui branches: 1.17.4;
Use device_lookup_private() to get softc.
 1.16 08-Jun-2008  tsutsui branches: 1.16.2;
Use device_lookup_private() to get softc.
 1.15 28-Apr-2008  martin branches: 1.15.2;
Remove clause 3 and 4 from TNF licenses
 1.14 17-Oct-2007  garbled branches: 1.14.16; 1.14.18; 1.14.20;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.13 08-Oct-2007  ad Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
 1.12 29-Jul-2007  ad branches: 1.12.4; 1.12.6; 1.12.8;
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.11 29-Jul-2007  ad It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.10 06-Mar-2007  he branches: 1.10.2; 1.10.10; 1.10.12; 1.10.14;
Cast to char* before doing pointer arithmetic.
 1.9 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.8 28-Mar-2006  thorpej branches: 1.8.14;
Use device_unit().
 1.7 11-Dec-2005  christos branches: 1.7.4; 1.7.6; 1.7.8; 1.7.10; 1.7.12;
merge ktrace-lwp.
 1.6 15-Oct-2005  yamt - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
from sys/bufq.h to sys/bufq_impl.h.
(is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c. (not tested)
 1.5 19-Feb-2005  tsutsui branches: 1.5.6;
- u_intNN_t -> uintNN_t
- ANSI function decls
- ntohl -> be32toh, htonl -> htobe32, htons -> htobe16
- bcopy -> memcpy, bcmp -> memcmp, bzero -> memset
- some KNF
 1.4 28-Oct-2004  yamt branches: 1.4.4; 1.4.6;
move buffer queue related stuffs from buf.h to their own header, bufq.h.
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 06-Dec-2002  itohy branches: 1.2.2; 1.2.8;
minor changes
fix typo
 1.1 15-Nov-2002  itohy Maple Bus storage device driver
Reference: US Patent 6,338,105
 1.2.8.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.8.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.2.8.5 17-Jan-2005  skrll Adapt to branch.
 1.2.8.4 02-Nov-2004  skrll Sync with HEAD.
 1.2.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.8.1 03-Aug-2004  skrll Sync with HEAD
 1.2.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.2.2.1 06-Dec-2002  thorpej file mmemcard.c was added on branch nathanw_sa on 2002-12-11 05:58:28 +0000
 1.4.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.4.4.1 29-Apr-2005  kent sync with -current
 1.5.6.3 27-Oct-2007  yamt sync with head.
 1.5.6.2 03-Sep-2007  yamt sync with head.
 1.5.6.1 21-Jun-2006  yamt sync with head.
 1.7.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.7.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.7.8.1 01-Apr-2006  yamt sync with head.
 1.7.6.1 22-Apr-2006  simonb Sync with head.
 1.7.4.1 09-Sep-2006  rpaulo sync with head
 1.8.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.10.14.1 15-Aug-2007  skrll Sync with HEAD.
 1.10.12.1 07-Aug-2007  matt Sync with HEAD.
 1.10.10.2 16-Oct-2007  garbled Sync with HEAD
 1.10.10.1 03-Oct-2007  garbled Sync with HEAD
 1.10.2.3 09-Oct-2007  ad Sync with head.
 1.10.2.2 20-Aug-2007  ad - Alter disk attach/detach to fix a panic when closing a vnd device.
- Sync with HEAD.
 1.10.2.1 19-Aug-2007  ad - Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).
 1.12.8.1 14-Oct-2007  yamt sync with head.
 1.12.6.1 06-Nov-2007  matt sync with HEAD
 1.12.4.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.14.20.2 04-May-2009  yamt sync with head.
 1.14.20.1 16-May-2008  yamt sync with head.
 1.14.18.2 17-Jun-2008  yamt sync with head.
 1.14.18.1 18-May-2008  yamt sync with head.
 1.14.16.3 17-Jan-2009  mjf Sync with HEAD.
 1.14.16.2 29-Jun-2008  mjf Sync with HEAD.
 1.14.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.16.2.1 18-Jun-2008  simonb Sync with head.
 1.17.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.18.6.1 05-Mar-2011  rmind sync with head
 1.18.4.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.20.22.1 18-May-2014  rmind sync with head
 1.20.18.2 03-Dec-2017  jdolecek update from HEAD
 1.20.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.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.22.2.1 10-Aug-2014  tls Rebase.
 1.24.4.2 06-Jun-2015  skrll Sync with HEAD
 1.24.4.1 06-Apr-2015  skrll Sync with HEAD
 1.19 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.18 24-Apr-2021  thorpej branches: 1.18.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.17 27-Oct-2012  chs branches: 1.17.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.16 17-Oct-2010  tsutsui branches: 1.16.8; 1.16.18;
Make local functions static.
 1.15 17-Oct-2010  tsutsui Split device_t/softc.
 1.14 28-Apr-2008  martin branches: 1.14.20; 1.14.22;
Remove clause 3 and 4 from TNF licenses
 1.13 04-Mar-2007  christos branches: 1.13.40; 1.13.42; 1.13.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.12 12-Nov-2006  plunky branches: 1.12.4;
Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.11 11-Dec-2005  christos branches: 1.11.20; 1.11.22;
merge ktrace-lwp.
 1.10 19-Feb-2005  tsutsui branches: 1.10.6;
- u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.9 10-Dec-2003  tsutsui branches: 1.9.8; 1.9.10;
Invert Y-axis value for mms(4). From Yasushi Oshima on port-dreamcast.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 10-Dec-2002  itohy branches: 1.7.6;
Use use WSMOUSE_TYPE_MAPLE.
Enable periodic GETCOND only if the mouse is enabled.
 1.6 15-Nov-2002  itohy New Maple Bus driver
- interrupt driven
- support hot swapping
- sub-drivers can send commands
 1.5 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.4 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 17-Mar-2002  atatat branches: 1.2.8;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.1 06-Sep-2001  thorpej branches: 1.1.4;
Driver for the Dreamcast mouse, based on the programming info
on Marcus's web site.

Not yet thoroughly tested, but does appear to generate events
that look okay.
 1.1.4.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.4.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.4.1 06-Sep-2001  thorpej file mms.c was added on branch kqueue on 2001-09-13 01:13:34 +0000
 1.2.8.3 11-Dec-2002  thorpej Sync with HEAD.
 1.2.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.8.1 17-Mar-2002  nathanw file mms.c was added on branch nathanw_sa on 2002-10-18 02:36:22 +0000
 1.7.6.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.7.6.4 17-Jan-2005  skrll Adapt to branch.
 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.9.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.9.8.1 29-Apr-2005  kent sync with -current
 1.10.6.3 03-Sep-2007  yamt sync with head.
 1.10.6.2 30-Dec-2006  yamt sync with head.
 1.10.6.1 21-Jun-2006  yamt sync with head.
 1.11.22.1 10-Dec-2006  yamt sync with head.
 1.11.20.1 18-Nov-2006  ad Sync with head.
 1.12.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.13.44.1 16-May-2008  yamt sync with head.
 1.13.42.1 18-May-2008  yamt sync with head.
 1.13.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.22.1 05-Mar-2011  rmind sync with head
 1.14.20.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.16.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.16.8.1 30-Oct-2012  yamt sync with head
 1.17.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.18.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.6 25-Sep-2022  ryo arm side of aica(4) sometimes became unresponsive when audioplay was performed several times.

- disabled data cache at startup.
- compiled with cross-arm-none-eabi-gcc-8.3.0nb4 of pkg.
- added memset() in asm because gcc8 (and later) detects the zero clear part in
own bzero function and calls memset internally, and bzero were replaced with memset.
 1.5 06-May-2019  ryo branches: 1.5.2;
don't use tsleep() in interrupt context.
when the audio starts playing, initialization is performed on the aica arm driver side.
 1.4 04-Mar-2006  uwe branches: 1.4.160;
s/u_intN_t/uintN_t/
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.6;
merge ktrace-lwp.
 1.2 18-Sep-2004  itohy branches: 1.2.12;
Make sure the string dollar NetBSD doller is stored literally.
 1.1 24-Aug-2003  marcus branches: 1.1.4;
Added AICA sound driver contributed by Ryo Shimizu.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 24-Aug-2003  skrll file Makefile was added on branch ktrace-lwp on 2004-08-03 10:33:53 +0000
 1.2.12.1 21-Jun-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.160.1 10-Jun-2019  christos Sync with HEAD
 1.5.2.1 20-Apr-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1628):

sys/arch/dreamcast/dev/microcode/aica_armcode.h: revision 1.5
sys/arch/dreamcast/dev/microcode/aica_arm_locore.S: revision 1.4
sys/arch/dreamcast/dev/microcode/aica_arm_locore.S: revision 1.5
sys/arch/dreamcast/dev/microcode/Makefile: revision 1.6
sys/arch/dreamcast/dev/microcode/aica_arm.c: revision 1.7
sys/arch/dreamcast/dev/microcode/aica_arm.c: revision 1.8

arm side of aica(4) sometimes became unresponsive when audioplay was performed several times.
- disabled data cache at startup.
- compiled with cross-arm-none-eabi-gcc-8.3.0nb4 of pkg.
- added memset() in asm because gcc8 (and later) detects the zero clear part in
own bzero function and calls memset internally, and bzero were replaced with memset.
improve comment, update mailaddr, and remove clause 3 from my licenses.
 1.9 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.8 25-Sep-2022  ryo improve comment, update mailaddr, and remove clause 3 from my licenses.
 1.7 25-Sep-2022  ryo arm side of aica(4) sometimes became unresponsive when audioplay was performed several times.

- disabled data cache at startup.
- compiled with cross-arm-none-eabi-gcc-8.3.0nb4 of pkg.
- added memset() in asm because gcc8 (and later) detects the zero clear part in
own bzero function and calls memset internally, and bzero were replaced with memset.
 1.6 06-May-2019  ryo branches: 1.6.2;
don't use tsleep() in interrupt context.
when the audio starts playing, initialization is performed on the aica arm driver side.
 1.5 18-Mar-2009  cegger branches: 1.5.64;
Ansify function definitions w/o arguments. Generated with sed.
 1.4 24-Dec-2005  perry branches: 1.4.78; 1.4.86; 1.4.92;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 19-Feb-2005  tsutsui branches: 1.2.6;
- u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.1 24-Aug-2003  marcus branches: 1.1.4; 1.1.10; 1.1.12;
Added AICA sound driver contributed by Ryo Shimizu.
 1.1.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.10.1 29-Apr-2005  kent sync with -current
 1.1.4.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 24-Aug-2003  skrll file aica_arm.c was added on branch ktrace-lwp on 2004-08-03 10:33:53 +0000
 1.2.6.1 21-Jun-2006  yamt sync with head.
 1.4.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.78.1 04-May-2009  yamt sync with head.
 1.5.64.1 10-Jun-2019  christos Sync with HEAD
 1.6.2.1 20-Apr-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1628):

sys/arch/dreamcast/dev/microcode/aica_armcode.h: revision 1.5
sys/arch/dreamcast/dev/microcode/aica_arm_locore.S: revision 1.4
sys/arch/dreamcast/dev/microcode/aica_arm_locore.S: revision 1.5
sys/arch/dreamcast/dev/microcode/Makefile: revision 1.6
sys/arch/dreamcast/dev/microcode/aica_arm.c: revision 1.7
sys/arch/dreamcast/dev/microcode/aica_arm.c: revision 1.8

arm side of aica(4) sometimes became unresponsive when audioplay was performed several times.
- disabled data cache at startup.
- compiled with cross-arm-none-eabi-gcc-8.3.0nb4 of pkg.
- added memset() in asm because gcc8 (and later) detects the zero clear part in
own bzero function and calls memset internally, and bzero were replaced with memset.
improve comment, update mailaddr, and remove clause 3 from my licenses.
 1.7 09-Feb-2024  andvar fix spelling mistakes, mainly in comments and log messages.
 1.6 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.5 25-Sep-2022  ryo improve comment, update mailaddr, and remove clause 3 from my licenses.
 1.4 25-Sep-2022  ryo arm side of aica(4) sometimes became unresponsive when audioplay was performed several times.

- disabled data cache at startup.
- compiled with cross-arm-none-eabi-gcc-8.3.0nb4 of pkg.
- added memset() in asm because gcc8 (and later) detects the zero clear part in
own bzero function and calls memset internally, and bzero were replaced with memset.
 1.3 06-May-2019  ryo branches: 1.3.2;
don't use tsleep() in interrupt context.
when the audio starts playing, initialization is performed on the aica arm driver side.
 1.2 11-Dec-2005  christos branches: 1.2.166;
merge ktrace-lwp.
 1.1 24-Aug-2003  marcus branches: 1.1.4;
Added AICA sound driver contributed by Ryo Shimizu.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 24-Aug-2003  skrll file aica_arm_locore.S was added on branch ktrace-lwp on 2004-08-03 10:33:53 +0000
 1.2.166.1 10-Jun-2019  christos Sync with HEAD
 1.3.2.1 20-Apr-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1628):

sys/arch/dreamcast/dev/microcode/aica_armcode.h: revision 1.5
sys/arch/dreamcast/dev/microcode/aica_arm_locore.S: revision 1.4
sys/arch/dreamcast/dev/microcode/aica_arm_locore.S: revision 1.5
sys/arch/dreamcast/dev/microcode/Makefile: revision 1.6
sys/arch/dreamcast/dev/microcode/aica_arm.c: revision 1.7
sys/arch/dreamcast/dev/microcode/aica_arm.c: revision 1.8

arm side of aica(4) sometimes became unresponsive when audioplay was performed several times.
- disabled data cache at startup.
- compiled with cross-arm-none-eabi-gcc-8.3.0nb4 of pkg.
- added memset() in asm because gcc8 (and later) detects the zero clear part in
own bzero function and calls memset internally, and bzero were replaced with memset.
improve comment, update mailaddr, and remove clause 3 from my licenses.
 1.5 25-Sep-2022  ryo arm side of aica(4) sometimes became unresponsive when audioplay was performed several times.

- disabled data cache at startup.
- compiled with cross-arm-none-eabi-gcc-8.3.0nb4 of pkg.
- added memset() in asm because gcc8 (and later) detects the zero clear part in
own bzero function and calls memset internally, and bzero were replaced with memset.
 1.4 06-May-2019  ryo branches: 1.4.2;
don't use tsleep() in interrupt context.
when the audio starts playing, initialization is performed on the aica arm driver side.
 1.3 11-Dec-2005  christos branches: 1.3.166;
merge ktrace-lwp.
 1.2 19-Feb-2005  tsutsui - u_intNN_t -> uintNN_t
- more ANSI function decls
- sone KNF
 1.1 24-Aug-2003  marcus branches: 1.1.4; 1.1.10; 1.1.12;
Added AICA sound driver contributed by Ryo Shimizu.
 1.1.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.10.1 29-Apr-2005  kent sync with -current
 1.1.4.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 24-Aug-2003  skrll file aica_armcode.h was added on branch ktrace-lwp on 2004-08-03 10:33:53 +0000
 1.3.166.1 10-Jun-2019  christos Sync with HEAD
 1.4.2.1 20-Apr-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1628):

sys/arch/dreamcast/dev/microcode/aica_armcode.h: revision 1.5
sys/arch/dreamcast/dev/microcode/aica_arm_locore.S: revision 1.4
sys/arch/dreamcast/dev/microcode/aica_arm_locore.S: revision 1.5
sys/arch/dreamcast/dev/microcode/Makefile: revision 1.6
sys/arch/dreamcast/dev/microcode/aica_arm.c: revision 1.7
sys/arch/dreamcast/dev/microcode/aica_arm.c: revision 1.8

arm side of aica(4) sometimes became unresponsive when audioplay was performed several times.
- disabled data cache at startup.
- compiled with cross-arm-none-eabi-gcc-8.3.0nb4 of pkg.
- added memset() in asm because gcc8 (and later) detects the zero clear part in
own bzero function and calls memset internally, and bzero were replaced with memset.
improve comment, update mailaddr, and remove clause 3 from my licenses.
 1.1 24-Aug-2003  marcus branches: 1.1.4;
Added AICA sound driver contributed by Ryo Shimizu.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 24-Aug-2003  skrll file ldscript was added on branch ktrace-lwp on 2004-08-03 10:33:53 +0000
 1.10 29-Jul-2012  mlelstv Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

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

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

Make cpu_rootconf(9) describe the calling order.
 1.9 28-Apr-2008  martin branches: 1.9.34; 1.9.40;
Remove clause 3 and 4 from TNF licenses
 1.8 03-Dec-2007  ad branches: 1.8.14; 1.8.16; 1.8.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.7 11-Dec-2005  christos branches: 1.7.30; 1.7.48; 1.7.50; 1.7.56;
merge ktrace-lwp.
 1.6 19-Feb-2005  tsutsui branches: 1.6.6;
- ANSI function decls (func() -> func(void))
- u_intNN_t -> uintNN_t
- some KNF
 1.5 15-Jul-2003  lukem branches: 1.5.8; 1.5.10;
__KERNEL_RCSID()
 1.4 24-Mar-2002  uch branches: 1.4.6; 1.4.12;
adapted to new interrupt code and shb changes.
 1.3 08-Mar-2002  uch remove unneeded code and files.
 1.2 22-Feb-2002  uch New NetBSD/sh3 clock framework.
+ hardclock source is moved from TMU1 to TMU0.
+ SH3/SH4 common kernel support.
+ PCLOCK estimation.
+ remove duplicated code.
 1.1 06-Feb-2001  uch branches: 1.1.2; 1.1.4; 1.1.6;
move machine-port specific file to machine directory.
for evbsh3, mmeye and dreamcast, use MI md_root.c
 1.1.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.2 26-Sep-2001  fvdl * add a VCLONED vnode flag that indicates a vnode representing a cloned
device.
* rename REVOKEALL to REVOKEALIAS, and add a REVOKECLONE flag, to pass
to VOP_REVOKE
* the revoke system call will revoke all aliases, as before, but not the
clones
* vdevgone is called when detaching a device, so make it use REVOKECLONE
to get rid of all clones as well
* clean up all uses of VOP_OPEN wrt. locking.
* add a few VOPS to spec_vnops that need to do something when it's a
clone vnode (access and getattr)
* add a copy of the vnode vattr structure of the original 'master' vnode
to the specinfo of a cloned vnode. could possibly redirect getattr to
the 'master' vnode, but this has issues with revoke
* add a vdev_reassignvp function that disassociates a vnode from its
original device, and reassociates it with the specified dev_t. to be
used by cloning devices only, in case a new minor is allocated.
* change all direct references in drivers to v_devcookie and v_rdev
to vdev_privdata(vp) and vdev_rdev(vp). for diagnostic purposes
when debugging race conditions that still exist wrt. locking and
revoking vnodes.
* make the locking state of a vnode consistent when passed to
d_open and d_close (unlocked). locked would be better, but has
some deadlock issues
 1.1.4.1 18-Sep-2001  fvdl Various changes to make cloning devices possible:

* Add an extra argument (struct vnode **) to VOP_OPEN. If it is
not NULL, specfs will create a cloned (aliased) vnode during
the call, and return it there. The caller should release and
unlock the original vnode if a new vnode was returned. The
new vnode is returned locked.

* Add a flag field to the cdevsw and bdevsw structures.
DF_CLONING indicates that it wants a new vnode for each
open (XXX is there a better way? devprop?)

* If a device is cloning, always call the close entry
point for a VOP_CLOSE.


Also, rewrite cons.c to do the right thing with vnodes. Use VOPs
rather then direct device entry calls. Suggested by mycroft@

Light to moderate testing done an i386 system (arch doesn't matter
though, these are MI changes).
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 06-Feb-2001  bouyer file autoconf.c was added on branch thorpej_scsipi on 2001-02-11 19:09:17 +0000
 1.4.12.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.4.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.12.1 03-Aug-2004  skrll Sync with HEAD
 1.4.6.2 24-Mar-2002  uch adapted to new interrupt code and shb changes.
 1.4.6.1 24-Mar-2002  uch file autoconf.c was added on branch nathanw_sa on 2002-03-24 18:21:11 +0000
 1.5.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.5.8.1 29-Apr-2005  kent sync with -current
 1.6.6.1 07-Dec-2007  yamt sync with head
 1.7.56.1 08-Dec-2007  mjf Sync with HEAD.
 1.7.50.1 09-Jan-2008  matt sync with HEAD
 1.7.48.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.7.30.1 03-Dec-2007  ad Sync with HEAD.
 1.8.18.1 16-May-2008  yamt sync with head.
 1.8.16.1 18-May-2008  yamt sync with head.
 1.8.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.40.1 08-Aug-2012  martin Pull up following revision(s) (requested by mlelstv in ticket #466):
sys/arch/amiga/amiga/autoconf.c: revision 1.113
sys/arch/rs6000/rs6000/autoconf.c: revision 1.4
sys/arch/emips/emips/autoconf.c: revision 1.6
sys/arch/sandpoint/sandpoint/autoconf.c: revision 1.27
sys/arch/evbmips/alchemy/autoconf.c: revision 1.18
sys/arch/sgimips/sgimips/autoconf.c: revision 1.43
sys/arch/atari/atari/autoconf.c: revision 1.63
sys/arch/powerpc/oea/ofw_autoconf.c: revision 1.17
sys/arch/mmeye/mmeye/autoconf.c: revision 1.9
distrib/sets/lists/comp/mi: revision 1.1771
sys/arch/mipsco/mipsco/autoconf.c: revision 1.25
sys/arch/iyonix/iyonix/autoconf.c: revision 1.14
sys/arch/hp300/hp300/autoconf.c: revision 1.100
sys/kern/init_main.c: revision 1.445
sys/arch/pmax/pmax/autoconf.c: revision 1.79
sys/arch/netwinder/netwinder/autoconf.c: revision 1.11
sys/arch/dreamcast/dreamcast/autoconf.c: revision 1.10
sys/arch/ibmnws/ibmnws/autoconf.c: revision 1.12
sys/arch/evbppc/ev64260/autoconf.c: revision 1.17
sys/arch/evbmips/gdium/autoconf.c: revision 1.5
sys/arch/algor/algor/autoconf.c: revision 1.21
share/man/man9/Makefile: revision 1.367
sys/arch/ews4800mips/ews4800mips/autoconf.c: revision 1.9
sys/arch/amigappc/amigappc/autoconf.c: revision 1.5
sys/arch/x86/x86/x86_autoconf.c: revision 1.65
sys/arch/acorn26/acorn26/autoconf.c: revision 1.9
sys/arch/mvmeppc/mvmeppc/autoconf.c: revision 1.13
sys/arch/vax/vax/autoconf.c: revision 1.94
sys/arch/usermode/dev/cpu.c: revision 1.72
sys/arch/evbppc/virtex/autoconf.c: revision 1.5
sys/arch/next68k/next68k/autoconf.c: revision 1.26
sys/arch/mac68k/mac68k/autoconf.c: revision 1.73
sys/arch/ia64/ia64/autoconf.c: revision 1.6
sys/arch/evbppc/obs405/obs405_autoconf.c: revision 1.6
share/man/man9/cpu_rootconf.9: revision 1.7
sys/arch/landisk/landisk/autoconf.c: revision 1.6
sys/arch/evbmips/malta/autoconf.c: revision 1.16
sys/arch/sun3/sun3/autoconf.c: revision 1.76
sys/arch/evbppc/explora/autoconf.c: revision 1.13
sys/arch/sun3/sun3/autoconf.c: revision 1.77
sys/arch/evbmips/loongson/autoconf.c: revision 1.3
sys/arch/evbmips/atheros/autoconf.c: revision 1.11
sys/arch/sparc64/sparc64/autoconf.c: revision 1.188
sys/arch/acorn32/acorn32/autoconf.c: revision 1.18
sys/arch/evbarm/evbarm/autoconf.c: revision 1.13
sys/arch/cobalt/cobalt/autoconf.c: revision 1.30
sys/arch/mvme68k/mvme68k/autoconf.c: revision 1.46
sys/arch/hp700/hp700/autoconf.c: revision 1.48
sys/arch/evbmips/adm5120/autoconf.c: revision 1.5
sys/arch/hpcmips/hpcmips/autoconf.c: revision 1.25
sys/arch/alpha/alpha/autoconf.c: revision 1.52
sys/arch/sparc/sparc/autoconf.c: revision 1.244
sys/arch/evbppc/pmppc/autoconf.c: revision 1.7
sys/arch/bebox/bebox/autoconf.c: revision 1.25
sys/arch/luna68k/luna68k/autoconf.c: revision 1.13
sys/arch/hpcarm/hpcarm/autoconf.c: revision 1.20
sys/arch/evbppc/walnut/autoconf.c: revision 1.21
sys/arch/cesfic/cesfic/autoconf.c: revision 1.26
sys/arch/cats/cats/autoconf.c: revision 1.17
sys/arch/x68k/x68k/autoconf.c: revision 1.67
sys/arch/news68k/news68k/autoconf.c: revision 1.21
sys/arch/arc/arc/autoconf.c: revision 1.34
sys/arch/evbsh3/evbsh3/autoconf.c: revision 1.11
sys/sys/conf.h: revision 1.143
sys/arch/evbmips/rasoc/autoconf.c: revision 1.3
sys/arch/hpcsh/hpcsh/autoconf.c: revision 1.26
sys/arch/sun68k/sun68k/autoconf.c: revision 1.29
sys/arch/evbmips/rmixl/autoconf.c: revision 1.6
sys/arch/zaurus/zaurus/autoconf.c: revision 1.12
sys/arch/xen/x86/autoconf.c: revision 1.15
sys/arch/evbppc/mpc85xx/autoconf.c: revision 1.6
sys/arch/shark/shark/autoconf.c: revision 1.18
sys/arch/prep/prep/autoconf.c: revision 1.25
sys/arch/newsmips/newsmips/autoconf.c: revision 1.36
sys/arch/sbmips/sbmips/autoconf.c: revision 1.8
Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.
No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().
Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().
Make cpu_rootconf(9) describe the calling order.
add rootconf(9) as a link to cpu_rootconf(9)
make this compile again
 1.9.34.1 30-Oct-2012  yamt sync with head
 1.4 22-Feb-2002  uch branches: 1.4.10;
New NetBSD/sh3 clock framework.
+ hardclock source is moved from TMU1 to TMU0.
+ SH3/SH4 common kernel support.
+ PCLOCK estimation.
+ remove duplicated code.
 1.3 19-Feb-2002  uch Clean up functions
disable_intr, enable_intr, disable_interrupt, enable_interrupt,
disable_ext_intr, enable_ext_intr.
New functions:
for external interrupt:
_cpu_intr_suspend and _cpu_intr_resume.
for exception:
_cpu_exception_suspend and _cpu_exception_resume.
 1.2 01-Feb-2002  uch if PCLOCK isn't setted, use estimated value calculated by kernel.
 1.1 23-Apr-2001  uch branches: 1.1.2; 1.1.4;
dreamcast clock module was separated.
 1.1.4.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.10.2 22-Feb-2002  uch New NetBSD/sh3 clock framework.
+ hardclock source is moved from TMU1 to TMU0.
+ SH3/SH4 common kernel support.
+ PCLOCK estimation.
+ remove duplicated code.
 1.4.10.1 22-Feb-2002  uch file clock.c was added on branch nathanw_sa on 2002-02-22 19:43:59 +0000
 1.8 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.7 20-Sep-2006  uwe branches: 1.7.52; 1.7.54; 1.7.56;
Switch the rest of sh3 ports to todr(9)
Split code to handle on-chip rtc into a separate driver
Eliminate all todr code from clock.c
Move __HAVE_GENERIC_TODR to sh3/include/types.h
 1.6 05-Sep-2006  uwe branches: 1.6.2; 1.6.4;
Switch dreamcast to MI todr(9).

Dreamcast does not use SuperH on-chip RTC, so do it seprately from
other sh3 ports. Convert dreamcast rtc code into a real device
instead of searching/attaching it manually.

Tested by Nick Hudson.
 1.5 11-Dec-2005  christos branches: 1.5.4; 1.5.8;
merge ktrace-lwp.
 1.4 19-Feb-2005  tsutsui branches: 1.4.6;
- ANSI function decls (func() -> func(void))
- u_intNN_t -> uintNN_t
- some KNF
 1.3 07-Aug-2003  marcus branches: 1.3.8; 1.3.10;
* RTC can now be set to a new date.
Thanks to Ryo Shimizu for sending in a patch.
* Use proper G2 bus space functions to enforce locking protocol.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 22-Feb-2002  uch branches: 1.1.2; 1.1.8; 1.1.16; 1.1.22;
New NetBSD/sh3 clock framework.
+ hardclock source is moved from TMU1 to TMU0.
+ SH3/SH4 common kernel support.
+ PCLOCK estimation.
+ remove duplicated code.
 1.1.22.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.22.1 03-Aug-2004  skrll Sync with HEAD
 1.1.16.2 22-Feb-2002  uch New NetBSD/sh3 clock framework.
+ hardclock source is moved from TMU1 to TMU0.
+ SH3/SH4 common kernel support.
+ PCLOCK estimation.
+ remove duplicated code.
 1.1.16.1 22-Feb-2002  uch file clock_machdep.c was added on branch nathanw_sa on 2002-02-22 19:43:59 +0000
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 22-Feb-2002  jdolecek file clock_machdep.c was added on branch kqueue on 2002-03-16 15:57:24 +0000
 1.1.2.1 28-Feb-2002  nathanw Catch up to -current.
 1.3.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.3.8.1 29-Apr-2005  kent sync with -current
 1.4.6.1 30-Dec-2006  yamt sync with head.
 1.5.8.1 14-Sep-2006  yamt sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.6.4.1 22-Oct-2006  yamt sync with head
 1.6.2.1 18-Nov-2006  ad Sync with head.
 1.7.56.1 16-May-2008  yamt sync with head.
 1.7.54.1 18-May-2008  yamt sync with head.
 1.7.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.12 11-Dec-2005  christos merge ktrace-lwp.
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 26-Oct-2002  jdolecek branches: 1.10.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.9 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.8 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.7 17-Jun-2002  christos branches: 1.7.2;
MD systrace gluons.
 1.6 24-Mar-2002  uch branches: 1.6.2;
Remove unneeded device and fix comment
 1.5 12-Jan-2002  manu Added clockctl
 1.4 26-May-2001  marcus branches: 1.4.2;
Changed maple device to attach per function instead of per unit.
Raw maple unit access is now possible through /dev/maple*.
 1.3 21-Jan-2001  marcus branches: 1.3.2;
Added GDROM device.
 1.2 16-Jan-2001  marcus WSCONS console added.
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file conf.c was added on branch thorpej_scsipi on 2001-01-08 14:56:19 +0000
 1.3.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.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.4.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.2.3 21-Jul-2002  gehenna catch up with -current.
 1.6.2.2 14-Jul-2002  gehenna catch up with -current.
 1.6.2.1 16-May-2002  gehenna Bye block/character device swicth tables.
 1.7.2.4 11-Nov-2002  nathanw Catch up to -current
 1.7.2.3 17-Sep-2002  nathanw Catch up to -current.
 1.7.2.2 01-Aug-2002  nathanw Catch up to -current.
 1.7.2.1 17-Jun-2002  nathanw file conf.c was added on branch nathanw_sa on 2002-08-01 02:41:30 +0000
 1.10.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.6.1 03-Aug-2004  skrll Sync with HEAD
 1.3 24-Feb-2002  uch branches: 1.3.10;
Move common exception vector and scheduler code to
sh3/sh3/exception_vector.S and sh3/sh3/locore_subr.S. exception
vectors are installed by sh_cpu_init(). machine/locore.S contains
kernel entry, interrupt handler, and some MD code.
 1.2 15-Feb-2001  marcus branches: 1.2.4;
Removed LED_ADDR (Dreamcast doesn't have program controllable LEDs).
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file genassym.cf was added on branch thorpej_scsipi on 2001-01-08 14:56:20 +0000
 1.2.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.3.10.2 24-Feb-2002  uch Move common exception vector and scheduler code to
sh3/sh3/exception_vector.S and sh3/sh3/locore_subr.S. exception
vectors are installed by sh_cpu_init(). machine/locore.S contains
kernel entry, interrupt handler, and some MD code.
 1.3.10.1 24-Feb-2002  uch file genassym.cf was added on branch nathanw_sa on 2002-02-24 18:19:42 +0000
 1.5 06-Jul-2004  uch MI part of kloader moved to dev/kloader.c from arch/hpc/hpc/
dreamcast and playstation2 port are changed to use this.
 1.4 14-Jun-2004  tsutsui Pull some fixes from hpc/kloader.c rev 1.13:
> malloc program/section header table instead of fixed array.
> add debug print.
 1.3 14-Jun-2004  tsutsui Suppress gcc uninitialized variable warning.
 1.2 15-Jul-2003  lukem branches: 1.2.4;
__KERNEL_RCSID()
 1.1 14-Jun-2003  tsutsui branches: 1.1.2;
Add kloader (in-kernel kernel bootloader) support written by
UCHIYAMA Yasushi (uch@netbsd).

XXX Some of these code should be moved into MI place to share
XXX between other ports.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.2.4.2 14-Apr-2005  tron Pull up revision 1.4 (requested by tsutsui in ticket #1069):
Pull some fixes from hpc/kloader.c rev 1.13:
malloc program/section header table instead of fixed array.
add debug print.
 1.2.4.1 14-Apr-2005  tron Pull up revision 1.3 (requested by tsutsui in ticket #1069):
Suppress gcc uninitialized variable warning.
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 24-Dec-2005  perry branches: 1.4.74; 1.4.76; 1.4.78;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 19-Feb-2005  tsutsui branches: 1.2.6;
- ANSI function decls (func() -> func(void))
- u_intNN_t -> uintNN_t
- some KNF
 1.1 06-Jul-2004  uch branches: 1.1.2; 1.1.6; 1.1.8;
MI part of kloader moved to dev/kloader.c from arch/hpc/hpc/
dreamcast and playstation2 port are changed to use this.
 1.1.8.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.6.1 29-Apr-2005  kent sync with -current
 1.1.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 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 06-Jul-2004  skrll file kloader_machdep.c was added on branch ktrace-lwp on 2004-08-03 10:33:53 +0000
 1.2.6.1 21-Jun-2006  yamt sync with head.
 1.4.78.1 16-May-2008  yamt sync with head.
 1.4.76.1 18-May-2008  yamt sync with head.
 1.4.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.9 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.8 11-Dec-2005  christos branches: 1.8.74; 1.8.76; 1.8.78;
merge ktrace-lwp.
 1.7 31-May-2005  chs remove vestigal {,e}intr{names,cnt} symbols now that vmstat doesn't need them.
 1.6 04-Apr-2004  tsutsui Add ALTENTRY(kernel_text) for pmap(1).
 1.5 09-May-2002  uch branches: 1.5.6; 1.5.12; 1.5.14;
change bootstrap stack to below the 'start'
 1.4 24-Mar-2002  uch adapted to new interrupt code and shb changes.
 1.3 17-Mar-2002  uch adapt to kernel stack treatment changes.
 1.2 28-Feb-2002  uch branches: 1.2.2; 1.2.8;
Change foo_r0_r1 macro in sh3/locore.h to foo(Rn, Rm)
 1.1 24-Feb-2002  uch Move common exception vector and scheduler code to
sh3/sh3/exception_vector.S and sh3/sh3/locore_subr.S. exception
vectors are installed by sh_cpu_init(). machine/locore.S contains
kernel entry, interrupt handler, and some MD code.
 1.2.8.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.2.8.1 28-Feb-2002  jdolecek file locore.S was added on branch kqueue on 2002-03-16 15:57:24 +0000
 1.2.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.2.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.2.1 28-Feb-2002  nathanw Catch up to -current.
 1.5.14.1 11-Apr-2004  jmc Pullup rev 1.6 (requested by tsutsui in ticket #121)

Add ALTENTRY(kernel_text) for pmap(1).
 1.5.12.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.12.1 03-Aug-2004  skrll Sync with HEAD
 1.5.6.2 09-May-2002  uch change bootstrap stack to below the 'start'
 1.5.6.1 09-May-2002  uch file locore.S was added on branch nathanw_sa on 2002-05-09 12:32:56 +0000
 1.8.78.1 16-May-2008  yamt sync with head.
 1.8.76.1 18-May-2008  yamt sync with head.
 1.8.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.14 24-Feb-2002  uch branches: 1.14.10;
Move common exception vector and scheduler code to
sh3/sh3/exception_vector.S and sh3/sh3/locore_subr.S. exception
vectors are installed by sh_cpu_init(). machine/locore.S contains
kernel entry, interrupt handler, and some MD code.
 1.13 22-Feb-2002  uch setjmp,longjmp are moved to sh3/locore_subr.S
 1.12 19-Feb-2002  uch Clean up functions
disable_intr, enable_intr, disable_interrupt, enable_interrupt,
disable_ext_intr, enable_ext_intr.
New functions:
for external interrupt:
_cpu_intr_suspend and _cpu_intr_resume.
for exception:
_cpu_exception_suspend and _cpu_exception_resume.
 1.11 17-Feb-2002  uch Fix calling convention. r0-r7 are caller saved.
 1.10 27-Oct-2001  msaitoh Fix incorrect kernelmode check in INTRENTRY macro.
Broken INTRENTRY causes CPU reset when sigaltstack is used.
 1.9 10-Aug-2001  msaitoh branches: 1.9.4;
fix a ldtlb handling bug:

- set to PTE{H,L,A} and call LDTLB must do atomically.
- never call LDTLB when it's unnecessary.

Broken kernel oocasionally causes cpu reset when /etc/security is called.
Now fix this problem.
 1.8 15-May-2001  msaitoh branches: 1.8.2;
convert two consecutive "shll"s with one "shll2"
 1.7 01-Mar-2001  marcus branches: 1.7.2;
Dropped the leading underscore on _etext and _end, due to move to ELF.
 1.6 14-Feb-2001  msaitoh _C_LABEL()
 1.5 05-Feb-2001  thorpej Rename the CLI/STI/ECLI/ESTI macros to more descriptive names,
and add comments to describe exactly what they do (because it's
not totally obvious at a glance, due to the number juggling necessary
to frob the correct bits in SR):

CLI -> EXCEPT_DISABLE (sets SR.BL)
STI -> EXCEPT_ENABLE (clears SR.BL)

ECLI -> INTR_DISABLE (sets SR.I[0-3])
ESTI -> INTR_ENABLE (clears SR.I[0-3])
 1.4 30-Jan-2001  msaitoh more use _C_LABEL()
 1.3 29-Jan-2001  msaitoh use macro for CCR register
 1.2 05-Jan-2001  marcus branches: 1.2.2;
Fixed initial cache setup to handle launch from P2 as well as P1.
 1.1 11-Dec-2000  marcus Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.2.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.2.2.1 05-Jan-2001  bouyer file locore.s was added on branch thorpej_scsipi on 2001-01-08 14:56:20 +0000
 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 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.9.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.14.10.2 24-Feb-2002  uch Move common exception vector and scheduler code to
sh3/sh3/exception_vector.S and sh3/sh3/locore_subr.S. exception
vectors are installed by sh_cpu_init(). machine/locore.S contains
kernel entry, interrupt handler, and some MD code.
 1.14.10.1 24-Feb-2002  uch file locore.s was added on branch nathanw_sa on 2002-02-24 18:19:42 +0000
 1.47 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.46 05-Feb-2024  andvar triple "r" typos, mainly s/interrrupt/interrupt/ in comments and one definition.
 1.45 24-Mar-2014  christos use cpu_{g,s}etmodel
 1.44 14-Mar-2014  martin Remove an unused variable
 1.43 11-Jun-2012  tsutsui branches: 1.43.2; 1.43.4;
Explicitly include <machine/pcb.h> for struct pcb.
Fixes build error on GENERIC + no options DDB, reported by Yasushi Oshima.

Should be pulled up to netbsd-6.
 1.42 20-Dec-2010  matt branches: 1.42.8; 1.42.14;
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.41 13-Oct-2010  tsutsui Prepare empty module_init_md() for options MODULAR.
It just works on dreamcast even with root on gdrom environment.
 1.40 27-Nov-2009  rmind branches: 1.40.2; 1.40.4;
- Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.
 1.39 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.38 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.37 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.36 28-Apr-2008  martin branches: 1.36.6; 1.36.8;
Remove clause 3 and 4 from TNF licenses
 1.35 07-Jan-2008  uwe branches: 1.35.6; 1.35.8; 1.35.10;
Now that sh3 has didicated interrupt stack we can check for cpu_intr_p
with simple sp comparison, so we can drop ci_idepth.
 1.34 03-Dec-2007  ad branches: 1.34.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.33 22-Feb-2007  thorpej branches: 1.33.4; 1.33.20; 1.33.28;
TRUE -> true, FALSE -> false
 1.32 24-Dec-2005  perry branches: 1.32.26;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.31 11-Dec-2005  christos merge ktrace-lwp.
 1.30 19-Feb-2005  tsutsui branches: 1.30.6;
- ANSI function decls (func() -> func(void))
- u_intNN_t -> uintNN_t
- some KNF
 1.29 06-Jul-2004  uch branches: 1.29.4; 1.29.6;
MI part of kloader moved to dev/kloader.c from arch/hpc/hpc/
dreamcast and playstation2 port are changed to use this.
 1.28 24-Mar-2004  atatat Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
 1.27 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.26 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.25 15-Jul-2003  lukem __KERNEL_RCSID()
 1.24 14-Jun-2003  tsutsui branches: 1.24.2;
Add kloader (in-kernel kernel bootloader) support written by
UCHIYAMA Yasushi (uch@netbsd).

XXX Some of these code should be moved into MI place to share
XXX between other ports.
 1.23 26-Apr-2003  ragge Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.22 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.21 10-May-2002  uch branches: 1.21.6;
Don't reset to old interrupt level at the exit of interrupt handler.
It didn't ensure the maximum interrupt nest depth.
 1.20 09-May-2002  uch adapt to new pmap.
 1.19 24-Mar-2002  uch adapted to new interrupt code and shb changes.
 1.18 17-Mar-2002  uch cosmetic changes, fix comments.
 1.17 17-Mar-2002  uch adapt to kernel stack treatment changes.
 1.16 11-Mar-2002  uch clean up a little.
 1.15 10-Mar-2002  uch proc0 and page table intialize routines are moved to sh3_machdep.c
 1.14 08-Mar-2002  uch remove unneeded code and files.
 1.13 03-Mar-2002  uch machine dependent sysctl are moved to machine/cpu.h
dreamcast, hpcsh ... CPU_CONSDEV
mmeye, evbsh3 ... CPU_CONSDEV, CPU_LOADANDRESET
 1.12 02-Mar-2002  uch Initial support for KGDB on the sh3.
 1.11 28-Feb-2002  uch cpu_dumpconf, reserve_dumppages, dumpsys, cpu_reset are moved to sh3/sh3_machdep.c
 1.10 28-Feb-2002  uch Cleanup register definition
 1.9 24-Feb-2002  uch Move common exception vector and scheduler code to
sh3/sh3/exception_vector.S and sh3/sh3/locore_subr.S. exception
vectors are installed by sh_cpu_init(). machine/locore.S contains
kernel entry, interrupt handler, and some MD code.
 1.8 22-Feb-2002  uch New NetBSD/sh3 clock framework.
+ hardclock source is moved from TMU1 to TMU0.
+ SH3/SH4 common kernel support.
+ PCLOCK estimation.
+ remove duplicated code.
 1.7 19-Feb-2002  uch Clean up functions
disable_intr, enable_intr, disable_interrupt, enable_interrupt,
disable_ext_intr, enable_ext_intr.
New functions:
for external interrupt:
_cpu_intr_suspend and _cpu_intr_resume.
for exception:
_cpu_exception_suspend and _cpu_exception_resume.
 1.6 17-Feb-2002  uch sh_cpu_init() is added. its initialize cache, MMU ops appropriately.
machine locore code call this at first.
 1.5 27-Jan-2002  thorpej Update for a leading-underscore-free ELF world.
 1.4 22-Jul-2001  wiz bcopy -> memcpy, bzero -> memset
 1.3 30-May-2001  lukem branches: 1.3.2;
add missing #include "opt_kgdb.h"
 1.2 31-Jan-2001  thorpej branches: 1.2.2;
New bus_space and bus_dma framework, based on the Alpha implemetation.
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file machdep.c was added on branch thorpej_scsipi on 2001-01-08 14:56:21 +0000
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.3.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.2.1 03-Aug-2001  lukem update to -current
 1.21.6.2 21-Jun-2002  thorpej When calling main(), load the new kernel stack from lwp0.
 1.21.6.1 10-May-2002  thorpej file machdep.c was added on branch nathanw_sa on 2002-06-21 16:59:36 +0000
 1.24.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 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.29.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.29.4.1 29-Apr-2005  kent sync with -current
 1.30.6.4 21-Jan-2008  yamt sync with head
 1.30.6.3 07-Dec-2007  yamt sync with head
 1.30.6.2 26-Feb-2007  yamt sync with head.
 1.30.6.1 21-Jun-2006  yamt sync with head.
 1.32.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.33.28.2 18-Feb-2008  mjf Sync with HEAD.
 1.33.28.1 08-Dec-2007  mjf Sync with HEAD.
 1.33.20.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.33.4.2 03-Dec-2007  ad Sync with HEAD.
 1.33.4.1 03-Dec-2007  ad Sync with HEAD.
 1.34.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.35.10.3 11-Mar-2010  yamt sync with head
 1.35.10.2 04-May-2009  yamt sync with head.
 1.35.10.1 16-May-2008  yamt sync with head.
 1.35.8.1 18-May-2008  yamt sync with head.
 1.35.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.35.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.36.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.36.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.40.4.1 05-Mar-2011  rmind sync with head
 1.40.2.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.42.14.1 28-Jun-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #360):
sys/arch/dreamcast/dreamcast/machdep.c: revision 1.43
Explicitly include <machine/pcb.h> for struct pcb.
Fixes build error on GENERIC + no options DDB, reported by Yasushi Oshima.
Should be pulled up to netbsd-6.
 1.42.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.42.8.1 30-Oct-2012  yamt sync with head
 1.43.4.1 18-May-2014  rmind sync with head
 1.43.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.12 24-Apr-2021  thorpej branches: 1.12.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.11 21-Nov-2010  tsutsui branches: 1.11.74;
Make local functions/variable static.
 1.10 21-Nov-2010  tsutsui Use CFATTACH_DECL_NEW() (no softc).
 1.9 28-Apr-2008  martin branches: 1.9.22;
Remove clause 3 and 4 from TNF licenses
 1.8 11-Dec-2005  christos branches: 1.8.74; 1.8.76; 1.8.78;
merge ktrace-lwp.
 1.7 19-Feb-2005  tsutsui - ANSI function decls (func() -> func(void))
- u_intNN_t -> uintNN_t
- some KNF
 1.6 15-Jul-2003  lukem branches: 1.6.8; 1.6.10;
__KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 24-Mar-2002  uch branches: 1.3.6;
add cpu device. sync with shb change.
 1.2 08-Mar-2002  uch remove unneeded code and files.
 1.1 06-Feb-2001  uch branches: 1.1.2; 1.1.6;
move machine-port specific file to machine directory.
for evbsh3, mmeye and dreamcast, use MI md_root.c
 1.1.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 06-Feb-2001  bouyer file mainbus.c was added on branch thorpej_scsipi on 2001-02-11 19:09:18 +0000
 1.3.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.3.6.1 24-Mar-2002  nathanw file mainbus.c was added on branch nathanw_sa on 2002-10-18 02:36:22 +0000
 1.5.6.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.6.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.6.8.1 29-Apr-2005  kent sync with -current
 1.8.78.1 16-May-2008  yamt sync with head.
 1.8.76.1 18-May-2008  yamt sync with head.
 1.8.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.22.1 05-Mar-2011  rmind sync with head
 1.11.74.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.12.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 27-Mar-2002  uch branches: 1.2.4;
All the sh3 ports had an identical procfs_machdep.c, so use a common
file under arch/sh3/sh3.
 1.1 17-Jan-2001  fvdl branches: 1.1.2; 1.1.6;
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.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 17-Jan-2001  fvdl Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
 1.1.2.1 17-Jan-2001  fvdl file procfs_machdep.c was added on branch thorpej_scsipi on 2001-01-17 00:07:24 +0000
 1.2.4.2 27-Mar-2002  uch All the sh3 ports had an identical procfs_machdep.c, so use a common
file under arch/sh3/sh3.
 1.2.4.1 27-Mar-2002  uch file procfs_machdep.c was added on branch nathanw_sa on 2002-03-27 10:44:42 +0000
 1.10 24-Mar-2002  uch branches: 1.10.4;
adapted to new interrupt code and shb changes.
 1.9 17-Mar-2002  uch adapt to kernel stack treatment changes.
 1.8 28-Feb-2002  uch branches: 1.8.4;
Cleanup register definition
 1.7 22-Feb-2002  uch New NetBSD/sh3 clock framework.
+ hardclock source is moved from TMU1 to TMU0.
+ SH3/SH4 common kernel support.
+ PCLOCK estimation.
+ remove duplicated code.
 1.6 19-Feb-2002  uch Clean up functions
disable_intr, enable_intr, disable_interrupt, enable_interrupt,
disable_ext_intr, enable_ext_intr.
New functions:
for external interrupt:
_cpu_intr_suspend and _cpu_intr_resume.
for exception:
_cpu_exception_suspend and _cpu_exception_resume.
 1.5 24-Apr-2001  marcus branches: 1.5.2;
Abstracted handling of System ASIC controlled IRQ:s a little.
Three different IRQ:s can be selected for each event, 9, 11, or 13
(which selects hardware priority). More events to be added as they
are discovered. Do not use shb_intr_establish() to register IRQ 9, 11
or 13 anymore.
 1.4 20-Feb-2001  marcus branches: 1.4.2;
Added GDROM interrupt support at IRQ9 (need to clean this up...)
 1.3 31-Jan-2001  thorpej Support for masking/unmasking IRQ 11 (used by the G2/GAPS bridge).
From Marcus.
 1.2 15-Jan-2001  thorpej Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.5 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.4 15-Feb-2001  bouyer Re-sync with HEAD files which were out of sync.
 1.1.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file shb.c was added on branch thorpej_scsipi on 2001-01-08 14:56:21 +0000
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.8.4.1 17-Mar-2002  thorpej IPL_IMP -> IPL_VM
 1.10.4.2 24-Mar-2002  uch adapted to new interrupt code and shb changes.
 1.10.4.1 24-Mar-2002  uch file shb.c was added on branch nathanw_sa on 2002-03-24 18:21:11 +0000
 1.14 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.13 12-Mar-2007  tsutsui branches: 1.13.38; 1.13.40; 1.13.42;
IRL line connected to each device on sysasic is not always corresponding
with MI IPL_* definitions, so add an independent arg to pass IRL lines
to sysasic_intr_establish() and use appropriate macro for them.
 1.12 24-Dec-2005  perry branches: 1.12.26; 1.12.30;
bare asm -> __asm
 1.11 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 19-Feb-2005  tsutsui branches: 1.9.6;
- ANSI function decls (func() -> func(void))
- u_intNN_t -> uintNN_t
- some KNF
 1.8 14-Jun-2004  itohy branches: 1.8.4; 1.8.6;
Correctly handle ``events with handler'' and ``events enabled'' separately.
Problem pointed out by Harold Gutch and Izumi Tsutsui.
 1.7 17-May-2004  thorpej Fix missing parenthesis in DIAGNOSTIC message.
 1.6 07-May-2004  itohy Fix typos. Cleanup.
 1.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 15-Nov-2002  itohy branches: 1.4.6;
Allow multiple event handlers to be installed to an IRL.
The IRL is specified as IPL (2nd arg of sysasic_intr_establish()).
Current mapping:
IRL9 IPL_BIO
IRL11 IPL_NET
IRL13 IPL_TTY
 1.3 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.2 24-Mar-2002  uch branches: 1.2.6;
adapted to new interrupt code and shb changes.
 1.1 24-Apr-2001  marcus branches: 1.1.2; 1.1.4;
Abstracted handling of System ASIC controlled IRQ:s a little.
Three different IRQ:s can be selected for each event, 9, 11, or 13
(which selects hardware priority). More events to be added as they
are discovered. Do not use shb_intr_establish() to register IRQ 9, 11
or 13 anymore.
 1.1.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.4.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.6.3 11-Dec-2002  thorpej Sync with HEAD.
 1.2.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.6.1 24-Mar-2002  nathanw file sysasic.c was added on branch nathanw_sa on 2002-10-18 02:36:23 +0000
 1.4.6.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.4.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.8.4.1 29-Apr-2005  kent sync with -current
 1.9.6.2 03-Sep-2007  yamt sync with head.
 1.9.6.1 21-Jun-2006  yamt sync with head.
 1.12.30.1 13-Mar-2007  ad Sync with head.
 1.12.26.1 24-Mar-2007  yamt sync with head.
 1.13.42.1 16-May-2008  yamt sync with head.
 1.13.40.1 18-May-2008  yamt sync with head.
 1.13.38.1 02-Jun-2008  mjf Sync with HEAD.
 1.21 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.20 12-Jul-2018  maxv branches: 1.20.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.19 25-Aug-2016  christos branches: 1.19.14; 1.19.16;
fenv.h for sh
 1.18 19-Jul-2011  dyoung branches: 1.18.12; 1.18.30;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.17 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.16 09-Feb-2007  ad Merge newlock2 to head.
 1.15 26-Jul-2006  drochner branches: 1.15.4;
don't install <machine/db_machdep.h>, this is kernel only
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.8;
merge ktrace-lwp.
 1.13 08-May-2004  kleink branches: 1.13.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.12 17-Jan-2003  thorpej branches: 1.12.2;
Merge the nathanw_sa branch.
 1.11 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.10 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.9 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.8 09-May-2002  uch branches: 1.8.2; 1.8.6;
remove trap.h
 1.7 24-Mar-2002  uch adapted to new interrupt code and shb changes.
 1.6 08-Mar-2002  uch remove unneeded code and files.
 1.5 15-Apr-2001  kleink branches: 1.5.2;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.4 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.3 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
 1.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 11-Dec-2000  marcus branches: 1.1.2; 1.1.4;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 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-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file Makefile was added on branch thorpej_scsipi on 2001-01-08 14:56:22 +0000
 1.5.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.5.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.5.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.8.6.5 11-Dec-2002  thorpej Sync with HEAD.
 1.8.6.4 17-Sep-2002  nathanw Catch up to -current.
 1.8.6.3 13-Aug-2002  nathanw Catch up to -current.
 1.8.6.2 20-Jun-2002  thorpej Machine-dependent kernel portion of {get,set}context(). From
Klaus Klein.
 1.8.6.1 09-May-2002  thorpej file Makefile was added on branch nathanw_sa on 2002-06-20 23:00:42 +0000
 1.8.2.2 30-Aug-2002  gehenna catch up with -current.
 1.8.2.1 19-May-2002  gehenna Remove port-dependent conf.h.
 1.12.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.12.2 26-Feb-2007  yamt sync with head.
 1.13.12.1 30-Dec-2006  yamt sync with head.
 1.14.8.1 11-Aug-2006  yamt sync with head
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.15.4.1 01-Feb-2007  ad Header file cleanup.
 1.18.30.1 05-Oct-2016  skrll Sync with HEAD
 1.18.12.1 03-Dec-2017  jdolecek update from HEAD
 1.19.16.1 10-Jun-2019  christos Sync with HEAD
 1.19.14.1 28-Jul-2018  pgoyette Sync with HEAD
 1.20.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 11-Dec-2000  marcus branches: 1.1.2; 1.1.216;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.216.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file ansi.h was added on branch thorpej_scsipi on 2001-01-08 14:56:22 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file aout_machdep.h was added on branch thorpej_scsipi on 2001-01-08 14:56:23 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file asm.h was added on branch thorpej_scsipi on 2001-01-08 14:56:23 +0000
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 11-Dec-2005  christos branches: 1.3.74; 1.3.76; 1.3.78;
merge ktrace-lwp.
 1.2 02-Jun-2005  he Fix const fallout.
 1.1 24-Mar-2002  uch branches: 1.1.6; 1.1.8; 1.1.14;
add autoconf.h for new mainbus driver.
 1.1.14.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 24-Mar-2002  jdolecek file autoconf.h was added on branch kqueue on 2002-06-23 17:35:36 +0000
 1.1.6.2 24-Mar-2002  uch add autoconf.h for new mainbus driver.
 1.1.6.1 24-Mar-2002  uch file autoconf.h was added on branch nathanw_sa on 2002-03-24 18:28:13 +0000
 1.3.78.1 16-May-2008  yamt sync with head.
 1.3.76.1 18-May-2008  yamt sync with head.
 1.3.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 08-Mar-2002  uch branches: 1.2.8;
remove unneeded code and files.
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.6;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file bootinfo.h was added on branch thorpej_scsipi on 2001-01-08 14:56:24 +0000
 1.2.8.2 08-Mar-2002  uch remove unneeded code and files.
 1.2.8.1 08-Mar-2002  uch file bootinfo.h was added on branch nathanw_sa on 2002-03-08 13:22:13 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file bswap.h was added on branch thorpej_scsipi on 2001-01-08 14:56:24 +0000
 1.16 19-Jul-2011  dyoung Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.15 23-Aug-2009  tsutsui Add an empty bus_space_mmap(9) function as temporary workaround
for MI pci(4) mmap function in sys/dev/pci/pci_usrreq.c.

XXX: no bus_space_subregion(9) for g2bus.
 1.14 28-Apr-2008  martin branches: 1.14.10; 1.14.18;
Remove clause 3 and 4 from TNF licenses
 1.13 04-Mar-2007  christos branches: 1.13.40; 1.13.42; 1.13.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.12 21-Feb-2007  mrg add a pair of new bus_dma(9) functions:
int _bus_dmatag_subregion(bus_dma_tag_t tag,
bus_addr_t min_addr,
bus_addr_t max_addr,
bus_dma_tag_t *newtag,
int flags)
void _bus_dmatag_destroy(bus_dma_tag_t tag)

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

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

XXX: bus_dma(9) needs an update still.
 1.11 11-Dec-2005  christos branches: 1.11.26;
merge ktrace-lwp.
 1.10 09-Mar-2005  matt branches: 1.10.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.9 19-Feb-2005  tsutsui u_intNN_t -> uintNN_t
 1.8 15-Jun-2003  fvdl branches: 1.8.2; 1.8.10; 1.8.12;
Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
 1.7 28-Jan-2003  kent Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it.
 1.6 25-Mar-2002  uch branches: 1.6.6;
ANSIfy, KNF
 1.5 19-Jul-2001  thorpej 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.4 07-Mar-2001  thorpej branches: 1.4.2;
Add the BUS_DMA_STREAMING flag.
 1.3 02-Feb-2001  marcus branches: 1.3.2;
Fixed type mismatch in debug output...
 1.2 31-Jan-2001  thorpej New bus_space and bus_dma framework, based on the Alpha implemetation.
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file bus.h was added on branch thorpej_scsipi on 2001-01-08 14:56:24 +0000
 1.3.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.4.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.1 03-Aug-2001  lukem update to -current
 1.6.6.2 25-Mar-2002  uch ANSIfy, KNF
 1.6.6.1 25-Mar-2002  uch file bus.h was added on branch nathanw_sa on 2002-03-25 18:59:41 +0000
 1.8.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.8.10.1 29-Apr-2005  kent sync with -current
 1.8.2.2 01-Apr-2005  skrll Sync with HEAD.
 1.8.2.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.10.4.2 03-Sep-2007  yamt sync with head.
 1.10.4.1 26-Feb-2007  yamt sync with head.
 1.11.26.2 12-Mar-2007  rmind Sync with HEAD.
 1.11.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.13.44.2 16-Sep-2009  yamt sync with head
 1.13.44.1 16-May-2008  yamt sync with head.
 1.13.42.1 18-May-2008  yamt sync with head.
 1.13.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.18.1 21-Apr-2010  matt sync to netbsd-5
 1.14.10.1 16-Sep-2009  snj Pull up following revision(s) (requested by mrg in ticket #952):
sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c: revision 1.15
sys/arch/dreamcast/include/bus.h: revision 1.15
Add an empty bus_space_mmap(9) function as a workaround
for MI pci(4) mmap function in sys/dev/pci/pci_usrreq.c.
XXX: no bus_space_subregion(9) for g2bus.
 1.2 23-Sep-2019  skrll Provide PRIxBUSADDR, PRIxBUSSIZE, PRIuBUSSIZE, and PRIxBSH for all arches
to follow arm and (generic) mips.

Reviewed by christos.
 1.1 19-Jul-2011  dyoung branches: 1.1.54;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.1.54.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1 19-Jul-2011  dyoung Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark dreamcast/bus.h obsolete.
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file cdefs.h was added on branch thorpej_scsipi on 2001-01-08 14:56:25 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file coff_machdep.h was added on branch thorpej_scsipi on 2001-01-08 14:56:25 +0000
 1.4 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.3 27-Feb-2002  christos branches: 1.3.8; 1.3.12;
- define other DEV_ constants that the local port uses.
- delete cdev_decl(mm) since <sys/conf.h> does it.
 1.2 26-Mar-2001  lukem branches: 1.2.2;
- add dev_noimpl(xxx,yyy) macro to replace "(dev_type_xxx((*))) yyy",
and use appropriately

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

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

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

- ensure that the comments are accurate WRT the behaviour of a given entry
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.4;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.1.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file conf.h was added on branch thorpej_scsipi on 2001-01-08 14:56:26 +0000
 1.2.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.3.12.2 17-Sep-2002  nathanw Catch up to -current.
 1.3.12.1 27-Feb-2002  nathanw file conf.h was added on branch nathanw_sa on 2002-09-17 21:14:15 +0000
 1.3.8.1 19-May-2002  gehenna Remove port-dependent conf.h.
 1.3 04-Mar-2002  uch branches: 1.3.10;
CTL_MACHDEP definitions are integrated into sh3/include/cpu.h again.
 1.2 03-Mar-2002  uch machine dependent sysctl are moved to machine/cpu.h
dreamcast, hpcsh ... CPU_CONSDEV
mmeye, evbsh3 ... CPU_CONSDEV, CPU_LOADANDRESET
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.6;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file cpu.h was added on branch thorpej_scsipi on 2001-01-08 14:56:26 +0000
 1.3.10.2 04-Mar-2002  uch CTL_MACHDEP definitions are integrated into sh3/include/cpu.h again.
 1.3.10.1 04-Mar-2002  uch file cpu.h was added on branch nathanw_sa on 2002-03-04 14:36:14 +0000
 1.2 03-Mar-2002  uch branches: 1.2.8;
remove obsolete headers.
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.6;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file cpufunc.h was added on branch thorpej_scsipi on 2001-01-08 14:56:26 +0000
 1.2.8.2 03-Mar-2002  uch remove obsolete headers.
 1.2.8.1 03-Mar-2002  uch file cpufunc.h was added on branch nathanw_sa on 2002-03-03 14:59:56 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file cputypes.h was added on branch thorpej_scsipi on 2001-01-08 14:56:27 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file db_machdep.h was added on branch thorpej_scsipi on 2001-01-08 14:56:27 +0000
 1.4 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.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 12-Jun-2005  dyoung Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.

To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.26;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.26.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file disklabel.h was added on branch thorpej_scsipi on 2001-01-08 14:56:28 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file elf_machdep.h was added on branch thorpej_scsipi on 2001-01-08 14:56:28 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file endian.h was added on branch thorpej_scsipi on 2001-01-08 14:56:29 +0000
 1.2 03-Jan-2001  itojun branches: 1.2.2;
remove #if 0'ed portion
 1.1 11-Dec-2000  marcus Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.2.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.2.2.1 03-Jan-2001  bouyer file endian_machdep.h was added on branch thorpej_scsipi on 2001-01-08 14:56:29 +0000
 1.1 25-Aug-2016  christos branches: 1.1.2; 1.1.4; 1.1.18;
fenv.h for sh
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 25-Aug-2016  jdolecek file fenv.h was added on branch tls-maxphys on 2017-12-03 11:36:01 +0000
 1.1.4.2 05-Oct-2016  skrll Sync with HEAD
 1.1.4.1 25-Aug-2016  skrll file fenv.h was added on branch nick-nhusb on 2016-10-05 20:55:26 +0000
 1.1.2.2 14-Sep-2016  pgoyette Sync with HEAD
 1.1.2.1 25-Aug-2016  pgoyette file fenv.h was added on branch pgoyette-localcount on 2016-09-14 03:04:17 +0000
 1.2 19-Apr-2003  christos PR/3012: Greg A. Woods: Write all float.h files [except the vax of course]
in terms of float_ieee.h
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file float.h was added on branch thorpej_scsipi on 2001-01-08 14:56:29 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file frame.h was added on branch thorpej_scsipi on 2001-01-08 14:56:30 +0000
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 23-Oct-2003  kleink No need for multiple-inclusion protection in these.
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.26;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.26.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.26.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.26.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file ieee.h was added on branch thorpej_scsipi on 2001-01-08 14:56:30 +0000
 1.2 05-Aug-2008  matt Update <machine/ieeefp.h> to use the C99 FE_* definitions instead of the
NetBSD defined ones. Redefine the NetBSD ones in terms of the C99 ones.
Step 1 to having <fenv.h>
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.128; 1.1.132; 1.1.134; 1.1.138;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.138.1 19-Oct-2008  haad Sync with HEAD.
 1.1.134.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.132.1 04-May-2009  yamt sync with head.
 1.1.128.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file ieeefp.h was added on branch thorpej_scsipi on 2001-01-08 14:56:31 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.22;
Add definitions of C99 integer constant macros.
 1.1.22.2 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
 1.1.22.1 14-Apr-2001  kleink file int_const.h was added on branch nathanw_sa on 2001-04-14 22:38:37 +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:53:28 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.22;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.22.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.22.1 15-Apr-2001  kleink file int_fmtio.h was added on branch nathanw_sa on 2001-04-15 17:13:09 +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:53:28 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.22;
Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.22.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.22.1 15-Apr-2001  kleink file int_limits.h was added on branch nathanw_sa on 2001-04-15 15:29:06 +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:53:28 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.22;
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.22.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.22.1 14-Apr-2001  kleink file int_mwgwtypes.h was added on branch nathanw_sa on 2001-04-14 12:19:53 +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:53:28 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file int_types.h was added on branch thorpej_scsipi on 2001-01-08 14:56:31 +0000
 1.10 02-Nov-2021  ryo In order to prevent _mcount() from being recursively called when built with COPTS=-O0,
sprinkle `__always_inline' to make _mcount() be generated as a single function.
 1.9 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.8 03-Dec-2007  ad branches: 1.8.14; 1.8.16; 1.8.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.7 16-Feb-2007  ad branches: 1.7.6; 1.7.22; 1.7.24; 1.7.30;
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.6 09-Feb-2007  ad Merge newlock2 to head.
 1.5 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.4 15-Nov-2002  itohy branches: 1.4.22; 1.4.52; 1.4.54;
Allow multiple event handlers to be installed to an IRL.
The IRL is specified as IPL (2nd arg of sysasic_intr_establish()).
Current mapping:
IRL9 IPL_BIO
IRL11 IPL_NET
IRL13 IPL_TTY
 1.3 24-Mar-2002  uch branches: 1.3.6;
adapted to new interrupt code and shb changes.
 1.2 22-Feb-2002  uch branches: 1.2.4;
New NetBSD/sh3 clock framework.
+ hardclock source is moved from TMU1 to TMU0.
+ SH3/SH4 common kernel support.
+ PCLOCK estimation.
+ remove duplicated code.
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.6;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file intr.h was added on branch thorpej_scsipi on 2001-01-08 14:56:32 +0000
 1.2.4.1 17-Mar-2002  thorpej IPL_IMP -> IPL_VM
 1.3.6.2 11-Dec-2002  thorpej Sync with HEAD.
 1.3.6.1 24-Mar-2002  thorpej file intr.h was added on branch nathanw_sa on 2002-12-11 05:58:29 +0000
 1.4.54.1 03-Dec-2006  yamt implement splraiseipl/makeiplcookie for dreamcast.
 1.4.52.2 01-Feb-2007  ad Get sh3 compiling.
 1.4.52.1 12-Jan-2007  ad Sync with head.
 1.4.22.3 07-Dec-2007  yamt sync with head
 1.4.22.2 26-Feb-2007  yamt sync with head.
 1.4.22.1 30-Dec-2006  yamt sync with head.
 1.7.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.7.24.1 09-Jan-2008  matt sync with HEAD
 1.7.22.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.7.6.1 03-Dec-2007  ad Sync with HEAD.
 1.8.18.1 16-May-2008  yamt sync with head.
 1.8.16.1 18-May-2008  yamt sync with head.
 1.8.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 06-Sep-2020  riastradh Fix some more uvm header fallout. Add include guards while here.
 1.5 11-Jun-2015  matt Add avail_start, avail_end declarations.
 1.4 28-Apr-2008  martin branches: 1.4.44; 1.4.64;
Remove clause 3 and 4 from TNF licenses
 1.3 11-Dec-2005  christos branches: 1.3.74; 1.3.76; 1.3.78;
merge ktrace-lwp.
 1.2 06-Jul-2004  uch MI part of kloader moved to dev/kloader.c from arch/hpc/hpc/
dreamcast and playstation2 port are changed to use this.
 1.1 14-Jun-2003  tsutsui branches: 1.1.2;
Add kloader (in-kernel kernel bootloader) support written by
UCHIYAMA Yasushi (uch@netbsd).

XXX Some of these code should be moved into MI place to share
XXX between other ports.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.78.1 16-May-2008  yamt sync with head.
 1.3.76.1 18-May-2008  yamt sync with head.
 1.3.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.64.1 22-Sep-2015  skrll Sync with HEAD
 1.4.44.1 03-Dec-2017  jdolecek update from HEAD
 1.2 28-Mar-2012  christos - Normalize inclusion protection (remove)
- Move CHAR_{MIN,MAX} to a common file.
- Fix broken comments
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.166; 1.1.170;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.170.1 05-Apr-2012  mrg sync to latest -current.
 1.1.166.1 17-Apr-2012  yamt sync with head
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file limits.h was added on branch thorpej_scsipi on 2001-01-08 14:56:32 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file lock.h was added on branch thorpej_scsipi on 2001-01-08 14:56:32 +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:32 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file math.h was added on branch thorpej_scsipi on 2001-01-08 14:56:33 +0000
 1.2 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 20-Jun-2002  thorpej branches: 1.1.2;
file mcontext.h was initially added on branch nathanw_sa.
 1.1.2.1 20-Jun-2002  thorpej Machine-dependent kernel portion of {get,set}context(). From
Klaus Klein.
 1.2 24-Mar-2002  uch branches: 1.2.4;
remove unneeded header
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.6;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file mmeye.h was added on branch thorpej_scsipi on 2001-01-08 14:56:33 +0000
 1.2.4.2 24-Mar-2002  uch remove unneeded header
 1.2.4.1 24-Mar-2002  uch file mmeye.h was added on branch nathanw_sa on 2002-03-24 18:11:10 +0000
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file mutex.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file mutex.h was added on branch yamt-lazymbuf on 2007-02-26 09:06:17 +0000
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.5 10-Mar-2002  uch branches: 1.5.8; 1.5.14;
common part are moved to sh3/include/param.h
 1.4 26-Feb-2002  simonb Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
 1.3 04-Jan-2001  itojun branches: 1.3.2; 1.3.6;
split MACHINE_ARCH sh3e[lb]. userland build still needs checking.
 1.2 03-Jan-2001  itojun share sys/arch/sh3/conf/Makefile.sh3 across sh3-based architectures.
cleanup param.h a bit.
 1.1 11-Dec-2000  marcus Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.3.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.3.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.3.2.1 04-Jan-2001  bouyer file param.h was added on branch thorpej_scsipi on 2001-01-08 14:56:34 +0000
 1.5.14.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.14.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.14.1 03-Aug-2004  skrll Sync with HEAD
 1.5.8.2 10-Mar-2002  uch common part are moved to sh3/include/param.h
 1.5.8.1 10-Mar-2002  uch file param.h was added on branch nathanw_sa on 2002-03-10 07:45:32 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file pcb.h was added on branch thorpej_scsipi on 2001-01-08 14:56:34 +0000
 1.9 23-Oct-2015  knakahara fix build failure on dreamcast.
 1.8 29-Mar-2014  christos branches: 1.8.6;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.7 27-Oct-2012  chs branches: 1.7.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.6 01-Aug-2010  tsutsui branches: 1.6.8; 1.6.18;
Fix typo in pci_intr_disestablish(9) macro.
 1.5 11-Dec-2005  christos branches: 1.5.78; 1.5.98; 1.5.100;
merge ktrace-lwp.
 1.4 29-Jul-2004  drochner remove now unnecessary "pci_enumerate_bus" definitions
 1.3 15-May-2002  thorpej branches: 1.3.6; 1.3.12;
Let machine-dependent code specify how to enumerate the bus.
Currently, everyone uses pci_enumerate_bus_generic().
 1.2 15-May-2002  thorpej Implement pci_decompose_tag().
 1.1 31-Jan-2001  thorpej branches: 1.1.2; 1.1.6;
PCI glue, from Marcus.
 1.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 31-Jan-2001  bouyer file pci_machdep.h was added on branch thorpej_scsipi on 2001-02-11 19:09:20 +0000
 1.3.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.12.1 03-Aug-2004  skrll Sync with HEAD
 1.3.6.2 15-May-2002  thorpej Let machine-dependent code specify how to enumerate the bus.
Currently, everyone uses pci_enumerate_bus_generic().
 1.3.6.1 15-May-2002  thorpej file pci_machdep.h was added on branch nathanw_sa on 2002-05-15 19:23:54 +0000
 1.5.100.1 05-Mar-2011  rmind sync with head
 1.5.98.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.5.78.1 11-Aug-2010  yamt sync with head.
 1.6.18.3 03-Dec-2017  jdolecek update from HEAD
 1.6.18.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.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.6.8.1 30-Oct-2012  yamt sync with head
 1.7.2.1 18-May-2014  rmind sync with head
 1.8.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2 28-Feb-2002  uch branches: 1.2.10;
Remove unneeded header.
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.6;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file pio.h was added on branch thorpej_scsipi on 2001-01-08 14:56:34 +0000
 1.2.10.2 28-Feb-2002  uch Remove unneeded header.
 1.2.10.1 28-Feb-2002  uch file pio.h was added on branch nathanw_sa on 2002-02-28 01:52:29 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file pmap.h was added on branch thorpej_scsipi on 2001-01-08 14:56:35 +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:33:54 +0000
 1.1.4.2 30-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-30 00:19:30 +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:07 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file proc.h was added on branch thorpej_scsipi on 2001-01-08 14:56:35 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file profile.h was added on branch thorpej_scsipi on 2001-01-08 14:56:36 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file psl.h was added on branch thorpej_scsipi on 2001-01-08 14:56:36 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file pte.h was added on branch thorpej_scsipi on 2001-01-08 14:56:36 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file ptrace.h was added on branch thorpej_scsipi on 2001-01-08 14:56:37 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file reg.h was added on branch thorpej_scsipi on 2001-01-08 14:56:37 +0000
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file rwlock.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file rwlock.h was added on branch yamt-lazymbuf on 2007-02-26 09:06:17 +0000
 1.2 03-Mar-2002  uch branches: 1.2.8;
remove obsolete headers.
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.6;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file segments.h was added on branch thorpej_scsipi on 2001-01-08 14:56:38 +0000
 1.2.8.2 03-Mar-2002  uch remove obsolete headers.
 1.2.8.1 03-Mar-2002  uch file segments.h was added on branch nathanw_sa on 2002-03-03 14:59:58 +0000
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file setjmp.h was added on branch thorpej_scsipi on 2001-01-08 14:56:38 +0000
 1.2 24-Mar-2002  uch branches: 1.2.4;
adapted to new interrupt code and shb changes.
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.6;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file shbvar.h was added on branch thorpej_scsipi on 2001-01-08 14:56:39 +0000
 1.2.4.2 24-Mar-2002  uch adapted to new interrupt code and shb changes.
 1.2.4.1 24-Mar-2002  uch file shbvar.h was added on branch nathanw_sa on 2002-03-24 18:21:09 +0000
 1.2 27-Oct-2021  thorpej Remove unnecessary multiple-inclusion-protection from these tiny
stub headers.
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file signal.h was added on branch thorpej_scsipi on 2001-01-08 14:56:39 +0000
 1.2 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file stdarg.h was added on branch thorpej_scsipi on 2001-01-08 14:56:39 +0000
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 12-Mar-2007  tsutsui branches: 1.6.38; 1.6.40; 1.6.42;
IRL line connected to each device on sysasic is not always corresponding
with MI IPL_* definitions, so add an independent arg to pass IRL lines
to sysasic_intr_establish() and use appropriate macro for them.
 1.5 24-Dec-2005  perry branches: 1.5.26; 1.5.30;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.4 27-Dec-2002  tsutsui branches: 1.4.18;
Add support for SEGA LAN Adapter, MB86967 based Ethernet adapter.
Based on the patches in port-dreamcast/17493 by Christian Groessler,
with several modification by me.
 1.3 15-Nov-2002  itohy Allow multiple event handlers to be installed to an IRL.
The IRL is specified as IPL (2nd arg of sysasic_intr_establish()).
Current mapping:
IRL9 IPL_BIO
IRL11 IPL_NET
IRL13 IPL_TTY
 1.2 24-Mar-2002  uch branches: 1.2.6;
adapted to new interrupt code and shb changes.
 1.1 24-Apr-2001  marcus branches: 1.1.2; 1.1.4;
Abstracted handling of System ASIC controlled IRQ:s a little.
Three different IRQ:s can be selected for each event, 9, 11, or 13
(which selects hardware priority). More events to be added as they
are discovered. Do not use shb_intr_establish() to register IRQ 9, 11
or 13 anymore.
 1.1.4.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.6.3 29-Dec-2002  thorpej Sync with HEAD.
 1.2.6.2 11-Dec-2002  thorpej Sync with HEAD.
 1.2.6.1 24-Mar-2002  thorpej file sysasicvar.h was added on branch nathanw_sa on 2002-12-11 05:58:29 +0000
 1.4.18.2 03-Sep-2007  yamt sync with head.
 1.4.18.1 21-Jun-2006  yamt sync with head.
 1.5.30.1 13-Mar-2007  ad Sync with head.
 1.5.26.1 24-Mar-2007  yamt sync with head.
 1.6.42.1 16-May-2008  yamt sync with head.
 1.6.40.1 18-May-2008  yamt sync with head.
 1.6.38.1 02-Jun-2008  mjf Sync with HEAD.
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file trap.h was added on branch thorpej_scsipi on 2001-01-08 14:56:40 +0000
 1.5 23-Jan-2021  christos Document via __HAVE_BUS_SPACE_8 platforms that implement bus_space_*_8
 1.4 20-Sep-2006  uwe branches: 1.4.156;
Switch the rest of sh3 ports to todr(9)
Split code to handle on-chip rtc into a separate driver
Eliminate all todr code from clock.c
Move __HAVE_GENERIC_TODR to sh3/include/types.h
 1.3 05-Sep-2006  uwe branches: 1.3.2; 1.3.4;
Switch dreamcast to MI todr(9).

Dreamcast does not use SuperH on-chip RTC, so do it seprately from
other sh3 ports. Convert dreamcast rtc code into a real device
instead of searching/attaching it manually.

Tested by Nick Hudson.
 1.2 28-Feb-2002  simonb branches: 1.2.12; 1.2.48; 1.2.52;
Use "#define<tab>".
 1.1 11-Dec-2000  marcus branches: 1.1.2; 1.1.6;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file types.h was added on branch thorpej_scsipi on 2001-01-08 14:56:40 +0000
 1.2.52.1 14-Sep-2006  yamt sync with head.
 1.2.48.1 09-Sep-2006  rpaulo sync with head
 1.2.12.2 28-Feb-2002  simonb Use "#define<tab>".
 1.2.12.1 28-Feb-2002  simonb file types.h was added on branch nathanw_sa on 2002-02-28 03:17:27 +0000
 1.3.4.1 22-Oct-2006  yamt sync with head
 1.3.2.1 18-Nov-2006  ad Sync with head.
 1.4.156.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 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file varargs.h was added on branch thorpej_scsipi on 2001-01-08 14:56:41 +0000
 1.2 07-Feb-2001  uch move VM_PHYSSEG_MAX, VM_NFREELIST, VM_FREELIST_DEFAULT defines to
machine/vmparam.h
 1.1 11-Dec-2000  marcus branches: 1.1.2;
Initial import of port "dreamcast" (cloned from port "evbsh3").
 1.1.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.2 08-Jan-2001  bouyer Files added on trunk.
 1.1.2.1 11-Dec-2000  bouyer file vmparam.h was added on branch thorpej_scsipi on 2001-01-08 14:56:41 +0000
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 08-May-2004  kleink branches: 1.1.2;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 08-May-2004  skrll file wchar_limits.h was added on branch ktrace-lwp on 2004-08-03 10:33:54 +0000

RSS XML Feed