Home | History | Annotate | only in /src/sys/arch/sandpoint
History log of /src/sys/arch/sandpoint
RevisionDateAuthorComments
 1.4 04-Apr-2011  dyoung Fix target 'tags'.
 1.3 28-Jan-2011  phx Included sys/arc/sandpoint/stand/altboot in the build process.
Install altboot and altboot.bin in /usr/mdec and copy them also into the
installation directory of the sandpoint release.
 1.2 06-Jan-2003  lukem branches: 1.2.130; 1.2.136; 1.2.138;
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 04-Feb-2001  briggs branches: 1.1.2; 1.1.10;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.10.1 07-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file Makefile was added on branch thorpej_scsipi on 2001-02-11 19:11:39 +0000
 1.2.138.1 08-Feb-2011  bouyer Sync with HEAD
 1.2.136.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.130.2 21-Apr-2011  rmind sync with head
 1.2.130.1 05-Mar-2011  rmind sync with head
 1.3 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.2 06-Mar-2001  briggs branches: 1.2.8; 1.2.40; 1.2.82; 1.2.90; 1.2.100; 1.2.102; 1.2.104; 1.2.106;
Sync with reality. Add NetBSD tag.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.1.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file README was added on branch thorpej_scsipi on 2001-02-11 19:11:40 +0000
 1.2.106.1 25-Oct-2007  bouyer Sync with HEAD.
 1.2.104.1 18-Oct-2007  yamt sync with head.
 1.2.102.1 06-Nov-2007  matt sync with HEAD
 1.2.100.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.2.90.1 04-May-2007  nisimura - add EPIC interrupt assignment description about SandPoint III "SP3" eval.
- the following two PDFs were found useful to learn the difference between
SP3 and SP2.
http://www.freescale.com/files/soft_dev_tools/doc/user_guide/SPX3UM.pdf
http://www.freescale.com/files/archives/doc/user_guide/SANDPOINTX2UM.pdf
 1.2.82.1 23-Oct-2007  ad Sync with head.
 1.2.40.1 27-Oct-2007  yamt sync with head.
 1.2.8.2 06-Mar-2001  briggs Sync with reality. Add NetBSD tag.
 1.2.8.1 06-Mar-2001  briggs file README was added on branch nathanw_sa on 2001-03-06 20:16:10 +0000
 1.23 25-May-2013  phx Added another three NH23x compatible products.
 1.22 26-Nov-2012  phx Add another NH-231 clone to the list: Vibe NS-349-S
 1.21 06-Nov-2011  phx branches: 1.21.10;
Fixed PCI line to EPIC IRQ mapping for Iomega Storcenter.
 1.20 21-Apr-2011  phx branches: 1.20.4;
CH3WNAS uses the same chips as a DSM-G600, so they might be compatible.
 1.19 26-Mar-2011  phx Updated information for D-Link and QNAP.
 1.18 14-Feb-2011  nisimura - remove the mangled lines of the previous commit.
- withdraw DS407 description for now as pieces of info are conflicting
and remain uncertain.
 1.17 14-Feb-2011  nisimura add Thecus N3200 to the research list. Along with N1200 they use
MPC8347 single PCI SoC.
 1.16 13-Feb-2011  phx Added a note that only the Rev.B is supported for D-Link DSM-G600.
 1.15 12-Feb-2011  nisimura add Thecus N1200 NAS information. It looks a fairly close sibling
of Freescale MPC8349mITX eval featuring I2C controlled satellite MCU.
 1.14 11-Feb-2011  phx Sorted out NH230 based bords. Added NH230 IRQ mapping.
LevelOne FNS-5000B seems identical to QNAP TS-201.
 1.13 10-Feb-2011  phx Fixed typo. Added AMS150.
 1.12 10-Feb-2011  nisimura - add D-Link EPIC defition to pci_machdep.c
- change the way to reboot/pwroff to make satmgr.c more flexible for
a multiple byte sat protocol.
 1.11 08-Feb-2011  phx Added LevelOne NASCon and some Nettronix based devices.
 1.10 07-Feb-2011  phx StorCenter models are called 250, 500 and 1T.
 1.9 07-Feb-2011  nisimura - add D-Link GSM-G600 info. IP1000A is supposed a member of stge(4).
- move StorCenter info as it looks correct.
 1.8 10-Jan-2011  phx branches: 1.8.2; 1.8.4;
Some new information and cleanup.
 1.7 28-May-2010  phx QNAP support (untested): PCI fixup and corrected PCI address lines (+1).
Patch submitted by Toru Nishimura.
 1.6 27-May-2010  phx Added some more precise LinkStation/TeraStation and Synology product names.
 1.5 08-May-2010  phx Synology uses sk(4) NIC.
Included information about Iomega StorCenter. Note that the EPIC mapping
is not verified.
 1.4 07-Apr-2008  nisimura branches: 1.4.4; 1.4.24; 1.4.26;
- Synology DS407 is a MPC8349E product.
- quick comparison between 8349E-mITXE eval and DS407.
 1.3 05-Apr-2008  nisimura add some MPC824x NAS box description. obtained by googl'ing.
 1.2 17-Oct-2007  garbled branches: 1.2.2; 1.2.4; 1.2.8; 1.2.22;
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.1 23-May-2007  nisimura branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
file README.NAS was initially added on branch ppcoea-renovation.
 1.1.10.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.8.1 18-Oct-2007  yamt sync with head.
 1.1.6.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.1.2.1 23-May-2007  nisimura - add SANDPOINT, GENERIC.NAS and GENERIC
this port is going to host a range of MPC8241/8245 NAS products.
SANDPOINT supports X2 and X3 absorbing the EPIC usage difference
between them. GENERIC.NAS is for a flock of NAS in market.
- have ENCPP1 some more devices.
 1.2.22.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.8.2 06-Nov-2007  matt sync with HEAD
 1.2.8.1 17-Oct-2007  matt file README.NAS was added on branch matt-armv6 on 2007-11-06 23:21:18 +0000
 1.2.4.2 27-Oct-2007  yamt sync with head.
 1.2.4.1 17-Oct-2007  yamt file README.NAS was added on branch yamt-lazymbuf on 2007-10-27 11:28:13 +0000
 1.2.2.2 23-Oct-2007  ad Sync with head.
 1.2.2.1 17-Oct-2007  ad file README.NAS was added on branch vmlocking on 2007-10-23 20:36:25 +0000
 1.4.26.4 31-May-2011  rmind sync with head
 1.4.26.3 21-Apr-2011  rmind sync with head
 1.4.26.2 05-Mar-2011  rmind sync with head
 1.4.26.1 30-May-2010  rmind sync with head
 1.4.24.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.4.4.1 11-Aug-2010  yamt sync with head.
 1.8.4.2 17-Feb-2011  bouyer Sync with HEAD
 1.8.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.8.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.20.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.20.4.2 16-Jan-2013  yamt sync with (a bit old) head
 1.20.4.1 10-Nov-2011  yamt sync with head
 1.21.10.2 23-Jun-2013  tls resync from head
 1.21.10.1 25-Feb-2013  tls resync 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 04-Feb-2001  briggs branches: 1.1.2; 1.1.10;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.10.1 07-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file .keep_me was added on branch thorpej_scsipi on 2001-02-11 19:11:40 +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:14:28 +0000
 1.26 21-Dec-2021  nisimura retire Ampro EnCorePP1 board configuration
 1.25 21-Jan-2021  nia add a commented out compat_ossaudio wherever there's compat_linux

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

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.23 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.22 13-Apr-2019  isaki Add drvctl to kernel which has audio device.
audiocfg(1) requires drvctl(4).
 1.21 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.20 14-Jul-2018  maxv Remove "options IPKDB", and the other associated options, from the config
files.

ipkdb is being retired. Its code is really old, and hasn't kept pace with
today's expectations: IPv6, SMP, modern NICs. The associated code for x86
was already removed because it was too incorrect to stay.

There are plans to rewrite a similar feature from scratch.

ok kamil christos
 1.19 14-Jul-2018  maxv Remove "options DEBUG_BY_TOOLS", it doesn't exist.
 1.18 14-Sep-2017  mrg branches: 1.18.2; 1.18.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.17 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.16 19-Feb-2017  rin PR kern/51208
Add DISKLABEL_EI option (and also FFS_EI if missing), commented out except for
ALL on amd64 and i386.
 1.15 13-Dec-2016  christos branches: 1.15.2;
wildcard speaker attachments, now that we can handle many of them.
 1.14 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.13 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.12 23-Aug-2014  dholland branches: 1.12.2; 1.12.4;
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.11 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.10 22-Feb-2012  nisimura branches: 1.10.2;

- nuke commented-out SYMTAB_SPACE directive since this port has a
companion bootloader which is capable of loading a plain ELF kernel
and accompanying ELF symbol table.
- remove fxp(4) from GENERIC as no known NAS has the device.
 1.9 22-Nov-2011  tls branches: 1.9.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.8 30-Jun-2010  phx branches: 1.8.8;
Add file system snapshot device.
 1.7 05-Dec-2009  pooka branches: 1.7.2; 1.7.4;
Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.6 19-Aug-2009  nisimura - use options PIC_MPCSOC to replace PIC_OPENPIC.
 1.5 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

Proposed on tech-kern@.
 1.4 05-Apr-2008  nisimura branches: 1.4.4; 1.4.10; 1.4.12;
- add COMPAT_40
- add #options WAPBL for journalled BSDFFS for GENERIC.NAS
 1.3 29-Nov-2007  nisimura branches: 1.3.14;
comment-out lpt0 since EnCorePP1 experiences occasional irq 7 flood
regardless of the special care to disable LPT function in VIA 686SB.
May not revive anytime soon as it's considered little use.
 1.2 17-Oct-2007  garbled branches: 1.2.2; 1.2.4; 1.2.6; 1.2.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.1 04-May-2007  nisimura branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
file ENCPP1 was initially added on branch ppcoea-renovation.
 1.1.10.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.8.1 18-Oct-2007  yamt sync with head.
 1.1.6.2 03-Dec-2007  joerg Sync with HEAD.
 1.1.6.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.1.2.5 23-May-2007  nisimura - add SANDPOINT, GENERIC.NAS and GENERIC
this port is going to host a range of MPC8241/8245 NAS products.
SANDPOINT supports X2 and X3 absorbing the EPIC usage difference
between them. GENERIC.NAS is for a flock of NAS in market.
- have ENCPP1 some more devices.
 1.1.2.4 09-May-2007  nisimura add eumb device node with two children. I chose a way to have no
locator designation. commented out for now.
 1.1.2.3 09-May-2007  nisimura allow ENCPP1 to have no PCI_NETBSD_CONFIGURE to adapt a smart booloader
performs PCI device configuration before exec'ing kernels.
 1.1.2.2 04-May-2007  nisimura remove options OPENPIC_SERIAL_MODE and ALTIVEC.
- ENCPP1 uses EPIC direct mode irq.
- AltiVec is new to G4 core, not available in MPC8245.
 1.1.2.1 04-May-2007  nisimura NetBSD/sandpoint is about to complete ppcoea-renovation.
- add a conf file for Ampro EnCorePP1 MPC8245 eval.
 1.2.8.3 09-Jan-2008  matt sync with HEAD
 1.2.8.2 06-Nov-2007  matt sync with HEAD
 1.2.8.1 17-Oct-2007  matt file ENCPP1 was added on branch matt-armv6 on 2007-11-06 23:21:18 +0000
 1.2.6.1 08-Dec-2007  mjf Sync with HEAD.
 1.2.4.3 07-Dec-2007  yamt sync with head
 1.2.4.2 27-Oct-2007  yamt sync with head.
 1.2.4.1 17-Oct-2007  yamt file ENCPP1 was added on branch yamt-lazymbuf on 2007-10-27 11:28:13 +0000
 1.2.2.3 03-Dec-2007  ad Sync with HEAD.
 1.2.2.2 23-Oct-2007  ad Sync with head.
 1.2.2.1 17-Oct-2007  ad file ENCPP1 was added on branch vmlocking on 2007-10-23 20:36:25 +0000
 1.3.14.2 17-Jan-2009  mjf Sync with HEAD.
 1.3.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.12.1 19-Jan-2009  skrll Sync with HEAD.
 1.4.10.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.4.4.4 11-Aug-2010  yamt sync with head.
 1.4.4.3 11-Mar-2010  yamt sync with head
 1.4.4.2 19-Aug-2009  yamt sync with head.
 1.4.4.1 04-May-2009  yamt sync with head.
 1.7.4.1 03-Jul-2010  rmind sync with head
 1.7.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.8.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.8.8.1 17-Apr-2012  yamt sync with head
 1.9.2.1 24-Feb-2012  mrg sync to -current.
 1.10.2.2 03-Dec-2017  jdolecek update from HEAD
 1.10.2.1 23-Jun-2013  tls resync from head
 1.12.4.2 20-Mar-2017  pgoyette Sync with HEAD
 1.12.4.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.12.2.2 28-Aug-2017  skrll Sync with HEAD
 1.12.2.1 05-Feb-2017  skrll Sync with HEAD
 1.15.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.18.4.1 10-Jun-2019  christos Sync with HEAD
 1.18.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.18.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.24.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.113 02-Apr-2024  charlotte Mention DKWEDGE_METHOD_TOS in several kernel config files
 1.112 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.111 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.110 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.109 07-Aug-2022  simonb UFS/LFS dirhash:
- Enable UFS_DIRHASH if the architecture or kernel model specific config
file can use 128MB of RAM or more.
- Remove experimental tag from UFS_DIRHASH; it's been with RUMP kernel
and by a number of NetBSD developers for years.
- Add LFS_DIRHASH if LFS was enabled.
- Be somewhat consistent with FS options order.
 1.108 29-Jun-2021  nia Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.
 1.107 21-Jan-2021  nia branches: 1.107.4;
add a commented out compat_ossaudio wherever there's compat_linux

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

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.105 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.104 25-Mar-2020  jdolecek remove 'file-system SMBFS' and 'pseudo-device nsmb' from all kernel configs
to prepare for their eventual removal
 1.103 03-Jan-2020  thorpej Eliminate all of the #ifdefs for the "strtc" driver. Define model
properties (similar to what the "dsrtc" driver does), and provide
DT compat strings corresponding to those models. Allow config flags
to specify the model for non-FDT platforms (also like "dsrtc").
 1.102 26-Apr-2019  sevan Enable BUFQ_PRIOCSCAN, CARP, Veriexec by default in GENERIC kernel configs.
On ports without a GENERIC kernel config enable in individul files, e.g evbmips.
Omit on:
atari, dreamcast, emips, epoc32, evbppc/VIRTEX*, ia64, luna68x, mvme68k,
mvmeppc, playstation2, riscv, sun2, sun3, x68k, zaurus due to resource
constraints or port infancy.
 1.101 23-Oct-2018  jdolecek remove the 'wd* at umass?' for the non-standardized and rare (extinct?)
In-System Design ATA protocol over Bulk-Only devices from most kernels,
leave only in i386/amd64 ALL; it's unmaintained and likely currently broken,
lack of test hardware makes it impossible to support
 1.100 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.99 15-May-2018  thorpej branches: 1.99.2;
Revert previous; we actually use direct-configuration of I2C in this
kernel config.
 1.98 15-May-2018  thorpej Fully specifiy the location of indirectly-configured I2C devices. In
particular, the parent spec must not be wild-carded, as doing so doesn't
work well on systems where more than one I2C bus is present.
 1.97 23-Jan-2018  sevan branches: 1.97.2;
Alternate buffer queue strategies no longer considered experimental, update
description.

Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.96 14-Sep-2017  mrg clean up COMPAT_* options for native netbsd code:
- new series of files that are useful for saying "i want everything
since netbsd 1.4", etc.
- use the fact COMPAT_* options have future dependancies to remove
many redundant options.

removes about 3000 lines total across kernel configuration files.
tested about 30 random kernels in the changed list.
 1.95 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.94 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.93 26-Feb-2017  rin branches: 1.93.6;
Add DKWEDGE_METHOD_RDB option, which is enabled for x86, commented out for
other platforms by default.
 1.92 19-Feb-2017  rin PR kern/51208
Add DISKLABEL_EI option (and also FFS_EI if missing), commented out except for
ALL on amd64 and i386.
 1.91 30-Sep-2015  phx branches: 1.91.2; 1.91.4;
Disable CFI in the GENERIC kernel again, as currently only cmdset 1.3
is supported, which is not present in all flash chips.
Add lmtemp(4), an LM75 temperature sensor, which is found in some
Synology NAS models.
 1.90 21-Sep-2015  phx double vlan pseudo-device removed
 1.89 07-Sep-2015  phx Enable cfi/nor/flash devices as reading from flash seems to work now.
 1.88 16-Nov-2014  manu branches: 1.88.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.87 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.86 19-Sep-2014  christos Disable BSDLABEL and MBR DKWEDGE methods again since sysinst does not work
with wedges.
 1.85 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.84 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.83 18-Aug-2014  christos - Enable Wedge support for MBR/BSDLABEL where it was commented out.
- Add apple partition support where it was missing
- Add comments where missing
 1.82 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.81 05-Mar-2014  phx branches: 1.81.4;
Enabled SYSV* options, which all ports have (and which is needed by 3rd
party software like SANE, e.g.).
Added ugen*.
 1.80 30-Jun-2013  rmind G/C PFIL_HOOKS from the kernel configs.
 1.79 05-Jun-2013  christos branches: 1.79.2;
remove obsolete networking options
 1.78 27-Apr-2013  christos the bogus number police
 1.77 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.76 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.75 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.74 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.73 29-Apr-2012  phx branches: 1.73.2;
Add driver for ATAPI disk drives.
 1.72 10-Mar-2012  joerg P1003_1B_SEMAPHORE is no longer optional.
 1.71 22-Feb-2012  nisimura - nuke commented-out SYMTAB_SPACE directive since this port has a
companion bootloader which is capable of loading a plain ELF kernel
and accompanying ELF symbol table.
- remove fxp(4) from GENERIC as no known NAS has the device.
 1.70 11-Feb-2012  phx Add support for ATAPI CD/DVD drives as well.
 1.69 10-Feb-2012  phx Enable support for USB CD/DVD drives. OK releng@.
 1.68 23-Jan-2012  phx Removed duplicate bridge(4) device. Insert blank after viaide(4).
Some more restructuring.
 1.67 23-Jan-2012  phx Restructured, based on macppc and ofppc.
Added some new options and pseudo-devices.
 1.66 14-Jan-2012  phx New device nhpow(4) to support the onboard GPIO pins on a NH230/231 board for
buttons, powerdown, reset, LEDs and fan control. It attaches gpio(4) for
its 8 pins on demand.
 1.65 07-Jan-2012  phx Disable flash device unless nor(4) is not finished.
Add pcf8563rtc(4) for NH230/231.
 1.64 28-Dec-2011  phx Add a workaround for the VT6410 IDE controller on the Iomega Storcenter.
Its interrupt cannot be disabled and remains asserted during the whole
device probing procedure, causing an interrupt storm.
This was fixed by establishing an edge-triggered interrupt for it, so it
will trigger only once during probing.
This workaround makes the WDC_NO_IDS option obsolete, which was removed
from the GENERIC config.
 1.63 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.62 17-Dec-2011  phx Added NOR flash driver, using nor(4) and flash(4).
 1.61 22-Nov-2011  tls branches: 1.61.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.60 11-Aug-2011  phx branches: 1.60.2;
Add viaide for Iomega Storcenter, although a VT6410 driver still needs to
be written.
 1.59 11-Apr-2011  phx Enable strtc(4). Should theoretically work.
It works indeed for my DSM-G600 after I removed the battery. But there
must be something which confuses the chip later on...
 1.58 06-Apr-2011  phx Enable all known RTC drivers. The correct RTC will automatically be chosen as
an I2C device, depending on the NAS model.
 1.57 20-Mar-2011  phx More networking options.
 1.56 19-Mar-2011  phx Add ral(4) and stge(4) for DLink DSM-G600.
Disabled DIAGNOSTIC.
 1.55 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.54 13-Feb-2011  phx uvideo works, so include it
 1.53 07-Feb-2011  nisimura add Dallas I2C RTC driver for StorCenter, leaving it commented out for now.
 1.52 15-Jan-2011  phx branches: 1.52.2; 1.52.4;
Add some USB devices, which I tested successfully.
Replace tab by blank after a device name, where it was forgotten.
 1.51 11-Jan-2011  nisimura step forward to MODULAR sandpoint kernel. disabled until all work gets done.
 1.50 07-Aug-2010  phx Removed double WAPBL option. Fixed typo.
 1.49 30-Jun-2010  phx Add file system snapshot device.
 1.48 09-Jun-2010  phx The sandpoint port is now focussed on 824x based NAS boxes.
Replaced GENERIC by GENERIC.NAS.
Added INSTALL_KURO for KuroBox.
GENERIC.NAS and RAMDISK are no longer needed.
 1.47 17-May-2010  phx Excluded KUROBOX from GENERIC.NAS because console is on a different port.
Add INET6 option to GENERIC(.NAS).
Build KUROBOX kernel together with GENERIC and GENERIC.NAS.
Patch submitted by Toru Nishimura.
 1.46 08-May-2010  phx Synology boxes need sk(4), not msk(4).
 1.45 05-Dec-2009  pooka branches: 1.45.2; 1.45.4;
Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.44 19-Aug-2009  nisimura - use options PIC_MPCSOC to replace PIC_OPENPIC.
 1.43 24-Jan-2009  mrg add COMPAT_50 to all the configs with COMPAT_40.
 1.42 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

Proposed on tech-kern@.
 1.41 10-Aug-2008  tls branches: 1.41.2;
Add accept filters to GENERIC kernels where they exist.
 1.40 31-Jul-2008  simonb Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.39 05-Apr-2008  nisimura branches: 1.39.4; 1.39.6; 1.39.10;
- add COMPAT_40
- add #options WAPBL for journalled BSDFFS for GENERIC.NAS
 1.38 29-Nov-2007  nisimura branches: 1.38.14;
comment-out lpt0 since EnCorePP1 experiences occasional irq 7 flood
regardless of the special care to disable LPT function in VIA 686SB.
May not revive anytime soon as it's considered little use.
 1.37 17-Oct-2007  garbled branches: 1.37.2;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.36 26-Aug-2006  tsutsui branches: 1.36.12; 1.36.20; 1.36.30; 1.36.32; 1.36.34; 1.36.36;
Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.35 09-Dec-2005  elad branches: 1.35.4; 1.35.8; 1.35.18;
Add (commented out) Veriexec options and pseudo-device to GENERIC kernels,
and remove the i386 GENERIC_VERIEXEC config.
 1.34 05-Jul-2002  matt branches: 1.34.6; 1.34.22;
Peform a rototill over the powerpc-based ports.

Move the trap/vector initialization for MPC6xx ports to mpc6xx_machdep.c
Also move softnet, install_extintr, mapiodev, kvtop. Add common BAT
initialization code.

Add user Altivec support.

Fix calls to OF_call_method in macppc/macppc/machdep.c.

Use ci_fpuproc in cpu_info instead of separate fpuproc.

Add separate syscall.c and defined __HAVE_SYSCALL_INTERN.
 1.33 16-May-2002  briggs Put options after include to please config(8).
 1.32 16-May-2002  briggs branches: 1.32.2;
Split GENERIC into GENERIC (for the X3 revision of the board in native
interrupt mode) and GENERIC.X2 (for the X2 revision of the board or an
X3 in legacy interrupt mode).
 1.31 16-May-2002  briggs Comment out pciide stuff since it's not working yet.
 1.30 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.29 17-Apr-2002  mycroft Remove TLP_MATCH_* options.
 1.28 15-Apr-2002  briggs Really nuke pmsi
 1.27 15-Apr-2002  briggs Nuke pmsi
 1.26 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.25 12-Apr-2002  briggs Enable pciide, wd, atapibus, and atapi devices.
 1.24 27-Mar-2002  briggs Add fxp* (Intel EtherExpress PRO 10+/100B).
 1.23 09-Mar-2002  chs switch all mpc6xx powerpc ports to NEWPMAP by default.
the old pmap is still available with the OLDPMAP option.
 1.22 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.21 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.20 14-Dec-2001  briggs Re-enable wscons stuff. Add rtk* as it's now confirmed to work on sandpoint.
 1.19 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.18 07-Dec-2001  briggs Disable ws* until we can have a working vga* at pci.
 1.17 23-Nov-2001  atatat The bridge(4) pseudo-device no longer requires the port to
__HAVE_GENERIC_SOFT_INTERRUPTS, so add it back to all GENERIC configs.
 1.16 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.15 13-Nov-2001  augustss The wsmux pseudo device does not need a count anymore.
 1.14 12-Sep-2001  manu branches: 1.14.4;
Linux emulation is no longer experimental, removed comment
 1.13 01-Sep-2001  atatat branches: 1.13.2;
Comment out bridge pseudo devices from ports that don't
__HAVE_GENERIC_SOFT_INTERRUPTS. bridge(4) doesn't compile there.
 1.12 01-Sep-2001  atatat Add bridge pseudo devices to GENERIC configs
 1.11 30-Aug-2001  briggs - Change default time frequency to 100MHz from 66MHz.
- Support the serial mode interrupts (with a kernel configuration option)
on the Sandpoint X3.
- Initialize cpu_timebase.
- Enable tulip driver.
 1.10 26-Aug-2001  matt Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.9 08-Jul-2001  abs branches: 1.9.2;
Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
 1.8 10-Jun-2001  tsubai Use the new pmap to compile again (sorry).
 1.7 07-Jun-2001  briggs Enable a few more devices (adw, dpt, siop, sip, sd). Do not compile DEBUG.
 1.6 04-Apr-2001  manu Cosmetic change
 1.5 03-Apr-2001  manu Added a comented out COMPAT_LINUX option in GENERIC kernels of PowerPC ports
 1.4 08-Feb-2001  briggs branches: 1.4.2; 1.4.4;
Keyboard, mouse, ws*
 1.3 08-Feb-2001  briggs Add fdc and lpt.
 1.2 07-Feb-2001  briggs Add in ppb* for PCI-PCI bridge support.
 1.1 04-Feb-2001  briggs Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.4.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.4.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.4.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.4.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.4.2.1 08-Feb-2001  bouyer file GENERIC was added on branch thorpej_scsipi on 2001-02-11 19:11:40 +0000
 1.9.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.9.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.9.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.9.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.13.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.14.4.9 01-Aug-2002  nathanw Catch up to -current.
 1.14.4.8 20-Jun-2002  nathanw Catch up to -current.
 1.14.4.7 17-Apr-2002  nathanw Catch up to -current.
 1.14.4.6 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.14.4.5 28-Feb-2002  nathanw Catch up to -current.
 1.14.4.4 08-Jan-2002  nathanw Catch up to -current.
 1.14.4.3 13-Nov-2001  briggs SYSV IPC
 1.14.4.2 05-Nov-2001  briggs Initial SA support for ppc. Test-booted on sandpoint, macppc, & walnut.
mcontext and cpu_getmcontext()/cpu_setmcontext() from Klaus Klein
<kleink@netbsd.org>.
 1.14.4.1 12-Sep-2001  briggs file GENERIC was added on branch nathanw_sa on 2001-11-05 19:46:20 +0000
 1.32.2.3 17-Jul-2002  gehenna catch up with -current.
 1.32.2.2 30-May-2002  gehenna Catch up with -current.
 1.32.2.1 16-May-2002  gehenna file GENERIC was added on branch gehenna-devsw on 2002-05-30 15:35:34 +0000
 1.34.22.4 07-Dec-2007  yamt sync with head
 1.34.22.3 27-Oct-2007  yamt sync with head.
 1.34.22.2 30-Dec-2006  yamt sync with head.
 1.34.22.1 21-Jun-2006  yamt sync with head.
 1.34.6.1 11-Dec-2005  christos Sync with head.
 1.35.18.1 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.35.8.1 03-Sep-2006  yamt sync with head.
 1.35.4.1 09-Sep-2006  rpaulo sync with head
 1.36.36.1 25-Oct-2007  bouyer Sync with HEAD.
 1.36.34.1 18-Oct-2007  yamt sync with head.
 1.36.32.2 09-Jan-2008  matt sync with HEAD
 1.36.32.1 06-Nov-2007  matt sync with HEAD
 1.36.30.2 03-Dec-2007  joerg Sync with HEAD.
 1.36.30.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.36.20.1 23-May-2007  nisimura - add SANDPOINT, GENERIC.NAS and GENERIC
this port is going to host a range of MPC8241/8245 NAS products.
SANDPOINT supports X2 and X3 absorbing the EPIC usage difference
between them. GENERIC.NAS is for a flock of NAS in market.
- have ENCPP1 some more devices.
 1.36.12.2 03-Dec-2007  ad Sync with HEAD.
 1.36.12.1 23-Oct-2007  ad Sync with head.
 1.37.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.38.14.3 17-Jan-2009  mjf Sync with HEAD.
 1.38.14.2 28-Sep-2008  mjf Sync with HEAD.
 1.38.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.39.10.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.39.10.1 19-Oct-2008  haad Sync with HEAD.
 1.39.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.39.4.4 11-Aug-2010  yamt sync with head.
 1.39.4.3 11-Mar-2010  yamt sync with head
 1.39.4.2 19-Aug-2009  yamt sync with head.
 1.39.4.1 04-May-2009  yamt sync with head.
 1.41.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.41.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.45.4.4 21-Apr-2011  rmind sync with head
 1.45.4.3 05-Mar-2011  rmind sync with head
 1.45.4.2 03-Jul-2010  rmind sync with head
 1.45.4.1 30-May-2010  rmind sync with head
 1.45.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.52.4.3 17-Feb-2011  bouyer Sync with HEAD
 1.52.4.2 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.52.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.52.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.60.2.4 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.60.2.3 30-Oct-2012  yamt sync with head
 1.60.2.2 23-May-2012  yamt sync with head.
 1.60.2.1 17-Apr-2012  yamt sync with head
 1.61.2.4 29-Apr-2012  mrg sync to latest -current.
 1.61.2.3 11-Mar-2012  mrg sync to latest -current
 1.61.2.2 24-Feb-2012  mrg sync to -current.
 1.61.2.1 18-Feb-2012  mrg merge to -current.
 1.73.2.4 03-Dec-2017  jdolecek update from HEAD
 1.73.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.73.2.2 23-Jun-2013  tls resync from head
 1.73.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.79.2.2 18-May-2014  rmind sync with head
 1.79.2.1 28-Aug-2013  rmind sync with head
 1.81.4.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.81.4.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.81.4.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.88.2.3 28-Aug-2017  skrll Sync with HEAD
 1.88.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.88.2.1 22-Sep-2015  skrll Sync with HEAD
 1.91.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.91.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.93.6.1 26-Jan-2018  martin Pull up following revision(s) (requested by sevan in ticket #510):
sys/arch/sun3/conf/GENERIC3X: revision 1.130
sys/arch/sparc64/conf/GENERIC: revision 1.203
sys/arch/news68k/conf/LIBERO: revision 1.66
sys/arch/amiga/conf/DRACO: revision 1.185
sys/arch/evbarm/conf/MV2120: revision 1.35
sys/arch/x68k/conf/GENERIC: revision 1.187
sys/arch/rs6000/conf/GENERIC: revision 1.39
sys/arch/news68k/conf/GENERIC_TINY: revision 1.86
sys/arch/i386/conf/XEN3_DOMU: revision 1.88
sys/arch/iyonix/conf/GENERIC: revision 1.97
sys/arch/evbarm64/conf/A64EMUL: revision 1.11
sys/arch/mvme68k/conf/GENERIC: revision 1.98
sys/arch/acorn32/conf/GENERIC: revision 1.124
sys/arch/i386/conf/XEN3_DOM0: revision 1.125
sys/arch/cobalt/conf/INSTALL: revision 1.65
sys/arch/macppc/conf/GENERIC_601: revision 1.16
sys/arch/hppa/conf/GENERIC: revision 1.17
sys/arch/amiga/conf/GENERIC.in: revision 1.137
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.33
sys/arch/netwinder/conf/GENERIC: revision 1.134
sys/arch/amd64/conf/XEN3_DOMU: revision 1.83
sys/arch/mac68k/conf/GENERIC: revision 1.225
sys/arch/arc/conf/RPC44: revision 1.54
sys/arch/mipsco/conf/GENERIC: revision 1.92
sys/arch/cats/conf/GENERIC: revision 1.166
sys/arch/amd64/conf/XEN3_DOM0: revision 1.145
sys/arch/amigappc/conf/GENERIC: revision 1.33
sys/arch/sun3/conf/GENERIC: revision 1.176
sys/arch/news68k/conf/GENERIC: revision 1.130
sys/arch/hpcsh/conf/GENERIC: revision 1.110
sys/arch/hp300/conf/GENERIC: revision 1.198
sys/arch/atari/conf/GENERIC.in: revision 1.115
sys/arch/sparc/conf/MRCOFFEE: revision 1.54
sys/arch/evbppc/conf/EXPLORA451: revision 1.62
sys/arch/cesfic/conf/GENERIC: revision 1.69
sys/arch/vax/conf/GENERIC: revision 1.204
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.115
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.112
sys/arch/sparc/conf/GENERIC: revision 1.258
sys/arch/next68k/conf/GENERIC: revision 1.145
sys/arch/evbarm/conf/MMNET_GENERIC: revision 1.34
sys/arch/prep/conf/GENERIC: revision 1.185
sys/arch/amiga/conf/INSTALL: revision 1.129
sys/arch/newsmips/conf/GENERIC: revision 1.133
sys/arch/cobalt/conf/GENERIC: revision 1.156
sys/arch/sun2/conf/GENERIC: revision 1.99
sys/arch/luna68k/conf/INSTALL: revision 1.25
sys/arch/amigappc/conf/NULL: revision 1.53
sys/arch/acorn26/conf/GENERIC: revision 1.85
sys/arch/vax/conf/VAX780: revision 1.25
sys/arch/luna68k/conf/GENERIC: revision 1.125
sys/arch/ews4800mips/conf/GENERIC: revision 1.56
sys/arch/macppc/conf/POWERMAC_G5: revision 1.29
sys/arch/arc/conf/GENERIC: revision 1.189
sys/arch/macppc/conf/MAMBO: revision 1.27
sys/arch/acorn32/conf/EB7500ATX: revision 1.64
sys/arch/pmax/conf/GENERIC: revision 1.196
sys/arch/pmax/conf/GENERIC64: revision 1.28
sys/arch/amiga/conf/GENERIC: revision 1.319
sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.55
sys/arch/macppc/conf/GENERIC: revision 1.339
sys/arch/emips/conf/GENERIC: revision 1.21
sys/arch/sandpoint/conf/GENERIC: revision 1.97
sys/arch/landisk/conf/GENERIC: revision 1.58
sys/arch/bebox/conf/GENERIC: revision 1.157
sys/arch/alpha/conf/GENERIC: revision 1.379
Alternate buffer queue strategies no longer considered experimental, update
description.
Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.97.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.97.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.97.2.1 21-May-2018  pgoyette Sync with HEAD
 1.99.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.99.2.1 10-Jun-2019  christos Sync with HEAD
 1.106.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.107.4.1 01-Aug-2021  thorpej Sync with HEAD.
 1.15 09-Jun-2010  phx The sandpoint port is now focussed on 824x based NAS boxes.
Replaced GENERIC by GENERIC.NAS.
Added INSTALL_KURO for KuroBox.
GENERIC.NAS and RAMDISK are no longer needed.
 1.14 29-May-2010  phx 'satmgr' device for communicating with the satellite processor found on many
MPC824x-based systems. It registers the power button to sysmon and sets
a reboot/shutdown callback for cpu_reboot(). Other functions can be controlled
through /dev/satmgr.
Currently there is support for KuroBox and Synology, which will be extended
as soon more platforms have been reasearched.
This patch was submitted by Toru Nishimura.
 1.13 17-May-2010  phx Excluded KUROBOX from GENERIC.NAS because console is on a different port.
Add INET6 option to GENERIC(.NAS).
Build KUROBOX kernel together with GENERIC and GENERIC.NAS.
Patch submitted by Toru Nishimura.
 1.12 08-May-2010  phx Synology boxes need sk(4), not msk(4).
 1.11 05-Dec-2009  pooka branches: 1.11.2; 1.11.4;
Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.10 20-Jul-2009  nisimura - add missing "usb* at ehci?" line.
 1.9 24-Jan-2009  mrg branches: 1.9.2;
add COMPAT_50 to all the configs with COMPAT_40.
 1.8 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

Proposed on tech-kern@.
 1.7 31-Jul-2008  simonb branches: 1.7.2;
Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.6 07-Apr-2008  nisimura branches: 1.6.4; 1.6.6; 1.6.10;
- assign console on at 0x4600 for GENERIC.NAS configuration.
 1.5 05-Apr-2008  nisimura - add COMPAT_40
- add #options WAPBL for journalled BSDFFS for GENERIC.NAS
 1.4 27-Oct-2007  nisimura branches: 1.4.2; 1.4.6; 1.4.20;
- remove ppb which is unlikey used.
- a comment about console selection.
 1.3 24-Oct-2007  nisimura Add fxp(4) to facilitate the entire development cycle. Benefitial
to emulate NAS products with southbridge-less SP3 and EnCorePP1.
 1.2 17-Oct-2007  garbled branches: 1.2.2;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.1 23-May-2007  nisimura branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
file GENERIC.NAS was initially added on branch ppcoea-renovation.
 1.1.10.2 13-Nov-2007  bouyer Sync with HEAD
 1.1.10.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.8.1 18-Oct-2007  yamt sync with head.
 1.1.6.3 02-Nov-2007  joerg More diff reduce to HEAD due to botched up merging.
 1.1.6.2 28-Oct-2007  joerg Sync with HEAD.
 1.1.6.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.1.2.1 23-May-2007  nisimura - add SANDPOINT, GENERIC.NAS and GENERIC
this port is going to host a range of MPC8241/8245 NAS products.
SANDPOINT supports X2 and X3 absorbing the EPIC usage difference
between them. GENERIC.NAS is for a flock of NAS in market.
- have ENCPP1 some more devices.
 1.2.2.3 03-Dec-2007  ad Sync with HEAD.
 1.2.2.2 23-Oct-2007  ad Sync with head.
 1.2.2.1 17-Oct-2007  ad file GENERIC.NAS was added on branch vmlocking on 2007-10-23 20:36:26 +0000
 1.4.20.3 17-Jan-2009  mjf Sync with HEAD.
 1.4.20.2 28-Sep-2008  mjf Sync with HEAD.
 1.4.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.6.2 06-Nov-2007  matt sync with HEAD
 1.4.6.1 27-Oct-2007  matt file GENERIC.NAS was added on branch matt-armv6 on 2007-11-06 23:21:19 +0000
 1.4.2.2 27-Oct-2007  yamt sync with head.
 1.4.2.1 27-Oct-2007  yamt file GENERIC.NAS was added on branch yamt-lazymbuf on 2007-10-27 11:28:14 +0000
 1.6.10.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.6.10.1 19-Oct-2008  haad Sync with HEAD.
 1.6.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.6.4.4 11-Aug-2010  yamt sync with head.
 1.6.4.3 11-Mar-2010  yamt sync with head
 1.6.4.2 19-Aug-2009  yamt sync with head.
 1.6.4.1 04-May-2009  yamt sync with head.
 1.7.2.3 28-Apr-2009  skrll Sync with HEAD.
 1.7.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.7.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.9.2.1 24-Oct-2010  jym Sync with HEAD
 1.11.4.2 03-Jul-2010  rmind sync with head
 1.11.4.1 30-May-2010  rmind sync with head
 1.11.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.11.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.2 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.1 16-May-2002  briggs branches: 1.1.2; 1.1.6; 1.1.8; 1.1.30; 1.1.72; 1.1.80; 1.1.90; 1.1.92; 1.1.94; 1.1.96;
Split GENERIC into GENERIC (for the X3 revision of the board in native
interrupt mode) and GENERIC.X2 (for the X2 revision of the board or an
X3 in legacy interrupt mode).
 1.1.96.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.94.1 18-Oct-2007  yamt sync with head.
 1.1.92.1 06-Nov-2007  matt sync with HEAD
 1.1.90.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.1.80.1 23-May-2007  nisimura - add SANDPOINT, GENERIC.NAS and GENERIC
this port is going to host a range of MPC8241/8245 NAS products.
SANDPOINT supports X2 and X3 absorbing the EPIC usage difference
between them. GENERIC.NAS is for a flock of NAS in market.
- have ENCPP1 some more devices.
 1.1.72.1 23-Oct-2007  ad Sync with head.
 1.1.30.1 27-Oct-2007  yamt sync with head.
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 16-May-2002  jdolecek file GENERIC.X2 was added on branch kqueue on 2002-06-23 17:39:57 +0000
 1.1.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 16-May-2002  nathanw file GENERIC.X2 was added on branch nathanw_sa on 2002-06-20 03:40:43 +0000
 1.1.2.2 16-May-2002  briggs Split GENERIC into GENERIC (for the X3 revision of the board in native
interrupt mode) and GENERIC.X2 (for the X2 revision of the board or an
X3 in legacy interrupt mode).
 1.1.2.1 16-May-2002  briggs file GENERIC.X2 was added on branch gehenna-devsw on 2002-05-16 00:20:01 +0000
 1.33 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.32 27-Sep-2006  manu branches: 1.32.8; 1.32.16; 1.32.26; 1.32.28; 1.32.30; 1.32.32;
- Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.31 15-Sep-2006  gdamore branches: 1.31.2;
Convert sandpoint to GENERIC todr, including breaking of the clock handling
out into its own driver. (NB: mcclock should really, really be an MI driver
to avoid this kind of pasteware, but it is "nontrivial" to cope with the
fact that some machines have different ideas of mcclock.)
 1.30 09-May-2006  he branches: 1.30.8;
Bump SYMTAB_SPACE so that the symbol table fits again.
 1.29 05-Feb-2006  cube branches: 1.29.2; 1.29.4; 1.29.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.28 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.27 07-Dec-2005  tsutsui branches: 1.27.2; 1.27.4; 1.27.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.26 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.25 19-Aug-2005  christos 64 bit inode changes.
 1.24 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.23 25-Jun-2005  rpaulo branches: 1.23.2;
Add file-system PTYFS (commented out) so that people know its existence.

Ok'ed by Christos Zoulas and Hubert Feyrer.
 1.22 31-May-2005  tron Remove attachment for the piixide(4) driver from all non-x86 kernel
configurations because Intel IDE disk controllers only exist as part
of Intel chipsets for x86 systems.
 1.21 25-Feb-2005  simonb branches: 1.21.2;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.20 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.19 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.18 24-Nov-2004  bouyer branches: 1.18.4; 1.18.6;
pdcsata(4), a driver for the Promise SATA150 (aka PDC203xx) serie of
controllers. Tested with a PDC20375 (2 SATA, one PATA) controller on sparc64.
Added to all kernel config file which had pdcide(4).
 1.17 10-Nov-2004  christos Add COMPAT_BSDPTY to the rest of the config files.
 1.16 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.15 26-Jun-2004  abs Add (commented out) ALTQ options to all GENERIC-like files
 1.14 22-Jun-2004  itojun have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
 1.13 18-Jun-2004  christos ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM
 1.12 16-Jun-2004  christos Add pseudo-device ptm on all the generic flavored kernels.
 1.11 14-Dec-2003  thorpej branches: 1.11.2;
Split the Intel i31244 SATA controller ("Artisea") driver out of piixide
into its own driver (artsata).
 1.10 13-Dec-2003  thorpej Split out the Silicon Image SATALink support into its own driver,
"satalink".
 1.9 18-Oct-2003  lukem Use one 'atabus* at ata?' instead of multiple 'atabus* at FOOide? channel ?'
Use 'atapibus* at atapi?' instead of 'atapibus* at atabus?'
 1.8 08-Oct-2003  bouyer Add new per-chip pciide drivers.
 1.7 08-Oct-2003  bouyer Add atabus.
 1.6 26-Apr-2003  ragge branches: 1.6.2;
Add pseudo-device ksyms.
 1.5 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.4 14-Oct-2002  elric Added commented out cgd(4)s to GENERIC configs.
 1.3 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.2 17-Jun-2002  lukem branches: 1.2.2; 1.2.4;
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.1 16-May-2002  briggs branches: 1.1.2; 1.1.4;
Split GENERIC into GENERIC (for the X3 revision of the board in native
interrupt mode) and GENERIC.X2 (for the X2 revision of the board or an
X3 in legacy interrupt mode).
 1.1.4.1 01-Aug-2002  lukem Pull up revision 1.2 (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.1.2.2 15-Jul-2002  gehenna catch up with -current.
 1.1.2.1 16-May-2002  gehenna file GENERIC.sandpoint was added on branch gehenna-devsw on 2002-07-15 01:20:52 +0000
 1.2.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.2.4.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.4.1 17-Jun-2002  jdolecek file GENERIC.sandpoint was added on branch kqueue on 2002-06-23 17:39:58 +0000
 1.2.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.2 20-Jun-2002  nathanw Catch up to -current.
 1.2.2.1 17-Jun-2002  nathanw file GENERIC.sandpoint was added on branch nathanw_sa on 2002-06-20 03:40:43 +0000
 1.6.2.9 11-Dec-2005  christos Sync with head.
 1.6.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.2.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.6.2.6 15-Feb-2005  skrll Sync with HEAD.
 1.6.2.5 29-Nov-2004  skrll Sync with HEAD.
 1.6.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.2.2 15-Jul-2004  he branches: 1.11.2.2.2;
Pull up revision 1.16 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.11.2.1 30-Jun-2004  jdc Pull up revision 1.15 (requested by abs in ticket #567).

Add (commented out) ALTQ options to all GENERIC-like files
 1.11.2.2.2.1 02-Apr-2005  he Pull up revision 1.18 (requested by bouyer in ticket #1019):
Add pdcsata(4), a driver for the Promise SATA150 (aka PDC203xx) series of
controllers.
 1.18.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.18.6.1 12-Feb-2005  yamt sync with head.
 1.18.4.1 29-Apr-2005  kent sync with -current
 1.21.2.2 14-Aug-2005  riz Pull up revision 1.24 (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.21.2.1 01-Jun-2005  riz Pull up revision 1.22 (requested by tron in ticket #362):
Remove attachment for the piixide(4) driver from all non-x86 kernel
configurations because Intel IDE disk controllers only exist as part
of Intel chipsets for x86 systems.
 1.23.2.3 27-Oct-2007  yamt sync with head.
 1.23.2.2 30-Dec-2006  yamt sync with head.
 1.23.2.1 21-Jun-2006  yamt sync with head.
 1.27.6.2 01-Jun-2006  kardel Sync with head.
 1.27.6.1 22-Apr-2006  simonb Sync with head.
 1.27.4.1 09-Sep-2006  rpaulo sync with head
 1.27.2.1 18-Feb-2006  yamt sync with head.
 1.29.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.29.4.1 11-May-2006  elad sync with head
 1.29.2.1 24-May-2006  yamt sync with head.
 1.30.8.1 18-Nov-2006  ad Sync with head.
 1.31.2.1 22-Oct-2006  yamt sync with head
 1.32.32.1 25-Oct-2007  bouyer Sync with HEAD.
 1.32.30.1 18-Oct-2007  yamt sync with head.
 1.32.28.1 06-Nov-2007  matt sync with HEAD
 1.32.26.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.32.16.1 23-May-2007  nisimura - add SANDPOINT, GENERIC.NAS and GENERIC
this port is going to host a range of MPC8241/8245 NAS products.
SANDPOINT supports X2 and X3 absorbing the EPIC usage difference
between them. GENERIC.NAS is for a flock of NAS in market.
- have ENCPP1 some more devices.
 1.32.8.1 23-Oct-2007  ad Sync with head.
 1.10 28-Mar-2022  martin Provide a bit more space for the ramdisk image (which recently did grow)
 1.9 10-Aug-2014  joerg Bump the ramdisk size on macppc and sandpoint somewhat to compensate for
larger code with LLVM.
 1.8 23-Nov-2010  hannken branches: 1.8.18;
Remove unused count from pseudo-device md.
 1.7 09-Jun-2010  phx The sandpoint port is now focussed on 824x based NAS boxes.
Replaced GENERIC by GENERIC.NAS.
Added INSTALL_KURO for KuroBox.
GENERIC.NAS and RAMDISK are no longer needed.
 1.6 06-Feb-2009  jym branches: 1.6.4; 1.6.6;
Changes to MEMORY_RBFLAGS option:
- renamed to MEMORY_DISK_RBFLAGS to better fit the rest of the
MEMORY_DISK options(4)
- change default value to RB_AUTOBOOT instead of RB_SINGLE, and adapt
the config(5) files accordingly
- document this option inside options(4)

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

Reviewed by abs@ in private mail.
 1.5 05-Jul-2002  abs branches: 1.5.112; 1.5.120;
Ensure all INSTALL config files consistantly include PIPE_SOCKETPAIR,
MALLOC_NOINLINE, and VNODE_OP_NOINLINE. The exceptions are when they
include another config files that already defines the options, or if
they are for an embedded board, just define a few extra options, and
do not already define PIPE_SOCKETPAIR.
 1.4 02-Apr-2002  lukem branches: 1.4.2;
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.3 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.2 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.1 07-Dec-2001  briggs branches: 1.1.2; 1.1.4;
Add INSTALL kernel (copy from RAMDISK).
 1.1.4.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.4.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.4.4 16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 07-Dec-2001  thorpej file INSTALL was added on branch kqueue on 2002-01-10 19:48:18 +0000
 1.1.2.6 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.5 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.2.1 07-Dec-2001  nathanw file INSTALL was added on branch nathanw_sa on 2002-01-08 00:27:22 +0000
 1.4.2.1 17-Jul-2002  gehenna catch up with -current.
 1.5.120.1 03-Mar-2009  skrll Sync with HEAD.
 1.5.112.2 11-Aug-2010  yamt sync with head.
 1.5.112.1 04-May-2009  yamt sync with head.
 1.6.6.2 05-Mar-2011  rmind sync with head
 1.6.6.1 03-Jul-2010  rmind sync with head
 1.6.4.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.8.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4 29-Mar-2022  martin More space for the memory disk image is needed here too (follow the
last change in INSTALL)
 1.3 10-Aug-2014  joerg Bump the ramdisk size on macppc and sandpoint somewhat to compensate for
larger code with LLVM.
 1.2 23-Nov-2010  hannken branches: 1.2.18;
Remove unused count from pseudo-device md.
 1.1 09-Jun-2010  phx branches: 1.1.2; 1.1.4; 1.1.6;
The sandpoint port is now focussed on 824x based NAS boxes.
Replaced GENERIC by GENERIC.NAS.
Added INSTALL_KURO for KuroBox.
GENERIC.NAS and RAMDISK are no longer needed.
 1.1.6.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.1.6.1 09-Jun-2010  uebayasi file INSTALL_KURO was added on branch uebayasi-xip on 2010-08-17 06:45:06 +0000
 1.1.4.2 11-Aug-2010  yamt sync with head.
 1.1.4.1 09-Jun-2010  yamt file INSTALL_KURO was added on branch yamt-nfs-mp on 2010-08-11 22:52:38 +0000
 1.1.2.3 05-Mar-2011  rmind sync with head
 1.1.2.2 03-Jul-2010  rmind sync with head
 1.1.2.1 09-Jun-2010  rmind file INSTALL_KURO was added on branch rmind-uvmplock on 2010-07-03 01:19:25 +0000
 1.2.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9 25-Mar-2021  rin At least KuroBox Classic and HG seem to have buggy UART, for which
ETXRDY interrupts are sometimes (once per a few hours?) lost; TX stalls
until next RX arrives.

Since interrupt-based I/O works just fine for other devices, I believe
this problem is due to UART and not to PIC or its driver.

In order to work around this bug, enable COM_HW_BROKEN_ETXRDY bit, as
well as carry out polling once per 10 sec or 1k tics (arbitrary, but
1 min seems too long).

XXX
Apply this for other MPC824x-based boards?
 1.8 03-Jan-2020  thorpej branches: 1.8.8; 1.8.10;
Eliminate all of the #ifdefs for the "strtc" driver. Define model
properties (similar to what the "dsrtc" driver does), and provide
DT compat strings corresponding to those models. Allow config flags
to specify the model for non-FDT platforms (also like "dsrtc").
 1.7 21-Sep-2015  phx branches: 1.7.18;
Remove erroneously entered debug options.
 1.6 21-Sep-2015  phx double vlan pseudo-device removed
 1.5 12-May-2012  nisimura branches: 1.5.16;

More "no" designations to reflect the target NAS hardware configuration.
Is provided as a reference for other NAS platforms. Before-after
factor is the 91% fitness.
 1.4 14-Jan-2012  phx New device nhpow(4) to support the onboard GPIO pins on a NH230/231 board for
buttons, powerdown, reset, LEDs and fan control. It attaches gpio(4) for
its 8 pins on demand.
 1.3 09-Jun-2010  phx branches: 1.3.2; 1.3.4; 1.3.12; 1.3.16;
The sandpoint port is now focussed on 824x based NAS boxes.
Replaced GENERIC by GENERIC.NAS.
Added INSTALL_KURO for KuroBox.
GENERIC.NAS and RAMDISK are no longer needed.
 1.2 29-May-2010  phx branches: 1.2.2;
'satmgr' device for communicating with the satellite processor found on many
MPC824x-based systems. It registers the power button to sysmon and sets
a reboot/shutdown callback for cpu_reboot(). Other functions can be controlled
through /dev/satmgr.
Currently there is support for KuroBox and Synology, which will be extended
as soon more platforms have been reasearched.
This patch was submitted by Toru Nishimura.
 1.1 17-May-2010  phx Excluded KUROBOX from GENERIC.NAS because console is on a different port.
Add INET6 option to GENERIC(.NAS).
Build KUROBOX kernel together with GENERIC and GENERIC.NAS.
Patch submitted by Toru Nishimura.
 1.2.2.3 03-Jul-2010  rmind sync with head
 1.2.2.2 30-May-2010  rmind sync with head
 1.2.2.1 29-May-2010  rmind file KUROBOX was added on branch rmind-uvmplock on 2010-05-30 05:17:05 +0000
 1.3.16.2 02-Jun-2012  mrg sync to latest -current.
 1.3.16.1 18-Feb-2012  mrg merge to -current.
 1.3.12.2 23-May-2012  yamt sync with head.
 1.3.12.1 17-Apr-2012  yamt sync with head
 1.3.4.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.3.4.1 09-Jun-2010  uebayasi file KUROBOX was added on branch uebayasi-xip on 2010-08-17 06:45:06 +0000
 1.3.2.2 11-Aug-2010  yamt sync with head.
 1.3.2.1 09-Jun-2010  yamt file KUROBOX was added on branch yamt-nfs-mp on 2010-08-11 22:52:38 +0000
 1.5.16.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.7.18.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.8.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.8.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4 26-Aug-2001  matt Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.3 01-Jun-2001  simonb branches: 1.3.2;
Rename assembly files that are pre-processed by cpp to use an S suffix.
 1.2 29-May-2001  mrg define _KERNEL_OPT as well as _KERNEL. we will use this in the future to
get kernel "opt_foo.h" headers, rather than _KERNEL && !_LKM.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 04-Feb-2001  bouyer file Makefile.sandpoint was added on branch thorpej_scsipi on 2001-02-11 19:11:41 +0000
 1.3.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.5 09-Jun-2010  phx The sandpoint port is now focussed on 824x based NAS boxes.
Replaced GENERIC by GENERIC.NAS.
Added INSTALL_KURO for KuroBox.
GENERIC.NAS and RAMDISK are no longer needed.
 1.4 06-Feb-2009  jym branches: 1.4.2; 1.4.4; 1.4.6;
Changes to MEMORY_RBFLAGS option:
- renamed to MEMORY_DISK_RBFLAGS to better fit the rest of the
MEMORY_DISK options(4)
- change default value to RB_AUTOBOOT instead of RB_SINGLE, and adapt
the config(5) files accordingly
- document this option inside options(4)

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

Reviewed by abs@ in private mail.
 1.3 02-Apr-2002  lukem branches: 1.3.116; 1.3.124;
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.2 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.1 07-Jun-2001  briggs branches: 1.1.2; 1.1.4; 1.1.10;
GENERIC + memory disk hooks.
 1.1.10.3 17-Apr-2002  nathanw Catch up to -current.
 1.1.10.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.10.1 07-Jun-2001  nathanw file RAMDISK was added on branch nathanw_sa on 2002-04-01 07:42:15 +0000
 1.1.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.124.1 03-Mar-2009  skrll Sync with HEAD.
 1.3.116.2 11-Aug-2010  yamt sync with head.
 1.3.116.1 04-May-2009  yamt sync with head.
 1.4.6.1 03-Jul-2010  rmind sync with head
 1.4.4.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.4.4.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.4.2.1 24-Oct-2010  jym Sync with HEAD
 1.21 07-Apr-2022  andvar s/psuedo/pseudo/
 1.20 21-Jan-2021  nia add a commented out compat_ossaudio wherever there's compat_linux

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

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.18 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.17 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.16 14-Jul-2018  maxv Remove "options IPKDB", and the other associated options, from the config
files.

ipkdb is being retired. Its code is really old, and hasn't kept pace with
today's expectations: IPv6, SMP, modern NICs. The associated code for x86
was already removed because it was too incorrect to stay.

There are plans to rewrite a similar feature from scratch.

ok kamil christos
 1.15 14-Jul-2018  maxv Remove "options DEBUG_BY_TOOLS", it doesn't exist.
 1.14 14-Sep-2017  mrg branches: 1.14.2; 1.14.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.13 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.12 19-Feb-2017  rin PR kern/51208
Add DISKLABEL_EI option (and also FFS_EI if missing), commented out except for
ALL on amd64 and i386.
 1.11 23-Aug-2014  dholland branches: 1.11.2; 1.11.4; 1.11.6;
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.10 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.9 22-Feb-2012  nisimura branches: 1.9.2;

- nuke commented-out SYMTAB_SPACE directive since this port has a
companion bootloader which is capable of loading a plain ELF kernel
and accompanying ELF symbol table.
- remove fxp(4) from GENERIC as no known NAS has the device.
 1.8 22-Nov-2011  tls branches: 1.8.2;

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

This fixes build breaks on several ports. Thanks to Havard Eidnes for
pointing them out.
 1.7 30-Jun-2010  phx branches: 1.7.8;
Add file system snapshot device.
 1.6 05-Dec-2009  pooka branches: 1.6.2; 1.6.4;
Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.5 19-Aug-2009  nisimura - use options PIC_MPCSOC to replace PIC_OPENPIC.
 1.4 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

Proposed on tech-kern@.
 1.3 05-Apr-2008  nisimura branches: 1.3.4; 1.3.10; 1.3.12;
- add COMPAT_40
- add #options WAPBL for journalled BSDFFS for GENERIC.NAS
 1.2 17-Oct-2007  garbled branches: 1.2.2; 1.2.4; 1.2.8; 1.2.22;
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.1 23-May-2007  nisimura branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
file SANDPOINT was initially added on branch ppcoea-renovation.
 1.1.10.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.8.1 18-Oct-2007  yamt sync with head.
 1.1.6.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.1.2.2 30-May-2007  nisimura - fix description errors in SANDPOINT conf.
- add com and ociic EUMB devices. The latter is under development.
 1.1.2.1 23-May-2007  nisimura - add SANDPOINT, GENERIC.NAS and GENERIC
this port is going to host a range of MPC8241/8245 NAS products.
SANDPOINT supports X2 and X3 absorbing the EPIC usage difference
between them. GENERIC.NAS is for a flock of NAS in market.
- have ENCPP1 some more devices.
 1.2.22.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.22.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.8.2 06-Nov-2007  matt sync with HEAD
 1.2.8.1 17-Oct-2007  matt file SANDPOINT was added on branch matt-armv6 on 2007-11-06 23:21:20 +0000
 1.2.4.2 27-Oct-2007  yamt sync with head.
 1.2.4.1 17-Oct-2007  yamt file SANDPOINT was added on branch yamt-lazymbuf on 2007-10-27 11:28:14 +0000
 1.2.2.2 23-Oct-2007  ad Sync with head.
 1.2.2.1 17-Oct-2007  ad file SANDPOINT was added on branch vmlocking on 2007-10-23 20:36:27 +0000
 1.3.12.1 19-Jan-2009  skrll Sync with HEAD.
 1.3.10.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.3.4.4 11-Aug-2010  yamt sync with head.
 1.3.4.3 11-Mar-2010  yamt sync with head
 1.3.4.2 19-Aug-2009  yamt sync with head.
 1.3.4.1 04-May-2009  yamt sync with head.
 1.6.4.1 03-Jul-2010  rmind sync with head
 1.6.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.7.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.7.8.1 17-Apr-2012  yamt sync with head
 1.8.2.1 24-Feb-2012  mrg sync to -current.
 1.9.2.2 03-Dec-2017  jdolecek update from HEAD
 1.9.2.1 23-Jun-2013  tls resync from head
 1.11.6.1 21-Apr-2017  bouyer Sync with HEAD
 1.11.4.1 20-Mar-2017  pgoyette Sync with HEAD
 1.11.2.1 28-Aug-2017  skrll Sync with HEAD
 1.14.4.1 10-Jun-2019  christos Sync with HEAD
 1.14.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.14.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.19.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.32 24-Apr-2021  thorpej 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.31 14-Jan-2012  phx branches: 1.31.62;
New device nhpow(4) to support the onboard GPIO pins on a NH230/231 board for
buttons, powerdown, reset, LEDs and fan control. It attaches gpio(4) for
its 8 pins on demand.
 1.30 17-Dec-2011  phx Added NOR flash driver, using nor(4) and flash(4).
 1.29 01-Mar-2011  phx branches: 1.29.4; 1.29.8;
Revert the major number for satmgr(4) back to 100 and allocate it from
majors.powerpc, as suggested by matt@.
 1.28 26-Feb-2011  phx Changed satmgr(4) device major number from 100 to 144, which is reserved
for local/vendor use according to src/sys/conf/majors. This prevents
problems when the shared PowerPC device majors list gets another entry.
 1.27 12-Jan-2011  phx branches: 1.27.2; 1.27.4;
Rewritten to take advantage of the new MI motoi2c code.
 1.26 29-May-2010  phx 'satmgr' device for communicating with the satellite processor found on many
MPC824x-based systems. It registers the power button to sysmon and sets
a reboot/shutdown callback for cpu_reboot(). Other functions can be controlled
through /dev/satmgr.
Currently there is support for KuroBox and Synology, which will be extended
as soon more platforms have been reasearched.
This patch was submitted by Toru Nishimura.
 1.25 09-Apr-2008  nisimura branches: 1.25.4; 1.25.24; 1.25.26;
- abandon to maintain disksubr.c in favour of kern/subr_disk_mbr.c.
 1.24 20-Feb-2008  drochner branches: 1.24.6;
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.23 11-Dec-2007  nisimura - switch to use majors.powerpc.
 1.22 03-Dec-2007  ad branches: 1.22.2; 1.22.4; 1.22.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.21 17-Oct-2007  garbled branches: 1.21.2;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.20 10-Apr-2007  macallan branches: 1.20.4; 1.20.12; 1.20.14; 1.20.16; 1.20.18;
include files.wsfb
 1.19 15-Sep-2006  gdamore branches: 1.19.6; 1.19.10; 1.19.12;
Convert sandpoint to GENERIC todr, including breaking of the clock handling
out into its own driver. (NB: mcclock should really, really be an MI driver
to avoid this kind of pasteware, but it is "nontrivial" to cope with the
fact that some machines have different ideas of mcclock.)
 1.18 11-Dec-2005  christos branches: 1.18.20;
merge ktrace-lwp.
 1.17 13-Mar-2004  bjh21 branches: 1.17.16;
Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it. This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111. The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers. To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned. Thy just use rather more function pointers than before. Tested
on i386 and (with a new host driver) acorn32. Compiled on several other
affected architectures.
 1.16 18-Mar-2003  matt branches: 1.16.2;
Switch/adapt to new bus space infrastructure.
 1.15 05-Mar-2003  matt Remove port-specific procfs_machdep.c (since they are all identical and
a better one resides in powerpc/powerpc/).
 1.14 30-Oct-2002  manu Moved binary compatibility options from arch directory to cpu directory
 1.13 26-Oct-2002  jdolecek now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
 1.12 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.11 16-Apr-2002  thorpej branches: 1.11.2;
* 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.10 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.9 11-Oct-2001  briggs branches: 1.9.4;
include dev/wsfont/files.wsfont
 1.8 26-Aug-2001  matt Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.7 18-Jun-2001  christos branches: 1.7.2;
Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.
 1.6 12-Jun-2001  tsubai Move "file .../bus_dma.c" line to MD place.
Add options PPC_MPC6XX on missed ports.
XXX I think PPC_OEA is better name.
 1.5 10-Jun-2001  briggs Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.4 12-Mar-2001  manu enabled COMPAT_LINUX for sandpoint
 1.3 08-Feb-2001  briggs branches: 1.3.2; 1.3.4;
Keyboard, mouse, ws*
 1.2 08-Feb-2001  briggs Add fdc and lpt.
 1.1 04-Feb-2001  briggs Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.3.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.3.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.3.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.3.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.3.2.1 08-Feb-2001  bouyer file files.sandpoint was added on branch thorpej_scsipi on 2001-02-11 19:11:41 +0000
 1.7.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.7.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.9.4.5 11-Nov-2002  nathanw Catch up to -current
 1.9.4.4 17-Sep-2002  nathanw Catch up to -current.
 1.9.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.9.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.9.4.1 11-Oct-2001  nathanw file files.sandpoint was added on branch nathanw_sa on 2002-01-08 00:27:22 +0000
 1.11.2.2 17-May-2002  gehenna Remove old block majors list.
 1.11.2.1 16-May-2002  gehenna Include the list of block/character major numbers.
 1.16.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.16.6 27-Feb-2008  yamt sync with head.
 1.17.16.5 21-Jan-2008  yamt sync with head
 1.17.16.4 07-Dec-2007  yamt sync with head
 1.17.16.3 27-Oct-2007  yamt sync with head.
 1.17.16.2 03-Sep-2007  yamt sync with head.
 1.17.16.1 30-Dec-2006  yamt sync with head.
 1.18.20.1 18-Nov-2006  ad Sync with head.
 1.19.12.1 11-Jul-2007  mjf Sync with head.
 1.19.10.3 03-Dec-2007  ad Sync with HEAD.
 1.19.10.2 23-Oct-2007  ad Sync with head.
 1.19.10.1 10-Apr-2007  ad Sync with head.
 1.19.6.1 15-Apr-2007  yamt sync with head.
 1.20.18.1 25-Oct-2007  bouyer Sync with HEAD.
 1.20.16.1 18-Oct-2007  yamt sync with head.
 1.20.14.3 23-Mar-2008  matt sync with HEAD
 1.20.14.2 09-Jan-2008  matt sync with HEAD
 1.20.14.1 06-Nov-2007  matt sync with HEAD
 1.20.12.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.20.12.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.20.4.4 11-Jun-2007  nisimura - __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH.
- add pciide_machdep.c for compatibility mode IDE controller.
 1.20.4.3 23-May-2007  nisimura - make majors.sandpoint sync'ed with majors.evbppc, hoping the
userland is more-or-less NetBSD/macppc alike.
- have files.sandpoint some more.
 1.20.4.2 07-May-2007  garbled Adapt sandpoint to the changes made to the shared powerpc isa_machdep stuff.
 1.20.4.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- have std.sandpoint options PIC_OPENPIC and PIC_I8259.
- arrange files.sandpoint to use common powerpc files.
- add USB device inclusion.
 1.21.2.2 27-Dec-2007  mjf Sync with HEAD.
 1.21.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.22.6.1 13-Dec-2007  bouyer Sync with HEAD
 1.22.4.1 11-Dec-2007  yamt sync with head.
 1.22.2.1 26-Dec-2007  ad Sync with head.
 1.24.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.25.26.2 05-Mar-2011  rmind sync with head
 1.25.26.1 30-May-2010  rmind sync with head
 1.25.24.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.25.4.1 11-Aug-2010  yamt sync with head.
 1.27.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.27.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.29.8.1 18-Feb-2012  mrg merge to -current.
 1.29.4.1 17-Apr-2012  yamt sync with head
 1.31.62.1 21-Mar-2021  thorpej eumb does not need to carry the "mainbus" interface attribute.
 1.21 11-Dec-2007  nisimura - switch to use majors.powerpc.
 1.20 17-Oct-2007  garbled branches: 1.20.2; 1.20.4; 1.20.6; 1.20.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.19 09-Jan-2007  cube branches: 1.19.6; 1.19.14; 1.19.22; 1.19.24; 1.19.26; 1.19.28;
Remove traces of scd(4), which apparently never actually had a driver in
the tree.
 1.18 24-Nov-2006  wiz s/independant/independent/, from Zafer.
 1.17 11-Dec-2005  christos branches: 1.17.20; 1.17.22;
merge ktrace-lwp.
 1.16 17-Sep-2005  yamt make VMSWAP optional again.
 1.15 31-Jul-2005  yamt revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
 1.14 30-Jul-2005  yamt defflag VMSWAP.
 1.13 10-May-2005  jdolecek branches: 1.13.2;
assign major for nsmb(4)
 1.12 10-Dec-2003  jmc Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
 1.11 24-Oct-2003  jdolecek add major for 'ses' for archs which have the other scsi devices
 1.10 22-Oct-2003  jdolecek add wsfont major to archs which have the other wscons devices
 1.9 10-Oct-2003  jdolecek reassing majors for crypto and pf to use the newly defined MI major
range
 1.8 10-Oct-2003  jdolecek update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
 1.7 05-Oct-2003  jdolecek Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

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

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

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 16-May-2002  gehenna branches: 1.1.2;
file majors.sandpoint was initially added on branch gehenna-devsw.
 1.1.2.3 15-Jul-2002  gehenna catch up with -current.
 1.1.2.2 30-May-2002  gehenna Add $NetBSD$
 1.1.2.1 16-May-2002  gehenna Add the list of block/character majors.
 1.2.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.2.2.1 06-Sep-2002  nathanw file majors.sandpoint was added on branch nathanw_sa on 2002-09-17 21:17:14 +0000
 1.3.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.1 04-Oct-2002  jdolecek file majors.sandpoint was added on branch kqueue on 2002-10-10 18:35:30 +0000
 1.4.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.2.5 21-Jan-2008  yamt sync with head
 1.13.2.4 27-Oct-2007  yamt sync with head.
 1.13.2.3 26-Feb-2007  yamt sync with head.
 1.13.2.2 30-Dec-2006  yamt sync with head.
 1.13.2.1 21-Jun-2006  yamt sync with head.
 1.17.22.1 10-Dec-2006  yamt sync with head.
 1.17.20.1 12-Jan-2007  ad Sync with head.
 1.19.28.1 25-Oct-2007  bouyer Sync with HEAD.
 1.19.26.1 18-Oct-2007  yamt sync with head.
 1.19.24.2 23-Mar-2008  matt sync with HEAD
 1.19.24.1 06-Nov-2007  matt sync with HEAD
 1.19.22.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.19.14.1 23-May-2007  nisimura - make majors.sandpoint sync'ed with majors.evbppc, hoping the
userland is more-or-less NetBSD/macppc alike.
- have files.sandpoint some more.
 1.19.6.1 23-Oct-2007  ad Sync with head.
 1.20.8.1 13-Dec-2007  bouyer Sync with HEAD
 1.20.6.1 11-Dec-2007  yamt sync with head.
 1.20.4.1 26-Dec-2007  ad Sync with head.
 1.20.2.1 27-Dec-2007  mjf Sync with HEAD.
 1.14 19-Aug-2009  nisimura - use options PIC_MPCSOC to replace PIC_OPENPIC.
 1.13 27-Oct-2007  nisimura branches: 1.13.20;
stop to generate SREC kernel image. netboot is now considered a
standard path to boot off. DINK32 and ppcboot can handle it as a
staging bootloader.
 1.12 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.11 11-Dec-2005  christos branches: 1.11.30; 1.11.38; 1.11.48; 1.11.50; 1.11.52; 1.11.54;
merge ktrace-lwp.
 1.10 17-Sep-2005  yamt include "conf/std".
 1.9 12-Aug-2003  matt branches: 1.9.16;
Remove SPILLSTK leftovers.
 1.8 03-Feb-2003  matt branches: 1.8.2;
Rename PPC_MPC6XX to PPC_OEA (and any mpc6xx reference to oea).
 1.7 02-Feb-2003  matt Perform a rototill of the powerpc code. Mandate use of SPRG0 to store
a pointer to current cpu's cpu_info structure. Use cpu_info for
intstk,intr_depth,still_stk,idle_pcb,curpcb,curlwp,etal even on
non-MULTIPROCESSOR machines. Add common macros GET_CPUINFO and
INIT_CPUINFO to get and initialize the cpu_info struct on startup. Make
ibm4xx use the standard <powerpc/frame.h>. Use IFRAME_xx in ibm4xx
trap_subr.S instead of explicit magic offsets. Move INTSTK and SPILLSTK
to std.<platform>. Change faultbuf to a struct instead of an array.

On MPC6XX cpus, stop using the vector page for temporary space and use
reserved space in cpu_info.
 1.6 25-Apr-2002  briggs Add makeoptions PPCDIR.
 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 27-Aug-2001  briggs branches: 1.4.6;
text address is 0x90000, not 0x9000.
 1.3 26-Aug-2001  matt Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.2 10-Jun-2001  briggs branches: 1.2.2;
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 04-Feb-2001  bouyer file std.sandpoint was added on branch thorpej_scsipi on 2001-02-11 19:11:41 +0000
 1.2.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.6.3 20-Jun-2002  nathanw Catch up to -current.
 1.4.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.6.1 27-Aug-2001  nathanw file std.sandpoint was added on branch nathanw_sa on 2002-01-08 00:27:22 +0000
 1.8.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.16.3 15-Nov-2007  yamt sync with head.
 1.9.16.2 27-Oct-2007  yamt sync with head.
 1.9.16.1 21-Jun-2006  yamt sync with head.
 1.11.54.2 13-Nov-2007  bouyer Sync with HEAD
 1.11.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.11.52.1 18-Oct-2007  yamt sync with head.
 1.11.50.1 06-Nov-2007  matt sync with HEAD
 1.11.48.2 28-Oct-2007  joerg Sync with HEAD.
 1.11.48.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.11.38.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- have std.sandpoint options PIC_OPENPIC and PIC_I8259.
- arrange files.sandpoint to use common powerpc files.
- add USB device inclusion.
 1.11.30.2 03-Dec-2007  ad Sync with HEAD.
 1.11.30.1 23-Oct-2007  ad Sync with head.
 1.13.20.1 19-Aug-2009  yamt sync with head.
 1.20 21-Dec-2015  christos Add mips fenv.h (From FreeBSD)
 1.19 23-Jul-2014  alnsn branches: 1.19.4;
Rename sljitarch.h to sljit_machdep.h.
 1.18 17-Nov-2013  alnsn branches: 1.18.2;
Enable sljit and bpfjit on powerpc.
 1.17 11-Dec-2005  christos branches: 1.17.112; 1.17.122; 1.17.128;
merge ktrace-lwp.
 1.16 20-Oct-2003  matt Reorganize the way powerpc port install machine specific headers.
Use <powerpc/oea/bat.h> exclusively and remove <machine/bat.h> and
<powerpc/bat.h>. Remove unneeded <machine/cpufunc.h>. To insure
1:1 correspondence of <powerpc/FOO.h> to <machine/FOO.h> include
"../../powerpc/include/Makefile" in "arch/FOO/include/Makefile".
Incororpate <byte_swap.h> into <bswap.h> and then byte_swap.h
 1.15 19-Oct-2003  matt Remove unused header.
Don't install kernel-only headers.
 1.14 18-Jan-2003  thorpej branches: 1.14.2;
Merge the nathanw_sa branch.
 1.13 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.12 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.11 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.10 12-Apr-2002  briggs branches: 1.10.2;
Don't need to install spkr.h
 1.9 10-Jun-2001  briggs branches: 1.9.2; 1.9.8;
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.8 03-May-2001  soren PPC machine type tags haven't been used for a while.
 1.7 16-Apr-2001  briggs Remove extra whitespace after \.
 1.6 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.5 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.4 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
 1.3 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.2 13-Feb-2001  briggs branches: 1.2.2;
Install int_types.h, too.
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.4 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file Makefile was added on branch thorpej_scsipi on 2001-02-11 19:11:41 +0000
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.8.6 11-Dec-2002  thorpej Sync with HEAD.
 1.9.8.5 17-Sep-2002  nathanw Catch up to -current.
 1.9.8.4 13-Aug-2002  nathanw Catch up to -current.
 1.9.8.3 17-Apr-2002  nathanw Catch up to -current.
 1.9.8.2 05-Nov-2001  briggs Initial SA support for ppc. Test-booted on sandpoint, macppc, & walnut.
mcontext and cpu_getmcontext()/cpu_setmcontext() from Klaus Klein
<kleink@netbsd.org>.
 1.9.8.1 10-Jun-2001  briggs file Makefile was added on branch nathanw_sa on 2001-11-05 19:46:21 +0000
 1.9.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.9.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.10.2.2 31-Aug-2002  gehenna catch up with -current.
 1.10.2.1 19-May-2002  gehenna Remove port-dependent conf.h.
 1.14.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.128.1 18-May-2014  rmind sync with head
 1.17.122.2 03-Dec-2017  jdolecek update from HEAD
 1.17.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.112.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.18.2.1 10-Aug-2014  tls Rebase.
 1.19.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file ansi.h was added on branch thorpej_scsipi on 2001-02-11 19:11:42 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file aout_machdep.h was added on branch thorpej_scsipi on 2001-02-11 19:11:42 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file asm.h was added on branch thorpej_scsipi on 2001-02-11 19:11:43 +0000
 1.3 05-Jun-2011  matt Remove <machine/atomic.h>; use <sys/atomic.h> instead.
Add <powerpc/cpuset.h> (for mpc85xx pmap).
Add some initial MP code for mpc85xx
Rework ipi code to be common across all ppcs
Change PPC to keep curlwp in %r13 while in the kernel.
Move astpending from cpu_info to mdlwp
Improve cpu_need_resched to be more MP friendly.
 1.2 11-Dec-2005  christos branches: 1.2.100; 1.2.106; 1.2.110;
merge ktrace-lwp.
 1.1 20-Oct-2003  matt branches: 1.1.4;
Reorganize the way powerpc port install machine specific headers.
Use <powerpc/oea/bat.h> exclusively and remove <machine/bat.h> and
<powerpc/bat.h>. Remove unneeded <machine/cpufunc.h>. To insure
1:1 correspondence of <powerpc/FOO.h> to <machine/FOO.h> include
"../../powerpc/include/Makefile" in "arch/FOO/include/Makefile".
Incororpate <byte_swap.h> into <bswap.h> and then byte_swap.h
 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 20-Oct-2003  skrll file atomic.h was added on branch ktrace-lwp on 2004-08-03 10:39:55 +0000
 1.2.110.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.2.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.100.1 12-Jun-2011  rmind sync with head
 1.1 17-Dec-2011  phx branches: 1.1.4; 1.1.6;
Added NOR flash driver, using nor(4) and flash(4).
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 17-Dec-2011  yamt file autoconf.h was added on branch yamt-pagecache on 2012-04-17 00:06:49 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 17-Dec-2011  mrg file autoconf.h was added on branch jmcneill-usbmp on 2012-02-18 07:33:02 +0000
 1.2 10-Jun-2001  briggs Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file bat.h was added on branch thorpej_scsipi on 2001-02-11 19:11:43 +0000
 1.9 30-Sep-2015  phx Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
 1.8 11-Jan-2011  nisimura branches: 1.8.18; 1.8.34; 1.8.36;
add btinfo_modulelist for MODULAR component loading.
 1.7 20-May-2010  phx Netboot generates a BTINFO_PRODFAMILY boot-info which specifies the family
name of the board. The kernel uses this information to make a new sysctl
entry called machdep.prodfamily.
 1.6 18-May-2010  phx Recognize a network boot device by its PCI tag, even when it is not directly
attached to a PCI bus, but to a controller chip (e.g. sk(4) on skc(4)).
Extended BTINFO_NET to usa a PCI tag as well, now since it works.
 1.5 16-May-2010  phx Make netboot generate a BTINFO_NET bootinfo node for the Synology sk(4) NIC.
It will pass the MAC address, which is read from Flash ROM, into the kernel.
The kernel creates a "mac-address" device-property, which is used by sk(4),
when given, before reading the MAC from its EEPROM.
 1.4 17-Oct-2007  garbled branches: 1.4.20; 1.4.40; 1.4.42;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.3 11-Dec-2005  christos branches: 1.3.30; 1.3.38; 1.3.48; 1.3.50; 1.3.52; 1.3.54;
merge ktrace-lwp.
 1.2 24-Mar-2004  drochner branches: 1.2.16;
remove license clauses 3 and 4 from my cpoyright notices
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.26;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file bootinfo.h was added on branch thorpej_scsipi on 2001-02-11 19:11:44 +0000
 1.2.16.1 27-Oct-2007  yamt sync with head.
 1.3.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.3.52.1 18-Oct-2007  yamt sync with head.
 1.3.50.1 06-Nov-2007  matt sync with HEAD
 1.3.48.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.3.38.2 25-May-2007  nisimura - __HAVE_DEVICE_REGISTER.
- allow bootinfo to pass cookie value to determine rootdev. It's
a PCI tag encoded value (bus:dev:func) when netboot case.
- nuke some defunct comments whose origin can be traced back to the
age of VAX bus hose plumbering.
- should re-visit when diskboot is being made.
 1.3.38.1 08-May-2007  nisimura - have (restore, indeed) bootinfo capability with some extensions.
Would bring true ELF symbol table loading, machdep HW paramters,
console designation, and rootdev selection by device_register().
Compatiblity for non bootinfo-ware loader, like DINK32, is
maintained.
- prepare to have MPC8245 buildin serial console support.
- abandon NVGA > 0 configuration.
 1.3.30.1 23-Oct-2007  ad Sync with head.
 1.4.42.2 05-Mar-2011  rmind sync with head
 1.4.42.1 30-May-2010  rmind sync with head
 1.4.40.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.4.20.1 11-Aug-2010  yamt sync with head.
 1.8.36.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.8.34.1 16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.8.18.1 03-Dec-2017  jdolecek update from HEAD
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file bswap.h was added on branch thorpej_scsipi on 2001-02-11 19:11:44 +0000
 1.9 17-Dec-2011  phx Added NOR flash driver, using nor(4) and flash(4).
 1.8 17-Oct-2007  garbled branches: 1.8.54; 1.8.58;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.7 11-Dec-2005  christos branches: 1.7.30; 1.7.38; 1.7.48; 1.7.50; 1.7.52; 1.7.54;
merge ktrace-lwp.
 1.6 28-Jul-2003  scw branches: 1.6.16;
Make these build with recent tweaks to powerpc's bus_space(9) by moving
the inclusion of <powerpc/bus.h> to *after* the definitions of
PHYS_TO_BUS_MEM() and BUS_MEM_TO_PHYS().
 1.5 18-Mar-2003  matt branches: 1.5.2;
Switch/adapt to new bus space infrastructure.
 1.4 06-Mar-2003  matt Adapt to powerpc/bus.h changes.
 1.3 10-Jun-2001  briggs branches: 1.3.8;
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.2 07-Mar-2001  thorpej Add the BUS_DMA_STREAMING flag.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.1.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.1.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file bus.h was added on branch thorpej_scsipi on 2001-02-11 19:11:44 +0000
 1.3.8.2 10-Jun-2001  briggs Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.3.8.1 10-Jun-2001  briggs file bus.h was added on branch nathanw_sa on 2001-06-10 03:16:31 +0000
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.1 27-Oct-2007  yamt sync with head.
 1.7.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.7.52.1 18-Oct-2007  yamt sync with head.
 1.7.50.1 06-Nov-2007  matt sync with HEAD
 1.7.48.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.7.38.2 23-May-2007  nisimura - pci_machdep.c tries to fixup PCI stuff by identifying the target with
some heuristics.
- have eumb device nodes for bus.h and mainbus.c and machdep.c.
 1.7.38.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- __HAVE_GENERIC_SOFT_INTERRUPTS
- __HAVE_TIMEOUTER
- adapt powerpc/pic cascadable PIC dispatching scheme.
- import bus.h, intr.h and isa_machdep.h from prep.
- make openpicreg.h EPIC register locator somehow flexible.
 1.7.30.1 23-Oct-2007  ad Sync with head.
 1.8.58.1 18-Feb-2012  mrg merge to -current.
 1.8.54.1 17-Apr-2012  yamt sync with head
 1.1 01-Jul-2011  dyoung Per discussion at
<http://mail-index.netbsd.org/tech-kern/2010/04/02/msg007941.html>,
divide each machine's bus.h into bus_defs.h (constants & data types)
and bus_funcs.h (macro implementations of bus_space(9) routines and MD
prototypes).

Note that some bus_space(9) routines' implementation will move to .c
files from inline subroutines or macros in .h files.

I've only made the split for machine architectures where there is PCI.
All of the non-PCI-having architectures will require a similar split.

These #include files are not referenced by any (committed) Makefiles or
header files, yet. Changes to Makefiles, to <sys/bus.h>, and to some
more machine-dependent files will dribble in before I throw the switch.
 1.3 14-Jan-2012  phx New device nhpow(4) to support the onboard GPIO pins on a NH230/231 board for
buttons, powerdown, reset, LEDs and fan control. It attaches gpio(4) for
its 8 pins on demand.
 1.2 17-Dec-2011  phx Added NOR flash driver, using nor(4) and flash(4).
 1.1 01-Jul-2011  dyoung branches: 1.1.2; 1.1.6;
Per discussion at
<http://mail-index.netbsd.org/tech-kern/2010/04/02/msg007941.html>,
divide each machine's bus.h into bus_defs.h (constants & data types)
and bus_funcs.h (macro implementations of bus_space(9) routines and MD
prototypes).

Note that some bus_space(9) routines' implementation will move to .c
files from inline subroutines or macros in .h files.

I've only made the split for machine architectures where there is PCI.
All of the non-PCI-having architectures will require a similar split.

These #include files are not referenced by any (committed) Makefiles or
header files, yet. Changes to Makefiles, to <sys/bus.h>, and to some
more machine-dependent files will dribble in before I throw the switch.
 1.1.6.1 18-Feb-2012  mrg merge to -current.
 1.1.2.1 17-Apr-2012  yamt sync with head
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file cdefs.h was added on branch thorpej_scsipi on 2001-02-11 19:11:44 +0000
 1.5 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.4 19-Apr-2002  wiz branches: 1.4.2;
Remove unneeded cdev_decl(pms).
 1.3 27-Feb-2002  christos - define other DEV_ constants that the local port uses.
- delete cdev_decl(mm) since <sys/conf.h> does it.
 1.2 21-Mar-2001  lukem branches: 1.2.2; 1.2.8;
now that duplicated stuff has been moved to sys/conf.h, remove unnecessary
defs for: lpt, joy, pc
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file conf.h was added on branch thorpej_scsipi on 2001-02-11 19:11:45 +0000
 1.2.8.4 17-Sep-2002  nathanw Catch up to -current.
 1.2.8.3 20-Jun-2002  nathanw Catch up to -current.
 1.2.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.8.1 21-Mar-2001  nathanw file conf.h was added on branch nathanw_sa on 2002-02-28 04:11:32 +0000
 1.2.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.4.2.1 19-May-2002  gehenna Remove port-dependent conf.h.
 1.4 20-Jun-2011  matt Don't expose port-specific if _MODULE is defined.
Don't _MACHINE_CPU_H_, _<PORT>_CPU_H_
 1.3 26-Aug-2001  matt branches: 1.3.6; 1.3.160;
Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.2 30-May-2001  mrg branches: 1.2.2;
use _KERNEL_OPT
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 04-Feb-2001  bouyer file cpu.h was added on branch thorpej_scsipi on 2001-02-11 19:11:45 +0000
 1.2.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.160.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3.6.2 26-Aug-2001  matt Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.3.6.1 26-Aug-2001  matt file cpu.h was added on branch nathanw_sa on 2001-08-26 02:47:39 +0000
 1.1 05-Feb-2003  nakayama Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
 1.2 19-Oct-2003  matt Remove unused header.
Don't install kernel-only headers.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.26;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.26.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file cpufunc.h was added on branch thorpej_scsipi on 2001-02-11 19:11:45 +0000
 1.2 26-Apr-2011  joerg Remove Darwin, MACH and Mach-O support.
 1.1 08-Dec-2002  manu branches: 1.1.2; 1.1.136; 1.1.142;
A working fork/vfork implementation. Darwin fork differs from our fork by
two ways:
- the child gets its pid as retval[0] (userland stub will turn it into a 0),
retval[1] is 1 and it is 0 in the parent.
- in the child, the fork syscall is successful, hence we must skip the next
instruction.
 1.1.142.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.136.1 31-May-2011  rmind sync with head
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 08-Dec-2002  thorpej file darwin_machdep.h was added on branch nathanw_sa on 2002-12-11 06:11:49 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file db_machdep.h was added on branch thorpej_scsipi on 2001-02-11 19:11:45 +0000
 1.9 16-May-2013  christos Complete the dosparts -> mbrparts conversion. Only x86k new uses dosparts
because it also uses struct dos_partition.
 1.8 30-Aug-2011  bouyer branches: 1.8.2; 1.8.12;
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.7 23-Nov-2009  pooka If cpu_disklabel includes struct dkbad, define __HAVE_DISKLABEL_DKBAD.
This allows use of subr_disk_mbr on all archs. Default to it for
the rump disk component. No functional change for regular kernels.
(The other option would've been to include dkbad in disklabels
everywhere, but arguably this approach has less possible side-effects,
especially given that wedges and related magic will take over the
world any second now).
 1.6 11-Dec-2005  christos branches: 1.6.78;
merge ktrace-lwp.
 1.5 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.4 08-Oct-2003  lukem Overhaul MBR handling (part 1):

<sys/bootblock.h>:
* Added definitions for the Master Boot Record (MBR) used by
a variety of systems (primarily i386), including the format
of the BIOS Parameter Block (BPB).
This information was cribbed from a variety of sources
including <sys/disklabel_mbr.h> which this is a superset of.

As part of this, some data structure elements and #defines
were renamed to be more "namespace friendly" and consistent
with other bootblocks and MBR documentation.
Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
* Deprecated in favor of <sys/bootblock.h> (the latter is more
"host tool" friendly).

amd64 & i386:
* Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
be consistent with the naming convention of the msdosfs tools.

* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
and it's confusing to have two functionally equivalent bootblocks,
especially given that "ufs" has multiple meanings (it could be
a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

* Rework pbr.S (the first sector of bootxx_*):
+ Ensure that BPB (bytes 11..89) and the partition table
(bytes 446..509) do not contain code.
+ Add support for booting from FAT partitions if BOOT_FROM_FAT
is defined. (Only set for bootxx_msdos).
+ Remove "dummy" partition 3; if people want to installboot(8)
these to the start of the disk they can use fdisk(8) to
create a real MBR partition table...
+ Compile with TERSE_ERROR so it fits because of the above.
Whilst this is less user friendly, I feel it's important
to have a valid partition table and BPB in the MBR/PBR.

* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
with other platforms.

* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
we can boot off FAT partitions.

* Crank version of /usr/mdec/boot to 3.1, and fix some of the other
entries in the version file.

installboot(8) (i386):
* Read the existing MBR of the filesystem and retain the BIOS
Parameter Block (BPB) in bytes 11..89 and the MBR partition
table in bytes 446..509. (Previously installboot(8) would
trash those two sections of the MBR.)

mbrlabel(8):
* Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
 1.3 10-May-2003  thorpej branches: 1.3.2;
Remove redundant bounds_check_with_label() prototype.
 1.2 07-Dec-2001  briggs 16 partitions -- agree with files.sandpoint
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.6; 1.1.10;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.10.1 08-Jan-2002  nathanw Catch up to -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file disklabel.h was added on branch thorpej_scsipi on 2001-02-11 19:11:46 +0000
 1.3.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.78.1 11-Mar-2010  yamt sync with head
 1.8.12.1 23-Jun-2013  tls resync from head
 1.8.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file elf_machdep.h was added on branch thorpej_scsipi on 2001-02-11 19:11:46 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file endian.h was added on branch thorpej_scsipi on 2001-02-11 19:11:46 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file endian_machdep.h was added on branch thorpej_scsipi on 2001-02-11 19:11:46 +0000
 1.1 20-Dec-2015  christos branches: 1.1.2; 1.1.18;
new powerpc fenv.h
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 20-Dec-2015  jdolecek file fenv.h was added on branch tls-maxphys on 2017-12-03 11:36:40 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 20-Dec-2015  skrll file fenv.h was added on branch nick-nhusb on 2015-12-27 12:09:41 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file float.h was added on branch thorpej_scsipi on 2001-02-11 19:11:47 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file fpu.h was added on branch thorpej_scsipi on 2001-02-11 19:11:47 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file frame.h was added on branch thorpej_scsipi on 2001-02-11 19:11:47 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file ieee.h was added on branch thorpej_scsipi on 2001-02-11 19:11:47 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file ieeefp.h was added on branch thorpej_scsipi on 2001-02-11 19:11:48 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer constant macros.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
 1.1.12.1 14-Apr-2001  kleink file int_const.h was added on branch nathanw_sa on 2001-04-14 22:38:43 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_const.h was added on branch thorpej_scsipi on 2001-04-21 17:54:35 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_fmtio.h was added on branch nathanw_sa on 2001-04-15 17:13:17 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_fmtio.h was added on branch thorpej_scsipi on 2001-04-21 17:54:35 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_limits.h was added on branch nathanw_sa on 2001-04-15 15:29:12 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_limits.h was added on branch thorpej_scsipi on 2001-04-21 17:54:35 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 14-Apr-2001  kleink file int_mwgwtypes.h was added on branch nathanw_sa on 2001-04-14 12:20:01 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_mwgwtypes.h was added on branch thorpej_scsipi on 2001-04-21 17:54:35 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file int_types.h was added on branch thorpej_scsipi on 2001-02-11 19:11:48 +0000
 1.19 17-Jun-2011  matt intr.h must not include cpu due to deadly embrace with SOFTINT_COUNT.
Cleanup intr.h so MD definitions can overload common definitions.
Rototill pic/intr.c. Virtual IRQs can now be reclaimed. separate virq
from hwirq from picirq. Redo intr mask calculations.
tested on pmppc and macppc (MP).
 1.18 13-Nov-2010  uebayasi branches: 1.18.6;
sys/device.h is not suitable for such low-level definitions.
 1.17 24-Apr-2010  kiyohara Support 64-bit imask for powerpc/pic.
 1.16 28-Apr-2008  martin branches: 1.16.20; 1.16.22;
Remove clause 3 and 4 from TNF licenses
 1.15 11-Dec-2007  nisimura branches: 1.15.8; 1.15.10; 1.15.12;
- have machine/cpu.h and sys/device.h references here.
 1.14 27-Oct-2007  nisimura branches: 1.14.4; 1.14.6; 1.14.8;
- copy intr.h from prep and make mods.
- ANSI-fy pci_machdep.c
 1.13 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.12 16-Feb-2007  ad branches: 1.12.6; 1.12.14; 1.12.22; 1.12.24; 1.12.26; 1.12.28;
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.11 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.10 16-Feb-2006  perry branches: 1.10.14; 1.10.16;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.9 24-Dec-2005  perry branches: 1.9.2; 1.9.4; 1.9.6;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.8 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 03-Sep-2003  matt branches: 1.6.16;
Move CLKF_BASEPRI to machine specific <intr.h> file since it depends on
the encoding of the spl for the port.
 1.5 16-Jun-2003  thorpej branches: 1.5.2;
Rename IPL_IMP -> IPL_VM.
 1.4 05-Jul-2002  matt Peform a rototill over the powerpc-based ports.

Move the trap/vector initialization for MPC6xx ports to mpc6xx_machdep.c
Also move softnet, install_extintr, mapiodev, kvtop. Add common BAT
initialization code.

Add user Altivec support.

Fix calls to OF_call_method in macppc/macppc/machdep.c.

Use ci_fpuproc in cpu_info instead of separate fpuproc.

Add separate syscall.c and defined __HAVE_SYSCALL_INTERN.
 1.3 30-Aug-2001  briggs branches: 1.3.6; 1.3.10; 1.3.14;
- Change default time frequency to 100MHz from 66MHz.
- Support the serial mode interrupts (with a kernel configuration option)
on the Sandpoint X3.
- Initialize cpu_timebase.
- Enable tulip driver.
 1.2 13-Apr-2001  thorpej branches: 1.2.2;
Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file intr.h was added on branch thorpej_scsipi on 2001-02-11 19:11:48 +0000
 1.2.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.14.1 17-Jul-2002  gehenna catch up with -current.
 1.3.10.1 17-Mar-2002  thorpej IPL_IMP -> IPL_VM
 1.3.6.2 01-Aug-2002  nathanw Catch up to -current.
 1.3.6.1 30-Aug-2001  nathanw file intr.h was added on branch nathanw_sa on 2002-08-01 02:43:16 +0000
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.5 21-Jan-2008  yamt sync with head
 1.6.16.4 27-Oct-2007  yamt sync with head.
 1.6.16.3 26-Feb-2007  yamt sync with head.
 1.6.16.2 30-Dec-2006  yamt sync with head.
 1.6.16.1 21-Jun-2006  yamt sync with head.
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.9.2.1 18-Feb-2006  yamt sync with head.
 1.10.16.2 04-Nov-2006  yamt add IPL_STATCLOCK, IPL_SCHED, IPL_LOCK.
 1.10.16.1 04-Nov-2006  yamt implement splraiseipl/makeiplcookie for sandpoint.
 1.10.14.1 12-Jan-2007  ad Sync with head.
 1.12.28.2 13-Nov-2007  bouyer Sync with HEAD
 1.12.28.1 25-Oct-2007  bouyer Sync with HEAD.
 1.12.26.1 18-Oct-2007  yamt sync with head.
 1.12.24.2 09-Jan-2008  matt sync with HEAD
 1.12.24.1 06-Nov-2007  matt sync with HEAD
 1.12.22.2 28-Oct-2007  joerg Sync with HEAD.
 1.12.22.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.12.14.3 08-May-2007  garbled Make powerpc/intr.h more common than it previously was. Having done
that, delete all the duplicate entries from the 4 ports that have
converted to shared pic code. Also, commit a minor change to sandpoint
that I forgot to commit earlier (delete an unused variable)
 1.12.14.2 04-May-2007  nisimura - place a comment in machdep.c to tell interrupt number scheme.
- make EPIC register locator valid both for direct and serial mode irq.
- fix a typo (?) in openpicreg.h for OPENPIC_SERIAL_MODE case.
 1.12.14.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- __HAVE_GENERIC_SOFT_INTERRUPTS
- __HAVE_TIMEOUTER
- adapt powerpc/pic cascadable PIC dispatching scheme.
- import bus.h, intr.h and isa_machdep.h from prep.
- make openpicreg.h EPIC register locator somehow flexible.
 1.12.6.2 03-Dec-2007  ad Sync with HEAD.
 1.12.6.1 23-Oct-2007  ad Sync with head.
 1.14.8.1 13-Dec-2007  bouyer Sync with HEAD
 1.14.6.1 11-Dec-2007  yamt sync with head.
 1.14.4.1 26-Dec-2007  ad Sync with head.
 1.15.12.2 11-Aug-2010  yamt sync with head.
 1.15.12.1 16-May-2008  yamt sync with head.
 1.15.10.1 18-May-2008  yamt sync with head.
 1.15.8.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.22.2 05-Mar-2011  rmind sync with head
 1.16.22.1 30-May-2010  rmind sync with head
 1.16.20.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.18.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.2 15-Jul-2018  maxv Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.38; 1.1.216;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.216.1 10-Jun-2019  christos Sync with HEAD
 1.1.38.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file ipkdb.h was added on branch thorpej_scsipi on 2001-02-11 19:11:48 +0000
 1.10 18-Oct-2016  jdolecek add isa_intr_establish_xname() to MD isa headers so that it can be used
by MI drivers
 1.9 19-Aug-2009  dyoung branches: 1.9.22; 1.9.40; 1.9.44;
isa_detach_hook() needs two arguments, the first an isa_chipset_tag_t.
 1.8 19-Aug-2009  dyoung Define isa_detach_hook().
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 17-Oct-2007  garbled branches: 1.6.16; 1.6.18; 1.6.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.5 11-Dec-2005  christos branches: 1.5.30; 1.5.38; 1.5.48; 1.5.50; 1.5.52; 1.5.54;
merge ktrace-lwp.
 1.4 07-Aug-2003  agc branches: 1.4.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.3 09-May-2003  fvdl branches: 1.3.2;
A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.
 1.2 10-Jun-2001  briggs branches: 1.2.8;
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 04-Feb-2001  bouyer file isa_machdep.h was added on branch thorpej_scsipi on 2001-02-11 19:11:49 +0000
 1.2.8.2 10-Jun-2001  briggs Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.2.8.1 10-Jun-2001  briggs file isa_machdep.h was added on branch nathanw_sa on 2001-06-10 03:16:31 +0000
 1.3.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.1 27-Oct-2007  yamt sync with head.
 1.5.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.5.52.1 18-Oct-2007  yamt sync with head.
 1.5.50.1 06-Nov-2007  matt sync with HEAD
 1.5.48.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.5.38.2 07-May-2007  garbled Adapt sandpoint to the changes made to the shared powerpc isa_machdep stuff.
 1.5.38.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- __HAVE_GENERIC_SOFT_INTERRUPTS
- __HAVE_TIMEOUTER
- adapt powerpc/pic cascadable PIC dispatching scheme.
- import bus.h, intr.h and isa_machdep.h from prep.
- make openpicreg.h EPIC register locator somehow flexible.
 1.5.30.1 23-Oct-2007  ad Sync with head.
 1.6.20.2 19-Aug-2009  yamt sync with head.
 1.6.20.1 16-May-2008  yamt sync with head.
 1.6.18.1 18-May-2008  yamt sync with head.
 1.6.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.44.1 04-Nov-2016  pgoyette Sync with HEAD
 1.9.40.1 05-Dec-2016  skrll Sync with HEAD
 1.9.22.1 03-Dec-2017  jdolecek update from HEAD
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.128; 1.1.130; 1.1.132;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.132.1 16-May-2008  yamt sync with head.
 1.1.130.1 18-May-2008  yamt sync with head.
 1.1.128.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file isapnp_machdep.h was added on branch thorpej_scsipi on 2001-02-11 19:11:49 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file kcore.h was added on branch thorpej_scsipi on 2001-02-11 19:11:50 +0000
 1.3 16-Feb-2006  perry Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.2 24-Dec-2005  perry branches: 1.2.2; 1.2.4; 1.2.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file kgdb.h was added on branch thorpej_scsipi on 2001-02-11 19:11:50 +0000
 1.2.6.1 22-Apr-2006  simonb Sync with head.
 1.2.4.1 09-Sep-2006  rpaulo sync with head
 1.2.2.1 18-Feb-2006  yamt sync with head.
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file limits.h was added on branch thorpej_scsipi on 2001-02-11 19:11:51 +0000
 1.5 06-Aug-2014  joerg Consistently define WARN in a way that passes format string checks, i.e.
always uses the same number of arguments as given in the format string.
 1.4 28-Apr-2008  martin branches: 1.4.44; 1.4.60;
Remove clause 3 and 4 from TNF licenses
 1.3 25-Jan-2006  christos branches: 1.3.72; 1.3.74; 1.3.76;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.2 31-Oct-2001  thorpej branches: 1.2.2; 1.2.34; 1.2.46;
Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.6; 1.1.8;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.8.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file loadfile_machdep.h was added on branch thorpej_scsipi on 2001-02-11 19:11:51 +0000
 1.2.46.1 01-Feb-2006  yamt sync with head.
 1.2.34.1 21-Jun-2006  yamt sync with head.
 1.2.2.2 31-Oct-2001  thorpej Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.2.2.1 31-Oct-2001  thorpej file loadfile_machdep.h was added on branch nathanw_sa on 2001-10-31 17:20:49 +0000
 1.3.76.1 16-May-2008  yamt sync with head.
 1.3.74.1 18-May-2008  yamt sync with head.
 1.3.72.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.60.1 10-Aug-2014  tls Rebase.
 1.4.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file lock.h was added on branch thorpej_scsipi on 2001-02-11 19:11:51 +0000
 1.1 30-Nov-2024  christos branches: 1.1.4;
Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 30-Nov-2024  perseant file lwp_private.h was added on branch perseant-exfatfs on 2025-08-02 05:56:06 +0000
 1.2 03-May-2001  soren PPC machine type tags haven't been used for a while.
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file machine_type.h was added on branch thorpej_scsipi on 2001-02-11 19:11:52 +0000
 1.2 26-Apr-2011  joerg Remove Darwin, MACH and Mach-O support.
 1.1 30-Oct-2002  matt branches: 1.1.2; 1.1.136; 1.1.142;
Add missing file.
 1.1.142.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.136.1 31-May-2011  rmind sync with head
 1.1.2.2 11-Nov-2002  nathanw Catch up to -current
 1.1.2.1 30-Oct-2002  nathanw file macho_machdep.h was added on branch nathanw_sa on 2002-11-11 22:03:09 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file math.h was added on branch thorpej_scsipi on 2001-02-11 19:11:52 +0000
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 05-Nov-2001  briggs branches: 1.1.2;
file mcontext.h was initially added on branch nathanw_sa.
 1.1.2.1 05-Nov-2001  briggs Initial SA support for ppc. Test-booted on sandpoint, macppc, & walnut.
mcontext and cpu_getmcontext()/cpu_setmcontext() from Klaus Klein
<kleink@netbsd.org>.
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file mutex.h was initially added on branch newlock2.
 1.1.2.2 28-Jan-2007  ad powerpc changes.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file mutex.h was added on branch yamt-lazymbuf on 2007-02-26 09:08:00 +0000
 1.5 19-Aug-2009  nisimura - use options PIC_MPCSOC to replace PIC_OPENPIC.
 1.4 17-Oct-2007  garbled branches: 1.4.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.3 30-Aug-2001  briggs branches: 1.3.6; 1.3.38; 1.3.80; 1.3.88; 1.3.98; 1.3.100; 1.3.102; 1.3.104;
- Change default time frequency to 100MHz from 66MHz.
- Support the serial mode interrupts (with a kernel configuration option)
on the Sandpoint X3.
- Initialize cpu_timebase.
- Enable tulip driver.
 1.2 05-Feb-2001  briggs branches: 1.2.2; 1.2.6;
Tsubai has convinced me that openpic_init() should remain machine-dependant
as the details might differ between archs, and passing the various options
leads to some clutter.
 1.1 04-Feb-2001  briggs Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.2.6.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 05-Feb-2001  bouyer file openpicreg.h was added on branch thorpej_scsipi on 2001-02-11 19:11:53 +0000
 1.3.104.1 25-Oct-2007  bouyer Sync with HEAD.
 1.3.102.1 18-Oct-2007  yamt sync with head.
 1.3.100.1 06-Nov-2007  matt sync with HEAD
 1.3.98.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.3.88.3 04-May-2007  nisimura - make machine/openpicreg.h free from brd specific IRQ assignment.
Need to invent the concise way to specify brd definitions.
- compensate the change above by adding lines to pci/pci_machdep.c
- intr_establish() needs +16 offset to register PCI interrupts.
 1.3.88.2 04-May-2007  nisimura - place a comment in machdep.c to tell interrupt number scheme.
- make EPIC register locator valid both for direct and serial mode irq.
- fix a typo (?) in openpicreg.h for OPENPIC_SERIAL_MODE case.
 1.3.88.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- __HAVE_GENERIC_SOFT_INTERRUPTS
- __HAVE_TIMEOUTER
- adapt powerpc/pic cascadable PIC dispatching scheme.
- import bus.h, intr.h and isa_machdep.h from prep.
- make openpicreg.h EPIC register locator somehow flexible.
 1.3.80.1 23-Oct-2007  ad Sync with head.
 1.3.38.1 27-Oct-2007  yamt sync with head.
 1.3.6.2 30-Aug-2001  briggs - Change default time frequency to 100MHz from 66MHz.
- Support the serial mode interrupts (with a kernel configuration option)
on the Sandpoint X3.
- Initialize cpu_timebase.
- Enable tulip driver.
 1.3.6.1 30-Aug-2001  briggs file openpicreg.h was added on branch nathanw_sa on 2001-08-30 02:08:44 +0000
 1.4.20.1 19-Aug-2009  yamt sync with head.
 1.5 20-Jun-2011  matt Cleanup powerpc param.h. If compiling a MODULE, ignore port-specific stuff.
Only include <machine/cpu.h> in <powerpc/param.h> at the end.
 1.4 21-Jun-2001  briggs branches: 1.4.8; 1.4.162;
Build with and without option NEWPMAP.
 1.3 10-Jun-2001  briggs Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.2 30-May-2001  mrg use _KERNEL_OPT
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 04-Feb-2001  bouyer file param.h was added on branch thorpej_scsipi on 2001-02-11 19:11:53 +0000
 1.4.162.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.4.8.2 21-Jun-2001  briggs Build with and without option NEWPMAP.
 1.4.8.1 21-Jun-2001  briggs file param.h was added on branch nathanw_sa on 2001-06-21 16:30:06 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file pcb.h was added on branch thorpej_scsipi on 2001-02-11 19:11:54 +0000
 1.10 19-Oct-2016  nonaka Added MSI/MSI-X and interrupt_distribute(9) support for powerpc.
 1.9 29-Mar-2014  christos branches: 1.9.6; 1.9.10;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.8 18-Jun-2011  matt branches: 1.8.2; 1.8.12; 1.8.16;
struct device * -> device_t
struct cfdata * -> cfdata_t
use device accessors, use device_private.
some softc/device_t splits (macppc needs a bunch more)
aprint*_dev used considerably more
 1.7 04-Apr-2011  dyoung branches: 1.7.2;
Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
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
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.6 17-Oct-2007  garbled branches: 1.6.42; 1.6.48;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.5 11-Dec-2005  christos branches: 1.5.30; 1.5.38; 1.5.48; 1.5.50; 1.5.52; 1.5.54;
merge ktrace-lwp.
 1.4 29-Jul-2004  drochner branches: 1.4.12;
remove now unnecessary "pci_enumerate_bus" definitions
 1.3 15-May-2002  thorpej branches: 1.3.10;
Let machine-dependent code specify how to enumerate the bus.
Currently, everyone uses pci_enumerate_bus_generic().
 1.2 10-Jun-2001  briggs branches: 1.2.2; 1.2.8;
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 04-Feb-2001  bouyer file pci_machdep.h was added on branch thorpej_scsipi on 2001-02-11 19:11:55 +0000
 1.2.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.2.8.1 10-Jun-2001  nathanw file pci_machdep.h was added on branch nathanw_sa on 2002-06-20 03:40:44 +0000
 1.2.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.10.1 03-Aug-2004  skrll Sync with HEAD
 1.4.12.1 27-Oct-2007  yamt sync with head.
 1.5.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.5.52.1 18-Oct-2007  yamt sync with head.
 1.5.50.1 06-Nov-2007  matt sync with HEAD
 1.5.48.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.5.38.1 11-Jun-2007  nisimura - __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH.
- add pciide_machdep.c for compatibility mode IDE controller.
 1.5.30.1 23-Oct-2007  ad Sync with head.
 1.6.48.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.42.1 21-Apr-2011  rmind sync with head
 1.7.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.8.16.1 18-May-2014  rmind sync with head
 1.8.12.2 03-Dec-2017  jdolecek update from HEAD
 1.8.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.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.9.10.1 04-Nov-2016  pgoyette Sync with HEAD
 1.9.6.1 05-Dec-2016  skrll Sync with HEAD
 1.2 05-Feb-2001  briggs branches: 1.2.2;
Share a single pio.h instead of having 4 nearly-identical copies.
 1.1 04-Feb-2001  briggs Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 05-Feb-2001  bouyer file pio.h was added on branch thorpej_scsipi on 2001-02-11 19:11:55 +0000
 1.7 14-Feb-2008  he Don't include <powerpc/oea/pmap.h>, use <powerpc/pmap.h> instead.
Discussed with garbled@, fixes build problem for LKMs.
 1.6 03-Feb-2003  matt branches: 1.6.18; 1.6.80; 1.6.86;
Rename PPC_MPC6XX to PPC_OEA (and any mpc6xx reference to oea).
 1.5 03-Feb-2003  matt More cleanup for OLDPMAP.
 1.4 09-Mar-2002  chs switch all mpc6xx powerpc ports to NEWPMAP by default.
the old pmap is still available with the OLDPMAP option.
 1.3 21-Jun-2001  briggs branches: 1.3.2; 1.3.8;
Build with and without option NEWPMAP.
 1.2 10-Jun-2001  briggs Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 04-Feb-2001  bouyer file pmap.h was added on branch thorpej_scsipi on 2001-02-11 19:11:55 +0000
 1.3.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.8.1 21-Jun-2001  nathanw file pmap.h was added on branch nathanw_sa on 2002-04-01 07:42:15 +0000
 1.3.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.6.86.1 18-Feb-2008  mjf Sync with HEAD.
 1.6.80.1 23-Mar-2008  matt sync with HEAD
 1.6.18.1 27-Feb-2008  yamt sync with head.
 1.2 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

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

* Removes the PMC code of ARM XSCALE.

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

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

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

* Removes the pmc_evid_t and pmc_ctr_t types.

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

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.1.204.1 10-Jun-2019  christos Sync with HEAD
 1.1.202.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 07-Aug-2002  jdolecek file pmc.h was added on branch kqueue on 2002-09-06 08:39:39 +0000
 1.1.4.2 31-Aug-2002  gehenna catch up with -current.
 1.1.4.1 07-Aug-2002  gehenna file pmc.h was added on branch gehenna-devsw on 2002-08-31 13:45:51 +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:48 +0000
 1.4 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.3 11-Dec-2005  christos branches: 1.3.78; 1.3.86; 1.3.92;
merge ktrace-lwp.
 1.2 23-Oct-2004  thorpej Centralize the declaration of booted_device and booted_partition.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.26;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.26.1 02-Nov-2004  skrll Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file powerpc.h was added on branch thorpej_scsipi on 2001-02-11 19:11:56 +0000
 1.3.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.78.1 04-May-2009  yamt sync with head.
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file proc.h was added on branch thorpej_scsipi on 2001-02-11 19:11:56 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file profile.h was added on branch thorpej_scsipi on 2001-02-11 19:11:56 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file psl.h was added on branch thorpej_scsipi on 2001-02-11 19:11:57 +0000
 1.3 21-Jun-2001  briggs branches: 1.3.8;
Bring back pte.h for non-NEWPMAP builds.
 1.2 10-Jun-2001  briggs Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file pte.h was added on branch thorpej_scsipi on 2001-02-11 19:11:57 +0000
 1.3.8.2 21-Jun-2001  briggs Bring back pte.h for non-NEWPMAP builds.
 1.3.8.1 21-Jun-2001  briggs file pte.h was added on branch nathanw_sa on 2001-06-21 16:28:52 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file ptrace.h was added on branch thorpej_scsipi on 2001-02-11 19:11:57 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file reg.h was added on branch thorpej_scsipi on 2001-02-11 19:11:57 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file reloc.h was added on branch thorpej_scsipi on 2001-02-11 19:11:58 +0000
 1.2 05-Feb-2003  nakayama Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file rnd.h was added on branch thorpej_scsipi on 2001-02-11 19:11:58 +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.2 28-Jan-2007  ad powerpc changes.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file rwlock.h was added on branch yamt-lazymbuf on 2007-02-26 09:08:00 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file setjmp.h was added on branch thorpej_scsipi on 2001-02-11 19:11:58 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file signal.h was added on branch thorpej_scsipi on 2001-02-11 19:11:58 +0000
 1.1 23-Jul-2014  alnsn branches: 1.1.2; 1.1.6;
Rename sljitarch.h to sljit_machdep.h.
 1.1.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 23-Jul-2014  tls file sljit_machdep.h was added on branch tls-maxphys on 2014-08-20 00:03:21 +0000
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 23-Jul-2014  tls file sljit_machdep.h was added on branch tls-earlyentropy on 2014-08-10 06:54:06 +0000
 1.2 23-Jul-2014  alnsn Rename sljitarch.h to sljit_machdep.h.
 1.1 17-Nov-2013  alnsn branches: 1.1.2; 1.1.4; 1.1.6;
Enable sljit and bpfjit on powerpc.
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 17-Nov-2013  yamt file sljitarch.h was added on branch yamt-pagecache on 2014-05-22 11:40:06 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 17-Nov-2013  rmind file sljitarch.h was added on branch rmind-smpnet on 2014-05-18 17:45:23 +0000
 1.1.2.1 10-Aug-2014  tls Rebase.
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file spkr.h was added on branch thorpej_scsipi on 2001-02-11 19:11:59 +0000
 1.5 02-Mar-2010  matt Add missing <powerpc/FOO/spr.h> to a few files missed on the first pass.
Don't export <machine/spr.h> to userland, only <powerpc/spr.h>
 1.4 11-Dec-2005  christos branches: 1.4.78; 1.4.92; 1.4.98;
merge ktrace-lwp.
 1.3 17-Feb-2005  briggs branches: 1.3.2;
Install spr.h
 1.2 02-Mar-2004  kleink branches: 1.2.2; 1.2.4;
Pull in SPRs via <powerpc/spr.h> in this single instance, and dispose of
<machine/spr.h> again.
 1.1 30-Dec-2003  manu Fix PowerPC ports build with KGDB.
 1.2.4.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.2.2.1 29-Apr-2005  kent sync with -current
 1.3.2.2 17-Feb-2005  skrll Sync with HEAD.
 1.3.2.1 17-Feb-2005  skrll file spr.h was added on branch ktrace-lwp on 2005-02-17 07:10:37 +0000
 1.4.98.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.4.92.1 24-Oct-2010  jym Sync with HEAD
 1.4.78.1 11-Mar-2010  yamt 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 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file stdarg.h was added on branch thorpej_scsipi on 2001-02-11 19:11:59 +0000
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file trap.h was added on branch thorpej_scsipi on 2001-02-11 19:11:59 +0000
 1.10 15-Apr-2021  rin sandpoint has its own module_init_md(). So, do not compile in
that function in powerpc_machdep.c.
 1.9 01-Apr-2021  simonb Whitespace: #define<tab>
 1.8 17-Jul-2011  dyoung branches: 1.8.66; 1.8.68;
Switch more PowerPC ports having PCI support to new-style <sys/bus.h>.
 1.7 17-Jul-2010  tsutsui Remove obsolete __HAVE_GENERIC_SOFT_INTERRUPTS,
which is mandatory since 2007/07:
http://mail-index.NetBSD.org/source-changes/2007/07/14/0039.html
 1.6 20-Jan-2008  joerg branches: 1.6.10; 1.6.30; 1.6.32;
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.5 17-Oct-2007  garbled branches: 1.5.2; 1.5.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.4 15-Sep-2006  gdamore branches: 1.4.10; 1.4.18; 1.4.28; 1.4.30; 1.4.32; 1.4.34;
Convert sandpoint to GENERIC todr, including breaking of the clock handling
out into its own driver. (NB: mcclock should really, really be an MI driver
to avoid this kind of pasteware, but it is "nontrivial" to cope with the
fact that some machines have different ideas of mcclock.)
 1.3 03-Sep-2006  bjh21 branches: 1.3.2;
Nothing in the kernel now tests __HAVE_NWSCONS, so stop defining it everywhere.
 1.2 28-Feb-2002  simonb branches: 1.2.32; 1.2.46; 1.2.50;
Use "#define<tab>".
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.6; 1.1.10;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.10.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 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 04-Feb-2001  bouyer file types.h was added on branch thorpej_scsipi on 2001-02-11 19:11:59 +0000
 1.2.50.1 14-Sep-2006  yamt sync with head.
 1.2.46.1 09-Sep-2006  rpaulo sync with head
 1.2.32.3 21-Jan-2008  yamt sync with head
 1.2.32.2 27-Oct-2007  yamt sync with head.
 1.2.32.1 30-Dec-2006  yamt sync with head.
 1.3.2.1 18-Nov-2006  ad Sync with head.
 1.4.34.1 25-Oct-2007  bouyer Sync with HEAD.
 1.4.32.1 18-Oct-2007  yamt sync with head.
 1.4.30.2 23-Mar-2008  matt sync with HEAD
 1.4.30.1 06-Nov-2007  matt sync with HEAD
 1.4.28.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.4.18.2 25-May-2007  nisimura - __HAVE_DEVICE_REGISTER.
- allow bootinfo to pass cookie value to determine rootdev. It's
a PCI tag encoded value (bus:dev:func) when netboot case.
- nuke some defunct comments whose origin can be traced back to the
age of VAX bus hose plumbering.
- should re-visit when diskboot is being made.
 1.4.18.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- __HAVE_GENERIC_SOFT_INTERRUPTS
- __HAVE_TIMEOUTER
- adapt powerpc/pic cascadable PIC dispatching scheme.
- import bus.h, intr.h and isa_machdep.h from prep.
- make openpicreg.h EPIC register locator somehow flexible.
 1.4.10.1 23-Oct-2007  ad Sync with head.
 1.5.8.1 23-Jan-2008  bouyer Sync with HEAD.
 1.5.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.6.32.1 05-Mar-2011  rmind sync with head
 1.6.30.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.6.10.1 11-Aug-2010  yamt sync with head.
 1.8.68.2 17-Apr-2021  thorpej Sync with HEAD.
 1.8.68.1 03-Apr-2021  thorpej Sync with HEAD.
 1.8.66.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 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file varargs.h was added on branch thorpej_scsipi on 2001-02-11 19:12:00 +0000
 1.12 20-Jun-2011  matt Don't export USER_SR if _MODULE is defined.
Add a common <powerpc/vmparam.h> like we have for <powerpc/pmap.h>
 1.11 03-Feb-2003  matt branches: 1.11.140;
Rename PPC_MPC6XX to PPC_OEA (and any mpc6xx reference to oea).
 1.10 02-Feb-2003  matt Remove OLDPMAP support.
 1.9 10-Dec-2002  thorpej Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
 1.8 09-Mar-2002  chs switch all mpc6xx powerpc ports to NEWPMAP by default.
the old pmap is still available with the OLDPMAP option.
 1.7 15-Nov-2001  soren MAXSLP is defined to be a machine-independent scheduling parameter,
so move it into sys/param.h.
 1.6 21-Jun-2001  briggs branches: 1.6.2; 1.6.8;
Build with and without option NEWPMAP.
 1.5 10-Jun-2001  briggs Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.4 01-May-2001  thorpej Per discussion w/ chuck and chuck, restructure the md page stuff
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
 1.3 29-Apr-2001  thorpej Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure. Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM. These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

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

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now). Changes to other pmap
modules will follow.
 1.2 06-Mar-2001  briggs Update the defaults of MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ to those used
in macppc.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.1.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.1.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file vmparam.h was added on branch thorpej_scsipi on 2001-02-11 19:12:00 +0000
 1.6.8.4 11-Dec-2002  thorpej Sync with HEAD.
 1.6.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.6.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.6.8.1 21-Jun-2001  nathanw file vmparam.h was added on branch nathanw_sa on 2002-01-08 00:27:23 +0000
 1.6.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.6.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.140.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 08-May-2004  kleink branches: 1.1.2;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 08-May-2004  skrll file wchar_limits.h was added on branch ktrace-lwp on 2004-08-03 10:39:55 +0000
 1.4 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.3 11-Dec-2005  christos branches: 1.3.30; 1.3.38; 1.3.48; 1.3.50; 1.3.52; 1.3.54;
merge ktrace-lwp.
 1.2 07-Aug-2003  agc branches: 1.2.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.26;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file icu.h was added on branch thorpej_scsipi on 2001-02-11 19:12:00 +0000
 1.2.16.1 27-Oct-2007  yamt sync with head.
 1.3.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.3.52.1 18-Oct-2007  yamt sync with head.
 1.3.50.1 06-Nov-2007  matt sync with HEAD
 1.3.48.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.3.38.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- get rid of files obsoluted by common powerpc files.
 1.3.30.1 23-Oct-2007  ad Sync with head.
 1.9 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.8 11-Dec-2005  christos branches: 1.8.30; 1.8.38; 1.8.48; 1.8.50; 1.8.52; 1.8.54;
merge ktrace-lwp.
 1.7 02-Jun-2005  he branches: 1.7.2;
Fix variable shadowing and adapt to -Wconst-qual.
 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 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 30-Aug-2001  briggs branches: 1.4.6; 1.4.22;
- Change default time frequency to 100MHz from 66MHz.
- Support the serial mode interrupts (with a kernel configuration option)
on the Sandpoint X3.
- Initialize cpu_timebase.
- Enable tulip driver.
 1.3 08-Feb-2001  briggs branches: 1.3.2; 1.3.6;
Keyboard, mouse, ws*
 1.2 08-Feb-2001  briggs Enable devices on the SuperIO chip.
 1.1 04-Feb-2001  briggs Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.3.6.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.3.2.1 08-Feb-2001  bouyer file isa_machdep.c was added on branch thorpej_scsipi on 2001-02-11 19:12:01 +0000
 1.4.22.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.22.1 03-Aug-2004  skrll Sync with HEAD
 1.4.6.2 30-Aug-2001  briggs - Change default time frequency to 100MHz from 66MHz.
- Support the serial mode interrupts (with a kernel configuration option)
on the Sandpoint X3.
- Initialize cpu_timebase.
- Enable tulip driver.
 1.4.6.1 30-Aug-2001  briggs file isa_machdep.c was added on branch nathanw_sa on 2001-08-30 02:08:45 +0000
 1.7.2.1 27-Oct-2007  yamt sync with head.
 1.8.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.8.52.1 18-Oct-2007  yamt sync with head.
 1.8.50.1 06-Nov-2007  matt sync with HEAD
 1.8.48.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.8.38.2 07-May-2007  garbled Adapt sandpoint to the changes made to the shared powerpc isa_machdep stuff.
 1.8.38.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- use common powerpc isa_machdep_common.c and isadma_machdep.c
- isa_machdep.c holds an empty isa_intr_alloc() call as sandpoint
has no ISA/PCMCIA slot to house devices.
 1.8.30.1 23-Oct-2007  ad Sync with head.
 1.14 07-Feb-2014  phx Replaced enable/disable_intr by splhigh/splx.
 1.13 14-Mar-2009  dsl branches: 1.13.12; 1.13.22; 1.13.26;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.12 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.11 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.10 17-Oct-2007  garbled branches: 1.10.20; 1.10.28; 1.10.34;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.9 09-Jul-2007  ad branches: 1.9.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.8 15-Sep-2006  gdamore branches: 1.8.10; 1.8.12; 1.8.18;
Convert sandpoint to GENERIC todr, including breaking of the clock handling
out into its own driver. (NB: mcclock should really, really be an MI driver
to avoid this kind of pasteware, but it is "nontrivial" to cope with the
fact that some machines have different ideas of mcclock.)
 1.7 24-Dec-2005  perry branches: 1.7.20;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 02-Jun-2005  he branches: 1.5.2;
Fix variable shadowing and adapt to -Wconst-qual.
 1.4 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 22-Jul-2001  wiz branches: 1.2.6; 1.2.22;
bcopy -> memcpy, bzero -> memset
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.6;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.6.1 03-Aug-2001  lukem update to -current
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file isaclock.c was added on branch thorpej_scsipi on 2001-02-11 19:12:01 +0000
 1.2.22.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.22.1 03-Aug-2004  skrll Sync with HEAD
 1.2.6.2 22-Jul-2001  wiz bcopy -> memcpy, bzero -> memset
 1.2.6.1 22-Jul-2001  wiz file isaclock.c was added on branch nathanw_sa on 2001-07-22 15:04:01 +0000
 1.5.2.3 03-Sep-2007  yamt sync with head.
 1.5.2.2 30-Dec-2006  yamt sync with head.
 1.5.2.1 21-Jun-2006  yamt sync with head.
 1.7.20.1 18-Nov-2006  ad Sync with head.
 1.8.18.1 03-Oct-2007  garbled Sync with HEAD
 1.8.12.1 11-Jul-2007  mjf Sync with head.
 1.8.10.1 15-Jul-2007  ad Sync with head.
 1.9.10.1 06-Nov-2007  matt sync with HEAD
 1.10.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.10.20.1 04-May-2009  yamt sync with head.
 1.13.26.1 18-May-2014  rmind sync with head
 1.13.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.12.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.10 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.9 09-Mar-2007  he branches: 1.9.2; 1.9.10; 1.9.18; 1.9.20; 1.9.22; 1.9.24;
Use char* with mtod() when doing pointer arithmetic on the result.
 1.8 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.7 11-Dec-2005  christos branches: 1.7.26;
merge ktrace-lwp.
 1.6 15-Jul-2003  lukem branches: 1.6.16;
__KERNEL_RCSID()
 1.5 05-May-2003  fvdl branches: 1.5.2;
Move definition of ISA_DMA_BOUNCE_THRESHOLD to dev/isa/isareg.h.
 1.4 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.3 22-Jul-2001  wiz branches: 1.3.6;
bcopy -> memcpy, bzero -> memset
 1.2 10-Jun-2001  briggs branches: 1.2.2;
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 04-Feb-2001  bouyer file isadma_machdep.c was added on branch thorpej_scsipi on 2001-02-11 19:12:01 +0000
 1.2.2.1 03-Aug-2001  lukem update to -current
 1.3.6.2 22-Jul-2001  wiz bcopy -> memcpy, bzero -> memset
 1.3.6.1 22-Jul-2001  wiz file isadma_machdep.c was added on branch nathanw_sa on 2001-07-22 15:04:01 +0000
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.2 27-Oct-2007  yamt sync with head.
 1.6.16.1 03-Sep-2007  yamt sync with head.
 1.7.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.9.24.1 25-Oct-2007  bouyer Sync with HEAD.
 1.9.22.1 18-Oct-2007  yamt sync with head.
 1.9.20.1 06-Nov-2007  matt sync with HEAD
 1.9.18.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.9.10.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- get rid of files obsoluted by common powerpc files.
 1.9.2.1 23-Oct-2007  ad Sync with head.
 1.2 08-Feb-2001  briggs We really don't want isapnp.
 1.1 04-Feb-2001  briggs Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.6 20-Jun-2014  phx mc146818's sc_flag indicates the time is stored in binary format, not BCD.
So we should configure the chip's REGB for binary format as well.
This makes the BeBox RTC finally work reliable for me.
 1.5 01-Jul-2011  dyoung branches: 1.5.12; 1.5.26;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 29-Mar-2008  tsutsui Don't forget to initialize sc_dev.
 1.3 28-Mar-2008  tsutsui Split device_t and softc for MI mc146818 clock,
and other related misc cosmetics.
 1.2 10-Jan-2008  tsutsui branches: 1.2.6;
Move todr_attach(9) calls from each MD attachment to MI mc146818_attach().
 1.1 15-Sep-2006  gdamore branches: 1.1.4; 1.1.8; 1.1.34; 1.1.40; 1.1.48;
Convert sandpoint to GENERIC todr, including breaking of the clock handling
out into its own driver. (NB: mcclock should really, really be an MI driver
to avoid this kind of pasteware, but it is "nontrivial" to cope with the
fact that some machines have different ideas of mcclock.)
 1.1.48.1 10-Jan-2008  bouyer Sync with HEAD
 1.1.40.1 18-Feb-2008  mjf Sync with HEAD.
 1.1.34.1 23-Mar-2008  matt sync with HEAD
 1.1.8.3 21-Jan-2008  yamt sync with head
 1.1.8.2 30-Dec-2006  yamt sync with head.
 1.1.8.1 15-Sep-2006  yamt file mcclock_isa.c was added on branch yamt-lazymbuf on 2006-12-30 20:46:50 +0000
 1.1.4.2 18-Nov-2006  ad Sync with head.
 1.1.4.1 15-Sep-2006  ad file mcclock_isa.c was added on branch newlock2 on 2006-11-18 21:29:30 +0000
 1.2.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.5.26.1 10-Aug-2014  tls Rebase.
 1.5.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.26;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file nvram.h was added on branch thorpej_scsipi on 2001-02-11 19:12:01 +0000
 1.3 04-May-2002  briggs Remove unreferenced file.
 1.2 18-Apr-2001  thorpej branches: 1.2.2; 1.2.4; 1.2.8;
ctype-like functions are in libkern now.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file spkr.c was added on branch thorpej_scsipi on 2001-02-11 19:12:01 +0000
 1.2.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.2.8.1 18-Apr-2001  nathanw file spkr.c was added on branch nathanw_sa on 2002-06-20 03:40:44 +0000
 1.2.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.2.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file spkrreg.h was added on branch thorpej_scsipi on 2001-02-11 19:12:02 +0000
 1.10 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.9 11-Dec-2005  christos branches: 1.9.30; 1.9.38; 1.9.48; 1.9.50; 1.9.52; 1.9.54;
merge ktrace-lwp.
 1.8 29-Jul-2004  drochner branches: 1.8.12;
remove some typecasts to "cfmatch_t" which are obviously relicts from
__BROKEN_INDIRECT_CONFIG times
 1.7 23-Apr-2004  itojun pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Add trailing ; to CFATTACH_DECL.
 1.4 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 14-Dec-2001  briggs Match MPC107, too.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.6; 1.1.10;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.10.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.1 08-Jan-2002  nathanw Catch up to -current.
 1.1.6.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file pchb.c was added on branch thorpej_scsipi on 2001-02-11 19:12:02 +0000
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.12.1 27-Oct-2007  yamt sync with head.
 1.9.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.9.52.1 18-Oct-2007  yamt sync with head.
 1.9.50.1 06-Nov-2007  matt sync with HEAD
 1.9.48.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.9.38.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- get rid of files obsoluted by common powerpc files.
 1.9.30.1 23-Oct-2007  ad Sync with head.
 1.38 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.37 01-Jun-2017  chs remove checks for failure after memory allocation calls that cannot fail:

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

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.36 26-Nov-2016  nonaka PCI MSI/MSI-X manipulation stub functions are not provided as weak alias.
 1.35 19-Oct-2016  nonaka Added MSI/MSI-X and interrupt_distribute(9) support for powerpc.
 1.34 02-Oct-2015  msaitoh branches: 1.34.2;
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.33 29-Mar-2014  christos branches: 1.33.6;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.32 26-Mar-2014  christos fix sprintf.
 1.31 28-Dec-2011  phx branches: 1.31.6; 1.31.10;
Add a workaround for the VT6410 IDE controller on the Iomega Storcenter.
Its interrupt cannot be disabled and remains asserted during the whole
device probing procedure, causing an interrupt storm.
This was fixed by establishing an edge-triggered interrupt for it, so it
will trigger only once during probing.
This workaround makes the WDC_NO_IDS option obsolete, which was removed
from the GENERIC config.
 1.30 06-Nov-2011  phx branches: 1.30.4;
Fixed PCI line to EPIC IRQ mapping for Iomega Storcenter.
 1.29 01-Jul-2011  dyoung branches: 1.29.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.28 18-Jun-2011  matt struct device * -> device_t
struct cfdata * -> cfdata_t
use device accessors, use device_private.
some softc/device_t splits (macppc needs a bunch more)
aprint*_dev used considerably more
 1.27 30-Apr-2011  phx branches: 1.27.2;
Detect QNAP board last, because a Realtek chip at pci device 15 is used
on several boards.
 1.26 04-Apr-2011  dyoung Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
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
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.25 26-Mar-2011  phx Recognize QNAP V200 board, used in the TS-201 and newer TS-101 models.
 1.24 19-Mar-2011  phx DLink DSM-G600 IDSEL-14 (USB) needs special handling: Pin A is mapped to
EPIC-IRQ 1, but Pin C must be mapped to IRQ 2.
 1.23 14-Feb-2011  nisimura add EPIC definition for Netronics NH230/NH231 and the brothers.
 1.22 10-Feb-2011  nisimura - add D-Link EPIC defition to pci_machdep.c
- change the way to reboot/pwroff to make satmgr.c more flexible for
a multiple byte sat protocol.
 1.21 07-Feb-2011  nisimura add StorCenter heuristic by PCI vendor ID detection.
 1.20 20-Dec-2010  matt branches: 1.20.2; 1.20.4;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.19 28-May-2010  phx QNAP support (untested): PCI fixup and corrected PCI address lines (+1).
Patch submitted by Toru Nishimura.
 1.18 27-May-2010  phx Disable EPIC_DEBUGIRQ. Reenable when needed.
 1.17 30-Jul-2009  nisimura branches: 1.17.2; 1.17.4;
- fix EUMB com console attach case.
- #ifdef out pci_conf_interrupt() for PCI_NETBSD_CONFIGURE option.
Requested and tested by kiyohara.
 1.16 30-May-2008  ad pci_intr_setattr(), allows PCI interrupts to be marked MPSAFE on x86, and
other platforms if the code is added.

pci_intr_map(...)
pci_intr_setattr(pc, ih, PCI_INTR_MPSAFE, 1);
pci_intr_establish(...)
 1.15 19-Nov-2007  nisimura branches: 1.15.14; 1.15.16; 1.15.18; 1.15.20;
- SandpointX3 practices serial mode EPIC with the help of special
FPGA circuit. pin A input only; pin B/C/D are not counted in.
- With EnCorePP1 heuristics find that i82559 (AD25) responds to EPIC 2.
 1.14 27-Oct-2007  nisimura branches: 1.14.2;
- copy intr.h from prep and make mods.
- ANSI-fy pci_machdep.c
 1.13 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.12 11-Dec-2005  christos branches: 1.12.30; 1.12.38; 1.12.48; 1.12.50; 1.12.52; 1.12.54;
merge ktrace-lwp.
 1.11 15-Jul-2003  lukem branches: 1.11.16;
__KERNEL_RCSID()
 1.10 27-Sep-2002  provos branches: 1.10.6;
remove trailing \n in panic(). approved perry.
 1.9 24-May-2002  briggs Only attempt to handle mapping IDE interrupts if we are in SERIAL mode.
 1.8 12-Apr-2002  briggs branches: 1.8.2; 1.8.4;
Map winbond interrupts.
 1.7 29-Oct-2001  thorpej branches: 1.7.2;
pci_conf_interrupt() takes bus/dev/pin, not bus/dev/func.
 1.6 30-Aug-2001  briggs branches: 1.6.4;
- Change default time frequency to 100MHz from 66MHz.
- Support the serial mode interrupts (with a kernel configuration option)
on the Sandpoint X3.
- Initialize cpu_timebase.
- Enable tulip driver.
 1.5 20-Aug-2001  wiz "wierd" is weird.
 1.4 10-Jun-2001  briggs branches: 1.4.2;
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.3 15-May-2001  lukem delint: don't try & return something from void pci_intr_disestablish()
 1.2 07-Feb-2001  briggs branches: 1.2.2; 1.2.4;
Handle setting the proper interrupt line for devices behind bridges.
 1.1 04-Feb-2001  briggs Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.2.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 07-Feb-2001  bouyer file pci_machdep.c was added on branch thorpej_scsipi on 2001-02-11 19:12:03 +0000
 1.4.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.6.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.7.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.7.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.7.2.2 17-Apr-2002  nathanw Catch up to -current.
 1.7.2.1 29-Oct-2001  nathanw file pci_machdep.c was added on branch nathanw_sa on 2002-04-17 00:04:18 +0000
 1.8.4.1 24-May-2002  perry resolve 1.6 pullup ticket #18, from briggs
needed to make sandpoint port build again
pulls up revision number 1.9
Original commit message:

> Only attempt to handle mapping IDE interrupts if we are in SERIAL mode.
 1.8.2.1 30-May-2002  gehenna Catch up with -current.
 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.11.16.2 07-Dec-2007  yamt sync with head
 1.11.16.1 27-Oct-2007  yamt sync with head.
 1.12.54.3 21-Nov-2007  bouyer Sync with HEAD
 1.12.54.2 13-Nov-2007  bouyer Sync with HEAD
 1.12.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.12.52.1 18-Oct-2007  yamt sync with head.
 1.12.50.2 09-Jan-2008  matt sync with HEAD
 1.12.50.1 06-Nov-2007  matt sync with HEAD
 1.12.48.3 21-Nov-2007  joerg Sync with HEAD.
 1.12.48.2 28-Oct-2007  joerg Sync with HEAD.
 1.12.48.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.12.38.5 16-Jun-2007  nisimura some correction for interrupt fixup. Hope this more precise and better
suited.
 1.12.38.4 08-Jun-2007  nisimura - fix EPIC IRQ mapping for additional SATA controller found Synology
- aprint_error
 1.12.38.3 23-May-2007  nisimura - pci_machdep.c tries to fixup PCI stuff by identifying the target with
some heuristics.
- have eumb device nodes for bus.h and mainbus.c and machdep.c.
 1.12.38.2 04-May-2007  nisimura - make machine/openpicreg.h free from brd specific IRQ assignment.
Need to invent the concise way to specify brd definitions.
- compensate the change above by adding lines to pci/pci_machdep.c
- intr_establish() needs +16 offset to register PCI interrupts.
 1.12.38.1 04-May-2007  nisimura get rid of a line to include isa/icu.h
 1.12.30.2 03-Dec-2007  ad Sync with HEAD.
 1.12.30.1 23-Oct-2007  ad Sync with head.
 1.14.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.15.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.15.18.3 11-Aug-2010  yamt sync with head.
 1.15.18.2 19-Aug-2009  yamt sync with head.
 1.15.18.1 04-May-2009  yamt sync with head.
 1.15.16.1 04-Jun-2008  yamt sync with head
 1.15.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.4.4 31-May-2011  rmind sync with head
 1.17.4.3 21-Apr-2011  rmind sync with head
 1.17.4.2 05-Mar-2011  rmind sync with head
 1.17.4.1 30-May-2010  rmind sync with head
 1.17.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.20.4.2 17-Feb-2011  bouyer Sync with HEAD
 1.20.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.20.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.27.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.29.2.3 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.29.2.2 17-Apr-2012  yamt sync with head
 1.29.2.1 10-Nov-2011  yamt sync with head
 1.30.4.1 18-Feb-2012  mrg merge to -current.
 1.31.10.1 18-May-2014  rmind sync with head
 1.31.6.2 03-Dec-2017  jdolecek update from HEAD
 1.31.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.33.6.3 28-Aug-2017  skrll Sync with HEAD
 1.33.6.2 05-Dec-2016  skrll Sync with HEAD
 1.33.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.34.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.34.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.14 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.13 11-Dec-2005  christos branches: 1.13.30; 1.13.38; 1.13.48; 1.13.50; 1.13.52; 1.13.54;
merge ktrace-lwp.
 1.12 06-Sep-2004  drochner branches: 1.12.12;
fix a botch in config_found->config_found_ia transition,
by Havard Eidnes
 1.11 30-Aug-2004  drochner 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.10 23-Apr-2004  itojun pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 06-Mar-2003  matt branches: 1.8.2;
Adapt to powerpc/bus.h changes.
 1.7 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.6 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.5 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 22-Jul-2001  wiz branches: 1.3.6;
bcopy -> memcpy, bzero -> memset
 1.2 10-Jun-2001  briggs branches: 1.2.2;
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 04-Feb-2001  bouyer file pcib.c was added on branch thorpej_scsipi on 2001-02-11 19:12:04 +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 03-Aug-2001  lukem update to -current
 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 22-Jul-2001  nathanw file pcib.c was added on branch nathanw_sa on 2002-10-18 02:39:36 +0000
 1.8.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.2 03-Sep-2004  skrll Sync with HEAD
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.12.1 27-Oct-2007  yamt sync with head.
 1.13.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.13.52.1 18-Oct-2007  yamt sync with head.
 1.13.50.1 06-Nov-2007  matt sync with HEAD
 1.13.48.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.13.38.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- get rid of files obsoluted by common powerpc files.
 1.13.30.1 23-Oct-2007  ad Sync with head.
 1.7 17-Mar-2021  rin Make this distinguishable with native PCI interrupt.
 1.6 17-Mar-2021  rin Switch to intr_establish_xname().
 1.5 18-Jun-2011  matt branches: 1.5.66;
struct device * -> device_t
struct cfdata * -> cfdata_t
use device accessors, use device_private.
some softc/device_t splits (macppc needs a bunch more)
aprint*_dev used considerably more
 1.4 04-Apr-2011  dyoung branches: 1.4.2;
Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
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
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.3 16-Mar-2009  dsl branches: 1.3.4; 1.3.6;
ANSIfy functions with function-pointer arguments
 1.2 17-Oct-2007  garbled branches: 1.2.2; 1.2.4; 1.2.8; 1.2.26; 1.2.34; 1.2.40;
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.1 11-Jun-2007  nisimura branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
file pciide_machdep.c was initially added on branch ppcoea-renovation.
 1.1.10.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.8.1 18-Oct-2007  yamt sync with head.
 1.1.6.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.1.2.1 11-Jun-2007  nisimura - __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH.
- add pciide_machdep.c for compatibility mode IDE controller.
 1.2.40.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.34.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.26.1 04-May-2009  yamt sync with head.
 1.2.8.2 06-Nov-2007  matt sync with HEAD
 1.2.8.1 17-Oct-2007  matt file pciide_machdep.c was added on branch matt-armv6 on 2007-11-06 23:21:25 +0000
 1.2.4.2 27-Oct-2007  yamt sync with head.
 1.2.4.1 17-Oct-2007  yamt file pciide_machdep.c was added on branch yamt-lazymbuf on 2007-10-27 11:28:17 +0000
 1.2.2.2 23-Oct-2007  ad Sync with head.
 1.2.2.1 17-Oct-2007  ad file pciide_machdep.c was added on branch vmlocking on 2007-10-23 20:36:27 +0000
 1.3.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.4.1 21-Apr-2011  rmind sync with head
 1.4.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.5.66.1 03-Apr-2021  thorpej Sync with HEAD.
 1.32 03-Oct-2025  thorpej Use device_setprop_data() to set the "mac-address" property.
 1.31 23-Sep-2025  thorpej Make the i2c_enumerate_deventries() callback a bit more generic so
it can also be used for the filtering function that macppc::cuda
and sandpoint need.
 1.30 22-Sep-2025  thorpej Don't use an "i2c-child-devices" array. Instead, provide a private
i2c device enumeration method for the i2c controller.
 1.29 09-Jul-2020  nisimura branches: 1.29.6; 1.29.16;
Adapt to proplib api changes
 1.28 30-Sep-2015  phx Now more than a single I2C device per model may be configured directly.
An additional flags argument makes the configuration depend on the model-
flags in an optional BTINFO_MODEL bootinfo node.
Print the model name together with the vendor name, when known.
 1.27 29-Jul-2012  mlelstv branches: 1.27.2; 1.27.16;
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.26 28-Jul-2012  matt Fix -fno-common fallout.
 1.25 12-May-2012  nisimura Move I2C node adjustment stuff to autoconf.c from iic_eumb.c for
the ease of maintainance.
 1.24 19-Jan-2012  nisimura branches: 1.24.2;

Change BTINFO_ROOTDEV to include boot device partition number in
its cookie field to allow a kernel to determine rootdev correctly
when kernel image is loaded from other than 'a' partition.
 1.23 18-Jun-2011  matt branches: 1.23.2; 1.23.6;
struct device * -> device_t
struct cfdata * -> cfdata_t
use device accessors, use device_private.
some softc/device_t splits (macppc needs a bunch more)
aprint*_dev used considerably more
 1.22 30-Jun-2010  phx branches: 1.22.6;
Determine the boot disk with bootinfo cookie.
Patch submitted by Toru Nishimura.
 1.21 18-May-2010  phx Recognize a network boot device by its PCI tag, even when it is not directly
attached to a PCI bus, but to a controller chip (e.g. sk(4) on skc(4)).
Extended BTINFO_NET to usa a PCI tag as well, now since it works.
 1.20 16-May-2010  phx Make netboot generate a BTINFO_NET bootinfo node for the Synology sk(4) NIC.
It will pass the MAC address, which is read from Flash ROM, into the kernel.
The kernel creates a "mac-address" device-property, which is used by sk(4),
when given, before reading the MAC from its EEPROM.
 1.19 18-Mar-2009  cegger branches: 1.19.2; 1.19.4;
Ansify function definitions w/o arguments. Generated with sed.
 1.18 09-Apr-2008  nisimura branches: 1.18.4; 1.18.12; 1.18.18;
- abandon to maintain disksubr.c in favour of kern/subr_disk_mbr.c.
 1.17 05-Apr-2008  nisimura add rootfs on disk bootinfo case.
 1.16 03-Apr-2008  nisimura revise SDRAM SPD detect attempt for EUMB I2C debugging purpose.
 1.15 12-Feb-2008  joerg branches: 1.15.6;
Introduce device_find_by_xname and device_find_by_driver_unit to replace
alldevs iterations all over src.

Patch discussed with and improved on suggestioned from cube@.
 1.14 05-Dec-2007  tsutsui Use TAILQ_FIRST(3) and TAILQ_NEXT(3) macro.
 1.13 17-Oct-2007  garbled branches: 1.13.2; 1.13.4;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.12 11-Dec-2005  christos branches: 1.12.30; 1.12.38; 1.12.48; 1.12.50; 1.12.52; 1.12.54;
merge ktrace-lwp.
 1.11 23-Oct-2004  thorpej branches: 1.11.12;
Centralize the declaration of booted_device and booted_partition.
 1.10 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 18-Jun-2003  drochner branches: 1.8.2;
don't #include <sys/dkstat.h> where it is (appearently) unused
 1.7 03-Feb-2003  matt Rename PPC_MPC6XX to PPC_OEA (and any mpc6xx reference to oea).
 1.6 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.5 30-Aug-2001  briggs branches: 1.5.6; 1.5.14;
- Change default time frequency to 100MHz from 66MHz.
- Support the serial mode interrupts (with a kernel configuration option)
on the Sandpoint X3.
- Initialize cpu_timebase.
- Enable tulip driver.
 1.4 26-Aug-2001  matt Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.3 10-Jun-2001  briggs branches: 1.3.2;
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.2 06-Mar-2001  briggs Disable interrupts during autoconf.
Move identifycpu() from machdep.c to autoconf.c, make it table-driven, and
add a few more models to it.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.1.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.1.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file autoconf.c was added on branch thorpej_scsipi on 2001-02-11 19:12:04 +0000
 1.3.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.5.14.1 17-May-2002  gehenna Replace the access to devsw table and the hard-coded major with devsw API.
 1.5.6.2 17-Sep-2002  nathanw Catch up to -current.
 1.5.6.1 30-Aug-2001  nathanw file autoconf.c was added on branch nathanw_sa on 2002-09-17 21:17:16 +0000
 1.8.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.8.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.12.3 27-Feb-2008  yamt sync with head.
 1.11.12.2 07-Dec-2007  yamt sync with head
 1.11.12.1 27-Oct-2007  yamt sync with head.
 1.12.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.12.52.1 18-Oct-2007  yamt sync with head.
 1.12.50.3 23-Mar-2008  matt sync with HEAD
 1.12.50.2 09-Jan-2008  matt sync with HEAD
 1.12.50.1 06-Nov-2007  matt sync with HEAD
 1.12.48.3 09-Dec-2007  jmcneill Sync with HEAD.
 1.12.48.2 02-Nov-2007  joerg More diff reduce to HEAD due to botched up merging.
 1.12.48.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.12.38.4 02-Jun-2007  nisimura - bootinfo now passes pci_make_tag() compatible cookie to designate
the booting device.
- aprint_normal.
 1.12.38.3 25-May-2007  nisimura - it's the setroot()'s duty to determine RB_ASKNAME case. remove
erroneous bail out logic in device_register().
- nuke remaining redundant #include lines.
 1.12.38.2 25-May-2007  nisimura - __HAVE_DEVICE_REGISTER.
- allow bootinfo to pass cookie value to determine rootdev. It's
a PCI tag encoded value (bus:dev:func) when netboot case.
- nuke some defunct comments whose origin can be traced back to the
age of VAX bus hose plumbering.
- should re-visit when diskboot is being made.
 1.12.38.1 10-May-2007  garbled More cleanup:
1) Remove lcsplx, strayintr, and foosoft from all the converted ports.
None of this stuff is needed anymore.
2) because lcsplx is just "return spllower", just call spllower from
locore_subr.S instead.
3) Every port (except macppc) had a pretty similar cpu_configure(), so
take the common parts out and make a genppc_cpu_configure() in an attempt
to stop using imask[] outside of intr.c
 1.12.30.2 03-Dec-2007  ad Sync with HEAD.
 1.12.30.1 23-Oct-2007  ad Sync with head.
 1.13.4.1 08-Dec-2007  ad Sync with head.
 1.13.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.13.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.15.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.15.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.18.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.4.2 11-Aug-2010  yamt sync with head.
 1.18.4.1 04-May-2009  yamt sync with head.
 1.19.4.2 03-Jul-2010  rmind sync with head
 1.19.4.1 30-May-2010  rmind sync with head
 1.19.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.22.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.23.6.2 02-Jun-2012  mrg sync to latest -current.
 1.23.6.1 18-Feb-2012  mrg merge to -current.
 1.23.2.3 30-Oct-2012  yamt sync with head
 1.23.2.2 23-May-2012  yamt sync with head.
 1.23.2.1 17-Apr-2012  yamt sync with head
 1.24.2.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.27.16.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.27.2.1 03-Dec-2017  jdolecek update from HEAD
 1.29.16.5 13-Sep-2021  thorpej Move the i2c enumeration helpers to their own header file to detangle
it from reliance on "iic" being configured into the kernel.
 1.29.16.4 11-Sep-2021  thorpej Re-factor the code in sandpoint and sparc64 that enumerates a static
table of i2c device entries into something sharable.
 1.29.16.3 10-Sep-2021  thorpej Remove unnecessary references to i2c_attach_args::ia_prop and mark the ones
that remain as XXX.
 1.29.16.2 24-Aug-2021  thorpej Whitespace changes to make the tables more compact.
 1.29.16.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.29.6.2 08-May-2021  thorpej There are no more consumers of i2c attach args "cookie" and "cookietype",
so garbage-collect them.
 1.29.6.1 25-Apr-2021  thorpej Use a private devhandle to implement i2c device enumeration on the
Sandpoint-based NAS devices.
 1.5 10-Jun-2001  briggs Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.4 26-May-2001  chs replace vm_page_t with struct vm_page *.
 1.3 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.2 21-Mar-2001  soren s/vm_page_alloc_memory/uvm_pglistalloc/ in panic message.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file bus_dma.c was added on branch thorpej_scsipi on 2001-02-11 19:12:05 +0000
 1.6 18-Mar-2003  matt Switch/adapt to new bus space infrastructure.
 1.5 06-Mar-2003  matt Make most of PPC (OEA) bus_space's identical (or as identical as possible).
(except mvmeppc).
 1.4 06-Mar-2003  matt Adapt to powerpc/bus.h changes.
 1.3 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.2 10-Dec-2001  briggs Provide basic bus_space_mmap(). Noted by self and in PR port-powerpc/14873.
This at least allows the compile to complete. There are still Issues with
vga_pci.c's assumptions about a PC-ish environment.
 1.1 10-Jun-2001  briggs branches: 1.1.2; 1.1.4; 1.1.10;
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.1.10.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.10.1 10-Jun-2001  nathanw file bus_space.c was added on branch nathanw_sa on 2002-01-08 00:27:24 +0000
 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 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.10 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.9 24-Dec-2005  perry branches: 1.9.30; 1.9.38; 1.9.48; 1.9.50; 1.9.52; 1.9.54;
bare asm -> __asm
 1.8 23-Nov-2005  nonaka In decr_intr(), update lasttb only when clock interrupt is not masked.
(sync with macppc/macppc/clock.c: rev.1.11 -> 1.12)
 1.7 02-Jun-2005  he branches: 1.7.2; 1.7.8;
Fix variable shadowing and adapt to -Wconst-qual.
 1.6 29-Jun-2004  kleink In the delay loop, mark the scratch register as earlyclobber.
 1.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 12-Feb-2003  matt branches: 1.4.2;
Set cpu_timebase so sysctl() can report it.
 1.3 06-Aug-2002  chs move more inlines to cpu.h: mftb(), mftbl() and mfpvr().
(the mftb() in pmap.c only wanted the lower 32 bits, so that's now mftbl()).
 1.2 19-Jun-2001  simonb branches: 1.2.2; 1.2.8; 1.2.16;
Make all the ppc delay() functions the same - formating change only, no
code changes. Step one of a unified ppc clock.c.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 04-Feb-2001  bouyer file clock.c was added on branch thorpej_scsipi on 2001-02-11 19:12:06 +0000
 1.2.16.1 31-Aug-2002  gehenna catch up with -current.
 1.2.8.2 13-Aug-2002  nathanw Catch up to -current.
 1.2.8.1 19-Jun-2001  nathanw file clock.c was added on branch nathanw_sa on 2002-08-13 02:18:48 +0000
 1.2.2.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.2.5 11-Dec-2005  christos Sync with head.
 1.4.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.8.1 29-Nov-2005  yamt sync with head.
 1.7.2.2 27-Oct-2007  yamt sync with head.
 1.7.2.1 21-Jun-2006  yamt sync with head.
 1.9.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.9.52.1 18-Oct-2007  yamt sync with head.
 1.9.50.1 06-Nov-2007  matt sync with HEAD
 1.9.48.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.9.38.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- get rid of files obsoluted by common powerpc files.
 1.9.30.1 23-Oct-2007  ad Sync with head.
 1.12 25-Mar-2021  rin At least KuroBox Classic and HG seem to have buggy UART, for which
ETXRDY interrupts are sometimes (once per a few hours?) lost; TX stalls
until next RX arrives.

Since interrupt-based I/O works just fine for other devices, I believe
this problem is due to UART and not to PIC or its driver.

In order to work around this bug, enable COM_HW_BROKEN_ETXRDY bit, as
well as carry out polling once per 10 sec or 1k tics (arbitrary, but
1 min seems too long).

XXX
Apply this for other MPC824x-based boards?
 1.11 17-Mar-2021  rin branches: 1.11.2;
Switch to intr_establish_xname().
 1.10 07-Apr-2019  jdc branches: 1.10.12;
Call com_init_regs() in eumbcnattach() to set up com port register mapping.
Fixes broken console output after changes to remove COM_REGMAP.
 1.9 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.8 29-Dec-2011  phx branches: 1.8.46; 1.8.48;
Replaced 16 by I8259_ICU in intr_establish().
 1.7 01-Jul-2011  dyoung branches: 1.7.2; 1.7.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.6 24-Feb-2011  phx Print "interrupting at". Improved style guide conformance.
 1.5 30-Jul-2009  nisimura branches: 1.5.4; 1.5.6; 1.5.8;
- fix EUMB com console attach case.
- #ifdef out pci_conf_interrupt() for PCI_NETBSD_CONFIGURE option.
Requested and tested by kiyohara.
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 14-Mar-2008  cube branches: 1.3.2; 1.3.4;
Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend). Use proper types and ansify where appropriate.
 1.2 17-Oct-2007  garbled branches: 1.2.2; 1.2.4; 1.2.8; 1.2.18; 1.2.22;
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.1 30-May-2007  nisimura branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
file com_eumb.c was initially added on branch ppcoea-renovation.
 1.1.10.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.8.1 18-Oct-2007  yamt sync with head.
 1.1.6.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.1.2.1 30-May-2007  nisimura - fix description errors in SANDPOINT conf.
- add com and ociic EUMB devices. The latter is under development.
 1.2.22.2 02-Jun-2008  mjf Sync with HEAD.
 1.2.22.1 03-Apr-2008  mjf Sync with HEAD.
 1.2.18.1 24-Mar-2008  keiichi sync with head.
 1.2.8.3 23-Mar-2008  matt sync with HEAD
 1.2.8.2 06-Nov-2007  matt sync with HEAD
 1.2.8.1 17-Oct-2007  matt file com_eumb.c was added on branch matt-armv6 on 2007-11-06 23:21:26 +0000
 1.2.4.3 17-Mar-2008  yamt sync with head.
 1.2.4.2 27-Oct-2007  yamt sync with head.
 1.2.4.1 17-Oct-2007  yamt file com_eumb.c was added on branch yamt-lazymbuf on 2007-10-27 11:28:18 +0000
 1.2.2.2 23-Oct-2007  ad Sync with head.
 1.2.2.1 17-Oct-2007  ad file com_eumb.c was added on branch vmlocking on 2007-10-23 20:36:28 +0000
 1.3.4.2 19-Aug-2009  yamt sync with head.
 1.3.4.1 16-May-2008  yamt sync with head.
 1.3.2.1 18-May-2008  yamt sync with head.
 1.5.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.5.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.5.4.1 05-Mar-2011  rmind sync with head
 1.7.6.1 18-Feb-2012  mrg merge to -current.
 1.7.2.1 17-Apr-2012  yamt sync with head
 1.8.48.1 10-Jun-2019  christos Sync with HEAD
 1.8.46.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.10.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.11.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.12 26-Oct-2002  jdolecek now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
 1.11 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.10 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.9 17-Jun-2002  christos MD systrace gluons.
 1.8 19-Apr-2002  wiz branches: 1.8.2;
Remove unneeded cdev_decl(pms).
 1.7 16-Mar-2002  martin Rename ISDN devices, per discussion on tech-kern. The network devices
become ippp (ISDN ppp) and irip (ISDN raw IP). The character device now
are called: /dev/isdn (isdnd <-> kernel communication), /dev/isdnctl (dialing
and other control), /dev/isdntrc* (tracing), /dev/isdnbchan* (raw B channel
access, i.e. for user land PPP) and /dev/isdntel* (telephone devices, i.e.
for answering machines).
 1.6 12-Jan-2002  manu Added clockctl
 1.5 10-May-2001  lukem branches: 1.5.2; 1.5.8;
fix comment; cdev_notdef() is a funny pc console :)
 1.4 21-Mar-2001  lukem move duplicate definitions for:
pc, lpt, joy, ocis, apm, satlink, i4bctl, i4brbch, i4btel, i4btrc, i4b
from the port-specific arch/*/*/conf.c files into sys/conf.h
 1.3 08-Feb-2001  briggs branches: 1.3.2; 1.3.4;
Keyboard, mouse, ws*
 1.2 08-Feb-2001  briggs Add lpt and fdc/fd back in. Include i4b stuff, too.
 1.1 04-Feb-2001  briggs Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.3.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.3.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.3.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.3.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.3.2.1 08-Feb-2001  bouyer file conf.c was added on branch thorpej_scsipi on 2001-02-11 19:12:06 +0000
 1.5.8.7 11-Nov-2002  nathanw Catch up to -current
 1.5.8.6 17-Sep-2002  nathanw Catch up to -current.
 1.5.8.5 01-Aug-2002  nathanw Catch up to -current.
 1.5.8.4 20-Jun-2002  nathanw Catch up to -current.
 1.5.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.5.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.5.8.1 10-May-2001  nathanw file conf.c was added on branch nathanw_sa on 2002-02-28 04:11:33 +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 11-Feb-2002  jdolecek Sync w/ -current.
 1.8.2.3 21-Jul-2002  gehenna catch up with -current.
 1.8.2.2 15-Jul-2002  gehenna catch up with -current.
 1.8.2.1 16-May-2002  gehenna Bye block/character device swicth tables.
 1.18 09-Apr-2008  nisimura - abandon to maintain disksubr.c in favour of kern/subr_disk_mbr.c.
 1.17 02-Jan-2008  ad branches: 1.17.6;
Merge vmlocking2 to head.
 1.16 17-Oct-2007  garbled branches: 1.16.2; 1.16.4; 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 08-Oct-2007  ad Merge brelse() changes from the vmlocking branch.
 1.14 29-Jul-2007  ad branches: 1.14.4; 1.14.6; 1.14.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.13 06-Mar-2007  he branches: 1.13.2; 1.13.10; 1.13.12; 1.13.14;
More fixes after the caddr_t removal.
Mostly cast to char* for pointer arithmetic,
but also one missing indirection, and one "void *v, x;" fix.
 1.12 25-Nov-2006  scw branches: 1.12.4;
Replace the myriad copies of bounds_check_with_label() with a single MI
version.

Add disk_blocksize(9) so that disk drivers can record the physical
block size of a disk if it is different to DEV_BSIZE. Right now this
simply initialises dk_blkshift and dk_byteshift according to the
supplied block size. This information is used in the MI version of
bounds_check_with_label().
 1.11 11-Dec-2005  christos branches: 1.11.20; 1.11.22;
merge ktrace-lwp.
 1.10 02-Jun-2005  he branches: 1.10.2;
Fix variable shadowing and adapt to -Wconst-qual.
 1.9 08-Oct-2003  lukem Overhaul MBR handling (part 1):

<sys/bootblock.h>:
* Added definitions for the Master Boot Record (MBR) used by
a variety of systems (primarily i386), including the format
of the BIOS Parameter Block (BPB).
This information was cribbed from a variety of sources
including <sys/disklabel_mbr.h> which this is a superset of.

As part of this, some data structure elements and #defines
were renamed to be more "namespace friendly" and consistent
with other bootblocks and MBR documentation.
Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
* Deprecated in favor of <sys/bootblock.h> (the latter is more
"host tool" friendly).

amd64 & i386:
* Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
be consistent with the naming convention of the msdosfs tools.

* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
and it's confusing to have two functionally equivalent bootblocks,
especially given that "ufs" has multiple meanings (it could be
a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

* Rework pbr.S (the first sector of bootxx_*):
+ Ensure that BPB (bytes 11..89) and the partition table
(bytes 446..509) do not contain code.
+ Add support for booting from FAT partitions if BOOT_FROM_FAT
is defined. (Only set for bootxx_msdos).
+ Remove "dummy" partition 3; if people want to installboot(8)
these to the start of the disk they can use fdisk(8) to
create a real MBR partition table...
+ Compile with TERSE_ERROR so it fits because of the above.
Whilst this is less user friendly, I feel it's important
to have a valid partition table and BPB in the MBR/PBR.

* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
with other platforms.

* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
we can boot off FAT partitions.

* Crank version of /usr/mdec/boot to 3.1, and fix some of the other
entries in the version file.

installboot(8) (i386):
* Read the existing MBR of the filesystem and retain the BIOS
Parameter Block (BPB) in bytes 11..89 and the MBR partition
table in bytes 446..509. (Previously installboot(8) would
trash those two sections of the MBR.)

mbrlabel(8):
* Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
 1.8 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.7 15-Jul-2003  lukem __KERNEL_RCSID()
 1.6 12-May-2003  thorpej branches: 1.6.2;
Include <sys/disk.h>.
 1.5 10-May-2003  thorpej Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself. This paves the way for some future changes.
 1.4 02-May-2003  dsl Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
 1.3 16-Apr-2003  bouyer Nake return values from bounds_check_with_label() conform to the man
page: -1 for error, 0 for EOF, 1 otherwise. Inspired by an OpenBSD commit
message, pointed out by Miod Vallat in private mail.
vax/mba/hp.c: check return value <= 0, not < 0 to be concistent with how
other places handle return values from bounds_check_with_label().
 1.2 19-Feb-2002  wiz strategy should have an 'r'. Inspired by similar change in OpenBSD.
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.10.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file disksubr.c was added on branch thorpej_scsipi on 2001-02-11 19:12:07 +0000
 1.6.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.10.2.4 21-Jan-2008  yamt sync with head
 1.10.2.3 27-Oct-2007  yamt sync with head.
 1.10.2.2 03-Sep-2007  yamt sync with head.
 1.10.2.1 30-Dec-2006  yamt sync with head.
 1.11.22.1 10-Dec-2006  yamt sync with head.
 1.11.20.1 12-Jan-2007  ad Sync with head.
 1.12.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.13.14.1 15-Aug-2007  skrll Sync with HEAD.
 1.13.12.1 07-Aug-2007  matt Sync with HEAD.
 1.13.10.2 16-Oct-2007  garbled Sync with HEAD
 1.13.10.1 03-Oct-2007  garbled Sync with HEAD
 1.13.2.2 09-Oct-2007  ad Sync with head.
 1.13.2.1 19-Aug-2007  ad - Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).
 1.14.8.1 14-Oct-2007  yamt sync with head.
 1.14.6.2 09-Jan-2008  matt sync with HEAD
 1.14.6.1 06-Nov-2007  matt sync with HEAD
 1.14.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.16.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.16.4.1 31-Dec-2007  ad Make compile with new buffer cache locking scheme.

XXX This should be largely MI, please do not make another clone of disksubr.c.
 1.16.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.17.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.8 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.7 24-Apr-2021  thorpej branches: 1.7.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.6 18-Dec-2011  phx branches: 1.6.62;
Replaced conf_args by mainbus_attach_args.
 1.5 01-Jul-2011  dyoung branches: 1.5.2; 1.5.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 06-Jun-2011  matt More device_t, cfdata, CFATTACH_DECL_NEW cleanup.
 1.3 28-Apr-2008  martin branches: 1.3.22; 1.3.32;
Remove clause 3 and 4 from TNF licenses
 1.2 17-Oct-2007  garbled branches: 1.2.2; 1.2.4; 1.2.8; 1.2.22; 1.2.24; 1.2.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.1 30-May-2007  nisimura branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
file eumb.c was initially added on branch ppcoea-renovation.
 1.1.10.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.8.1 18-Oct-2007  yamt sync with head.
 1.1.6.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.1.2.1 30-May-2007  nisimura - fix description errors in SANDPOINT conf.
- add com and ociic EUMB devices. The latter is under development.
 1.2.26.1 16-May-2008  yamt sync with head.
 1.2.24.1 18-May-2008  yamt sync with head.
 1.2.22.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.8.2 06-Nov-2007  matt sync with HEAD
 1.2.8.1 17-Oct-2007  matt file eumb.c was added on branch matt-armv6 on 2007-11-06 23:21:27 +0000
 1.2.4.2 27-Oct-2007  yamt sync with head.
 1.2.4.1 17-Oct-2007  yamt file eumb.c was added on branch yamt-lazymbuf on 2007-10-27 11:28:18 +0000
 1.2.2.2 23-Oct-2007  ad Sync with head.
 1.2.2.1 17-Oct-2007  ad file eumb.c was added on branch vmlocking on 2007-10-23 20:36:29 +0000
 1.3.32.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3.22.1 12-Jun-2011  rmind sync with head
 1.5.6.1 18-Feb-2012  mrg merge to -current.
 1.5.2.1 17-Apr-2012  yamt sync with head
 1.6.62.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.6.62.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.6.62.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.6.62.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.6.62.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.6.62.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.7.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.6 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.5 12-May-2010  phx Rewrote most of the code to make the 8245 I2C module finally work.
Tested with a RICOH RS5C372 RTC on a Synology DS-101g+ and Kurobox.
Reviewed by <nisimura>.
 1.4 28-Apr-2008  martin branches: 1.4.20; 1.4.22;
Remove clause 3 and 4 from TNF licenses
 1.3 19-Apr-2008  nisimura branches: 1.3.2;
bootinfo usage and porting guide.
- Kernel expects a ptr to bootinfo structure in arg3.
- The bootinfo definition is in include/bootinfo.h
- CLOCK and CONSOLE designations are important during initial bringup
efforts. machdep.c consults memory controller parameters when no
MEMORY was specified.
- autoconf.c determines ROOTDEVICE and BOOTPATH.
- target differences
 1.2 17-Oct-2007  garbled branches: 1.2.2; 1.2.4; 1.2.8; 1.2.22; 1.2.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.1 30-May-2007  nisimura branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
file eumbvar.h was initially added on branch ppcoea-renovation.
 1.1.10.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.8.1 18-Oct-2007  yamt sync with head.
 1.1.6.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.1.2.1 30-May-2007  nisimura - fix description errors in SANDPOINT conf.
- add com and ociic EUMB devices. The latter is under development.
 1.2.24.1 18-May-2008  yamt sync with head.
 1.2.22.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.8.2 06-Nov-2007  matt sync with HEAD
 1.2.8.1 17-Oct-2007  matt file eumbvar.h was added on branch matt-armv6 on 2007-11-06 23:21:28 +0000
 1.2.4.2 27-Oct-2007  yamt sync with head.
 1.2.4.1 17-Oct-2007  yamt file eumbvar.h was added on branch yamt-lazymbuf on 2007-10-27 11:28:19 +0000
 1.2.2.2 23-Oct-2007  ad Sync with head.
 1.2.2.1 17-Oct-2007  ad file eumbvar.h was added on branch vmlocking on 2007-10-23 20:36:30 +0000
 1.3.2.2 11-Aug-2010  yamt sync with head.
 1.3.2.1 16-May-2008  yamt sync with head.
 1.4.22.1 30-May-2010  rmind sync with head
 1.4.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.12 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.11 24-Dec-2005  perry branches: 1.11.30; 1.11.38; 1.11.48; 1.11.50; 1.11.52; 1.11.54;
bare asm -> __asm
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 02-Jun-2005  he branches: 1.9.2;
Fix variable shadowing and adapt to -Wconst-qual.
 1.8 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.7 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 16-Jun-2003  thorpej branches: 1.5.2;
Rename IPL_IMP -> IPL_VM.
 1.4 13-May-2002  matt Remove redundant declarations.
 1.3 30-Aug-2001  briggs branches: 1.3.6; 1.3.10;
- Change default time frequency to 100MHz from 66MHz.
- Support the serial mode interrupts (with a kernel configuration option)
on the Sandpoint X3.
- Initialize cpu_timebase.
- Enable tulip driver.
 1.2 05-Feb-2001  briggs branches: 1.2.2; 1.2.6;
Tsubai has convinced me that openpic_init() should remain machine-dependant
as the details might differ between archs, and passing the various options
leads to some clutter.
 1.1 04-Feb-2001  briggs Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.2.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.6.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 05-Feb-2001  bouyer file extintr.c was added on branch thorpej_scsipi on 2001-02-11 19:12:07 +0000
 1.3.10.1 17-Mar-2002  thorpej IPL_IMP -> IPL_VM
 1.3.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.3.6.1 30-Aug-2001  nathanw file extintr.c was added on branch nathanw_sa on 2002-06-20 03:40:45 +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.9.2.2 27-Oct-2007  yamt sync with head.
 1.9.2.1 21-Jun-2006  yamt sync with head.
 1.11.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.11.52.1 18-Oct-2007  yamt sync with head.
 1.11.50.1 06-Nov-2007  matt sync with HEAD
 1.11.48.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.11.38.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- get rid of files obsoluted by common powerpc files.
 1.11.30.1 23-Oct-2007  ad Sync with head.
 1.5 10-May-2023  riastradh sandpoint: Use config_detach_children to reduce error branch bugs.
 1.4 07-Sep-2015  phx Fix nor-flash bus space: extent limit should not be zero and bus space is
definitely big-endian. Reading the flash via /dev/flash0 works now.
Writing is untested.
 1.3 30-Jan-2012  phx branches: 1.3.4; 1.3.6; 1.3.10; 1.3.26; 1.3.28;
Revert my last modification.
The detach function might make sense to unload and replace a driver module.
http://mail-index.netbsd.org/source-changes-d/2012/01/24/msg004538.html
 1.2 23-Jan-2012  phx A detach function for the onboard flash probably makes no sense, so remove it.
 1.1 17-Dec-2011  phx Added NOR flash driver, using nor(4) and flash(4).
 1.3.28.1 22-Sep-2015  skrll Sync with HEAD
 1.3.26.1 04-Nov-2015  riz Pull up following revision(s) (requested by phx in ticket #976):
sys/arch/sandpoint/sandpoint/mainbus.c: revision 1.30
sys/arch/sandpoint/sandpoint/machdep.c: revision 1.64
sys/arch/sandpoint/sandpoint/flash_cfi.c: revision 1.4
Fix nor-flash bus space: extent limit should not be zero and bus space is
definitely big-endian. Reading the flash via /dev/flash0 works now.
Writing is untested.
 1.3.10.1 03-Dec-2017  jdolecek update from HEAD
 1.3.6.2 17-Apr-2012  yamt sync with head
 1.3.6.1 30-Jan-2012  yamt file flash_cfi.c was added on branch yamt-pagecache on 2012-04-17 00:06:50 +0000
 1.3.4.2 18-Feb-2012  mrg merge to -current.
 1.3.4.1 30-Jan-2012  mrg file flash_cfi.c was added on branch jmcneill-usbmp on 2012-02-18 07:33:03 +0000
 1.3 25-Apr-2002  briggs Use powerpc generic genassym.cf
 1.2 01-Jul-2001  matt branches: 1.2.2; 1.2.8;
Add PM_SR
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file genassym.cf was added on branch thorpej_scsipi on 2001-02-11 19:12:07 +0000
 1.2.8.4 20-Jun-2002  nathanw Catch up to -current.
 1.2.8.3 13-Nov-2001  briggs Define L_CPU.
 1.2.8.2 05-Nov-2001  briggs Initial SA support for ppc. Test-booted on sandpoint, macppc, & walnut.
mcontext and cpu_getmcontext()/cpu_setmcontext() from Klaus Klein
<kleink@netbsd.org>.
 1.2.8.1 01-Jul-2001  briggs file genassym.cf was added on branch nathanw_sa on 2001-11-05 19:46:21 +0000
 1.2.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.20 22-Jul-2022  thorpej Normalize how motoi2c controllers are attached.
 1.19 12-May-2012  nisimura Move I2C node adjustment stuff to autoconf.c from iic_eumb.c for
the ease of maintainance.
 1.18 11-May-2012  nisimura make sure to have the correct I2C TOD attached for KURO-BOX/T4.
 1.17 07-Jan-2012  phx Configure pcf8563rtc for nhnas models.
 1.16 01-Jul-2011  dyoung branches: 1.16.2; 1.16.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.15 18-Jun-2011  matt struct device * -> device_t
struct cfdata * -> cfdata_t
use device accessors, use device_private.
some softc/device_t splits (macppc needs a bunch more)
aprint*_dev used considerably more
 1.14 30-Apr-2011  phx branches: 1.14.2;
Add Iomega Storcenter dsrtc device (DS1337).
 1.13 08-Apr-2011  nisimura Minor format knots; sort a model list in alphabetical order and adjust
spacing.
 1.12 04-Apr-2011  phx Add more known I2C devices:
dlink: strtc
qnap: s390rtc
 1.11 31-Mar-2011  nisimura Build and use "i2c-child-devices" property to choose the correct RTC
chip among various models.
 1.10 12-Jan-2011  phx branches: 1.10.2;
Rewritten to take advantage of the new MI motoi2c code.
 1.9 31-Oct-2010  nisimura Update copyright notice. This code was completely replaced with
Frank Wille's effort and has no substance made by me anymore.
 1.8 12-May-2010  phx Rewrote most of the code to make the 8245 I2C module finally work.
Tested with a RICOH RS5C372 RTC on a Synology DS-101g+ and Kurobox.
Reviewed by <nisimura>.
 1.7 18-Mar-2009  cegger branches: 1.7.2; 1.7.4;
Ansify function definitions w/o arguments. Generated with sed.
 1.6 04-Feb-2009  pgoyette branches: 1.6.2;
Add support for i2c quick_{read,write} protocols.

OK'd by nisimura@
 1.5 28-Apr-2008  martin branches: 1.5.8;
Remove clause 3 and 4 from TNF licenses
 1.4 19-Apr-2008  nisimura branches: 1.4.2;
bootinfo usage and porting guide.
- Kernel expects a ptr to bootinfo structure in arg3.
- The bootinfo definition is in include/bootinfo.h
- CLOCK and CONSOLE designations are important during initial bringup
efforts. machdep.c consults memory controller parameters when no
MEMORY was specified.
- autoconf.c determines ROOTDEVICE and BOOTPATH.
- target differences
 1.3 02-Apr-2008  nisimura branches: 1.3.2;
add a prelimary implementation of MPC8245 EUMB I2C.
 1.2 17-Oct-2007  garbled branches: 1.2.2; 1.2.4; 1.2.8; 1.2.22;
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.1 30-May-2007  nisimura branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
file iic_eumb.c was initially added on branch ppcoea-renovation.
 1.1.10.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.8.1 18-Oct-2007  yamt sync with head.
 1.1.6.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.1.2.1 30-May-2007  nisimura - fix description errors in SANDPOINT conf.
- add com and ociic EUMB devices. The latter is under development.
 1.2.22.2 02-Jun-2008  mjf Sync with HEAD.
 1.2.22.1 03-Apr-2008  mjf Sync with HEAD.
 1.2.8.2 06-Nov-2007  matt sync with HEAD
 1.2.8.1 17-Oct-2007  matt file iic_eumb.c was added on branch matt-armv6 on 2007-11-06 23:21:29 +0000
 1.2.4.2 27-Oct-2007  yamt sync with head.
 1.2.4.1 17-Oct-2007  yamt file iic_eumb.c was added on branch yamt-lazymbuf on 2007-10-27 11:28:20 +0000
 1.2.2.2 23-Oct-2007  ad Sync with head.
 1.2.2.1 17-Oct-2007  ad file iic_eumb.c was added on branch vmlocking on 2007-10-23 20:36:30 +0000
 1.3.2.1 18-May-2008  yamt sync with head.
 1.4.2.3 11-Aug-2010  yamt sync with head.
 1.4.2.2 04-May-2009  yamt sync with head.
 1.4.2.1 16-May-2008  yamt sync with head.
 1.5.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.5.8.1 03-Mar-2009  skrll Sync with HEAD.
 1.6.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.4.4 31-May-2011  rmind sync with head
 1.7.4.3 21-Apr-2011  rmind sync with head
 1.7.4.2 05-Mar-2011  rmind sync with head
 1.7.4.1 30-May-2010  rmind sync with head
 1.7.2.2 06-Nov-2010  uebayasi Sync with HEAD.
 1.7.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.10.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.14.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.16.6.2 02-Jun-2012  mrg sync to latest -current.
 1.16.6.1 18-Feb-2012  mrg merge to -current.
 1.16.2.2 23-May-2012  yamt sync with head.
 1.16.2.1 17-Apr-2012  yamt sync with head
 1.6 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.5 24-Jan-2007  hubertf branches: 1.5.6; 1.5.14; 1.5.22; 1.5.24; 1.5.26; 1.5.28;
Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
 1.4 24-Dec-2005  perry branches: 1.4.20;
bare asm -> __asm
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 04-Feb-2001  briggs branches: 1.1.2; 1.1.26;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 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 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file kgdb_glue.c was added on branch thorpej_scsipi on 2001-02-11 19:12:08 +0000
 1.2.16.3 27-Oct-2007  yamt sync with head.
 1.2.16.2 26-Feb-2007  yamt sync with head.
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.4.20.1 01-Feb-2007  ad Sync with head.
 1.5.28.1 25-Oct-2007  bouyer Sync with HEAD.
 1.5.26.1 18-Oct-2007  yamt sync with head.
 1.5.24.1 06-Nov-2007  matt sync with HEAD
 1.5.22.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.5.14.1 09-May-2007  garbled Four copies of this file, all the same. New one lives in powerpc/oea.
 1.5.6.1 23-Oct-2007  ad Sync with head.
 1.26 26-Feb-2021  thorpej Declare oeacpufeat once, in powerpc/oea/cpu_subr.c, rather than in
N different locore.S files.
 1.25 15-Jul-2018  maxv branches: 1.25.12;
Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.24 07-Feb-2014  phx branches: 1.24.28; 1.24.30;
Remove enable_intr() and disable_intr(), which are unused.
 1.23 20-Jun-2011  matt branches: 1.23.2; 1.23.12; 1.23.16;
Don't include *pmap.h in assembly files. Get the needed definitions
from "assym.h".
 1.22 18-Jun-2011  matt Make a common genassym.cf (powerpc/genassym.cf) and then
only put specific stuff in foo/genassym.cf
 1.21 12-Mar-2011  phx branches: 1.21.2;
When rebooting flush the instruction pipeline first, then do an absolute
jump to 0xfff00100.
 1.20 17-Jan-2011  matt Kill _NOREGNAMES. Everything should be using %rX now. If it doesn't it
soon will.
 1.19 03-Mar-2010  pooka branches: 1.19.2; 1.19.4;
Fix some historical powerpc curiocity which had kernfs depend on
startsym/endsym, and which crept into most powerpc ports.
 1.18 27-Feb-2010  snj Spell "exception" properly.
 1.17 25-Feb-2010  matt Adapt to <spr.h> breakup.
 1.16 26-Nov-2009  matt branches: 1.16.2;
Kill proc0paddr. Use lwp0.l_addr instead.
 1.15 13-Feb-2009  apb Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
 1.14 13-Nov-2008  ad branches: 1.14.4;
LKM -> MODULAR
 1.13 19-Apr-2008  nisimura branches: 1.13.2; 1.13.8; 1.13.10; 1.13.20;
porting explanation take 2 after an accidental quit from CVS editor.
- target differences are considered minor and adaptable by heuristics
in pci/pci_machdep.c and machdep.c.
- kernel expects sane runtime HW settings when it gains control.
All tweaks should have been completed by bootloader.
- consults stand/ for reference. The implementation will change
from time to time.

communications to power control satelite processor is to be done by
a kernel thread and sysctl knobs with help of possible user agent
deamon.
 1.12 05-Feb-2008  garbled branches: 1.12.6; 1.12.8;
Ifdef out all the MPC601 code with PPC_OEA601. Now only arches that have the
possibility of running on an MPC601, are infected with all the extra code
and nops that it added.

Also, fix compilation that I broke with the pmap code, by adding
oeacpufeat to the locores of various ppc arches. Noted by mlelstv.
 1.11 17-Oct-2007  garbled branches: 1.11.2;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.10 11-Dec-2005  christos branches: 1.10.30; 1.10.38; 1.10.48; 1.10.50; 1.10.52; 1.10.54;
merge ktrace-lwp.
 1.9 31-Jul-2003  matt branches: 1.9.16;
Add #define _NOREGNAMES (to suppress asm.h from #define r1 1 ...)
 1.8 27-Apr-2003  ragge branches: 1.8.2;
Preserve the symbol table in the LKM || KSYMS cases also.
 1.7 18-Mar-2003  matt Switch/adapt to new bus space infrastructure.
 1.6 03-Feb-2003  matt Rename PPC_MPC6XX to PPC_OEA (and any mpc6xx reference to oea).
 1.5 02-Feb-2003  matt Perform a rototill of the powerpc code. Mandate use of SPRG0 to store
a pointer to current cpu's cpu_info structure. Use cpu_info for
intstk,intr_depth,still_stk,idle_pcb,curpcb,curlwp,etal even on
non-MULTIPROCESSOR machines. Add common macros GET_CPUINFO and
INIT_CPUINFO to get and initialize the cpu_info struct on startup. Make
ibm4xx use the standard <powerpc/frame.h>. Use IFRAME_xx in ibm4xx
trap_subr.S instead of explicit magic offsets. Move INTSTK and SPILLSTK
to std.<platform>. Change faultbuf to a struct instead of an array.

On MPC6XX cpus, stop using the vector page for temporary space and use
reserved space in cpu_info.
 1.4 30-Aug-2001  briggs branches: 1.4.6;
- Change default time frequency to 100MHz from 66MHz.
- Support the serial mode interrupts (with a kernel configuration option)
on the Sandpoint X3.
- Initialize cpu_timebase.
- Enable tulip driver.
 1.3 24-Jun-2001  briggs branches: 1.3.2;
Include powerpc/spr.h.
 1.2 10-Jun-2001  briggs branches: 1.2.2;
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.1 01-Jun-2001  simonb Rename assembly files that are pre-processed by cpp to use an S suffix.
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.6.2 30-Aug-2001  briggs - Change default time frequency to 100MHz from 66MHz.
- Support the serial mode interrupts (with a kernel configuration option)
on the Sandpoint X3.
- Initialize cpu_timebase.
- Enable tulip driver.
 1.4.6.1 30-Aug-2001  briggs file locore.S was added on branch nathanw_sa on 2001-08-30 02:08:46 +0000
 1.8.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.16.2 11-Feb-2008  yamt sync with head.
 1.9.16.1 27-Oct-2007  yamt sync with head.
 1.10.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.10.52.1 18-Oct-2007  yamt sync with head.
 1.10.50.2 23-Mar-2008  matt sync with HEAD
 1.10.50.1 06-Nov-2007  matt sync with HEAD
 1.10.48.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.10.38.2 08-May-2007  nisimura - have (restore, indeed) bootinfo capability with some extensions.
Would bring true ELF symbol table loading, machdep HW paramters,
console designation, and rootdev selection by device_register().
Compatiblity for non bootinfo-ware loader, like DINK32, is
maintained.
- prepare to have MPC8245 buildin serial console support.
- abandon NVGA > 0 configuration.
 1.10.38.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- make sure locore.S to clear BSS before use. remove defunct intrnames.
- make machdep.c and mainbus.c similiar to prep.
- adapt powerpc/pic scheme.
 1.10.30.1 23-Oct-2007  ad Sync with head.
 1.11.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.12.8.1 18-May-2008  yamt sync with head.
 1.12.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.12.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.20.1 07-Jan-2011  matt Deal with split <spr.h>
 1.13.10.2 03-Mar-2009  skrll Sync with HEAD.
 1.13.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.13.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.13.2.2 11-Mar-2010  yamt sync with head
 1.13.2.1 04-May-2009  yamt sync with head.
 1.14.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.16.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.19.4.1 06-Jun-2011  jruoho Sync with HEAD.
 1.19.2.2 21-Apr-2011  rmind sync with head
 1.19.2.1 05-Mar-2011  rmind sync with head
 1.21.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.23.16.1 18-May-2014  rmind sync with head
 1.23.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.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.24.30.1 10-Jun-2019  christos Sync with HEAD
 1.24.28.1 28-Jul-2018  pgoyette Sync with HEAD
 1.25.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 01-Jun-2001  simonb Rename assembly files that are pre-processed by cpp to use an S suffix.
 1.2 25-Feb-2001  matt Use common switch / setfault / trampoline code. (except amigappc because
it doesn't use trap_subr.S either).
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file locore.s was added on branch thorpej_scsipi on 2001-02-11 19:12:08 +0000
 1.70 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.69 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.68 17-Mar-2021  rin Switch to intr_establish_xname().
 1.67 15-Jul-2018  maxv branches: 1.67.12;
Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.66 22-Dec-2016  cherry branches: 1.66.14; 1.66.16;
switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.65 30-Sep-2015  phx branches: 1.65.2;
Now more than a single I2C device per model may be configured directly.
An additional flags argument makes the configuration depend on the model-
flags in an optional BTINFO_MODEL bootinfo node.
Print the model name together with the vendor name, when known.
 1.64 07-Sep-2015  phx Fix nor-flash bus space: extent limit should not be zero and bus space is
definitely big-endian. Reading the flash via /dev/flash0 works now.
Writing is untested.
 1.63 21-Apr-2013  kiyohara branches: 1.63.10; 1.63.12;
Fix hangup to interrupt on cascading PIC.
tested on bebox and evbppc/OPENBLOCKS600.
 1.62 10-Feb-2012  phx branches: 1.62.6;
oea_batinit() demands a minimum block size of 8M now. OK by releng@.
 1.61 14-Jan-2012  phx New device nhpow(4) to support the onboard GPIO pins on a NH230/231 board for
buttons, powerdown, reset, LEDs and fan control. It attaches gpio(4) for
its 8 pins on demand.
 1.60 17-Dec-2011  phx Added NOR flash driver, using nor(4) and flash(4).
 1.59 22-Nov-2011  phx branches: 1.59.2;
Print "Model:" information with oea_startup().
 1.58 13-Aug-2011  christos branches: 1.58.2;
Always provide a meaningful short name for the kobj in the error message,
as well as the function name and the linenumber, without extra line feeds.
 1.57 20-Jun-2011  matt Cleanup includes. (<net/netisr.h> is handled by softints, not MD anymore,
so this can be nuked).
 1.56 19-Apr-2011  phx branches: 1.56.2;
Make it compile when no kernel symbols and no debugger is configured.
 1.55 12-Mar-2011  phx The DSM-G600's satellite microcontroller provides no possibility to reboot
or powerdown the board, so we can only support reboot by falling back to
a default reboot procedure.
The default procedure will turn off interrupts and the MMU, then jump
through the firmware's reset vector (0xfff00100).
 1.54 12-Jan-2011  nisimura branches: 1.54.2;
- remove duplicate an opt include line.
- restore a lost indent.
 1.53 11-Jan-2011  nisimura step forward to MODULAR sandpoint kernel. disabled until all work gets done.
 1.52 20-Dec-2010  matt Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.51 29-May-2010  phx 'satmgr' device for communicating with the satellite processor found on many
MPC824x-based systems. It registers the power button to sysmon and sets
a reboot/shutdown callback for cpu_reboot(). Other functions can be controlled
through /dev/satmgr.
Currently there is support for KuroBox and Synology, which will be extended
as soon more platforms have been reasearched.
This patch was submitted by Toru Nishimura.
 1.50 20-May-2010  phx Netboot generates a BTINFO_PRODFAMILY boot-info which specifies the family
name of the board. The kernel uses this information to make a new sysctl
entry called machdep.prodfamily.
 1.49 27-Nov-2009  rmind branches: 1.49.2; 1.49.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.48 19-Aug-2009  nisimura - use options PIC_MPCSOC to replace PIC_OPENPIC.
 1.47 03-Jul-2009  nisimura - replace splhigh() call with splraise(-1), requested by kiyohara.
 1.46 13-Feb-2009  apb Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
 1.45 30-Nov-2008  martin branches: 1.45.4;
As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
 1.44 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.43 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.42 19-Apr-2008  nisimura branches: 1.42.2; 1.42.4; 1.42.8; 1.42.10;
porting explanation take 2 after an accidental quit from CVS editor.
- target differences are considered minor and adaptable by heuristics
in pci/pci_machdep.c and machdep.c.
- kernel expects sane runtime HW settings when it gains control.
All tweaks should have been completed by bootloader.
- consults stand/ for reference. The implementation will change
from time to time.

communications to power control satelite processor is to be done by
a kernel thread and sysctl knobs with help of possible user agent
deamon.
 1.41 19-Apr-2008  nisimura bootinfo usage and porting guide.
- Kernel expects a ptr to bootinfo structure in arg3.
- The bootinfo definition is in include/bootinfo.h
- CLOCK and CONSOLE designations are important during initial bringup
efforts. machdep.c consults memory controller parameters when no
MEMORY was specified.
- autoconf.c determines ROOTDEVICE and BOOTPATH.
- target differences
 1.40 12-Dec-2007  nisimura branches: 1.40.6; 1.40.8;
remove EUMBBAR register debugging stuff. It should be ok when the
control reachs here.
 1.39 27-Oct-2007  nisimura branches: 1.39.4; 1.39.6; 1.39.8;
redo again the arrangement.
 1.38 27-Oct-2007  nisimura rearrange lines to make the previous change easy to understand.
 1.37 27-Oct-2007  nisimura - an inch forward southbridge-less configuration.
- make sure to have a fallback default for the case when no bootinfo
was prepared by a bootloader.
 1.36 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.35 09-Feb-2007  ad branches: 1.35.6; 1.35.14; 1.35.22; 1.35.24; 1.35.26; 1.35.28;
Merge newlock2 to head.
 1.34 07-Sep-2006  dogcow branches: 1.34.2;
remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP.
 1.33 24-Dec-2005  perry branches: 1.33.4; 1.33.8;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.32 11-Dec-2005  christos merge ktrace-lwp.
 1.31 14-Feb-2004  bjh21 branches: 1.31.16;
Add a new MI attribute, pckbc_machdep_cnattach, and change pckbc_cnattach()
to only call pckbc_machdep_cnattach() if this is present. This allows
pckbc_machdep_cnattach() to be omitted entirely on most ports, where it only
returns ENXIO anyway.

The devices with this attribute at the moment are pc(4) on i386 and bebox, and
pckbc on sparc, where pckbc_machdep_cnattach() mysteriously returns 0 rather
than ENXIO.
 1.30 09-Feb-2004  bjh21 Remove pcconskbd(4) support code since this port doesn't have pcconskbd(4)
and the code was conditional on a macro that was never defined anyway.
 1.29 20-Oct-2003  matt Reorganize the way powerpc port install machine specific headers.
Use <powerpc/oea/bat.h> exclusively and remove <machine/bat.h> and
<powerpc/bat.h>. Remove unneeded <machine/cpufunc.h>. To insure
1:1 correspondence of <powerpc/FOO.h> to <machine/FOO.h> include
"../../powerpc/include/Makefile" in "arch/FOO/include/Makefile".
Incororpate <byte_swap.h> into <bswap.h> and then byte_swap.h
 1.28 15-Jul-2003  lukem __KERNEL_RCSID()
 1.27 14-Jun-2003  thorpej branches: 1.27.2;
Also pass a type argument to comcnattach() and com_kgdb_attach().
comspeed() (and thus cominit()) may need this information.
 1.26 26-Apr-2003  ragge Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.25 18-Mar-2003  matt Switch/adapt to new bus space infrastructure.
 1.24 03-Feb-2003  matt Rename PPC_MPC6XX to PPC_OEA (and any mpc6xx reference to oea).
 1.23 22-Jan-2003  kleink G/c the pmap_bootstrap() segtab interface again. Silly me.
 1.22 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.21 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.20 05-Jul-2002  matt Peform a rototill over the powerpc-based ports.

Move the trap/vector initialization for MPC6xx ports to mpc6xx_machdep.c
Also move softnet, install_extintr, mapiodev, kvtop. Add common BAT
initialization code.

Add user Altivec support.

Fix calls to OF_call_method in macppc/macppc/machdep.c.

Use ci_fpuproc in cpu_info instead of separate fpuproc.

Add separate syscall.c and defined __HAVE_SYSCALL_INTERN.
 1.19 13-May-2002  matt branches: 1.19.2;
Remove redundant declarations.
 1.18 23-Apr-2002  kleink Add a third argument to pmap_bootstrap() which platform-specific
initialization can use to specify additional segment registers to be set
up in the kernel pmap.
 1.17 05-Mar-2002  briggs Add BAT_G for EUMB (incl. I/O) space. Per matt@netbsd.org's macppc change.
 1.16 10-Sep-2001  chris branches: 1.16.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.15 30-Aug-2001  briggs branches: 1.15.2;
- Change default time frequency to 100MHz from 66MHz.
- Support the serial mode interrupts (with a kernel configuration option)
on the Sandpoint X3.
- Initialize cpu_timebase.
- Enable tulip driver.
 1.14 26-Aug-2001  matt Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.13 24-Aug-2001  chs use pmap_k* for buffer cache pages.
 1.12 22-Jul-2001  wiz bcopy -> memcpy, bzero -> memset
 1.11 10-Jun-2001  briggs branches: 1.11.2;
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.10 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.9 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.8 15-Mar-2001  chs eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.7 06-Mar-2001  briggs Disable interrupts during autoconf.
Move identifycpu() from machdep.c to autoconf.c, make it table-driven, and
add a few more models to it.
 1.6 26-Feb-2001  briggs branches: 1.6.2;
Remove dump stuff that is now in powerpc_machdep.
 1.5 24-Feb-2001  matt Move cpu_sysct and dump{mag,lo,siz} & cpu_dumpconf to powerpc_machdep.c.
dumpsys is still port-specific for now. XXX dumpsys is still a stub
on all powerpc ports.
 1.4 24-Feb-2001  matt Remove setregs since it now lives in powerpc/powerpc/powerpc_machdep.c
 1.3 08-Feb-2001  briggs branches: 1.3.2;
Get rid of warning if no com devices are specified.
 1.2 05-Feb-2001  briggs Tsubai has convinced me that openpic_init() should remain machine-dependant
as the details might differ between archs, and passing the various options
leads to some clutter.
 1.1 04-Feb-2001  briggs Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.3.2.5 27-Mar-2001  bouyer Sync with HEAD.
 1.3.2.4 23-Mar-2001  bouyer Make sure files that shouldn't change are identical to HEAD.
 1.3.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.3.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.3.2.1 08-Feb-2001  bouyer file machdep.c was added on branch thorpej_scsipi on 2001-02-11 19:12:09 +0000
 1.6.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.6.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.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 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.11.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.11.2.1 03-Aug-2001  lukem update to -current
 1.15.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.16.4.7 18-Oct-2002  nathanw Catch up to -current.
 1.16.4.6 01-Aug-2002  nathanw Catch up to -current.
 1.16.4.5 20-Jun-2002  nathanw Catch up to -current.
 1.16.4.4 29-May-2002  nathanw #include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)
 1.16.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.16.4.2 05-Nov-2001  briggs Initial SA support for ppc. Test-booted on sandpoint, macppc, & walnut.
mcontext and cpu_getmcontext()/cpu_setmcontext() from Klaus Klein
<kleink@netbsd.org>.
 1.16.4.1 10-Sep-2001  briggs file machdep.c was added on branch nathanw_sa on 2001-11-05 19:46:21 +0000
 1.19.2.1 17-Jul-2002  gehenna catch up with -current.
 1.27.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.27.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.27.2.1 03-Aug-2004  skrll Sync with HEAD
 1.31.16.5 21-Jan-2008  yamt sync with head
 1.31.16.4 27-Oct-2007  yamt sync with head.
 1.31.16.3 26-Feb-2007  yamt sync with head.
 1.31.16.2 30-Dec-2006  yamt sync with head.
 1.31.16.1 21-Jun-2006  yamt sync with head.
 1.33.8.1 14-Sep-2006  yamt sync with head.
 1.33.4.1 09-Sep-2006  rpaulo sync with head
 1.34.2.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.35.28.2 13-Nov-2007  bouyer Sync with HEAD
 1.35.28.1 25-Oct-2007  bouyer Sync with HEAD.
 1.35.26.1 18-Oct-2007  yamt sync with head.
 1.35.24.2 09-Jan-2008  matt sync with HEAD
 1.35.24.1 06-Nov-2007  matt sync with HEAD
 1.35.22.2 28-Oct-2007  joerg Sync with HEAD.
 1.35.22.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.35.14.13 28-May-2007  nisimura - necessary to have a global variable primary_pic updated to make
i8259 cascaded thru EPIC.
 1.35.14.12 26-May-2007  nisimura - fix oea_batinit() usage error introduced by me. add more descriptive
comments to make the aim clear. now comcnattach() works again.
- some cosmetic cleanup for consistent coding style.
 1.35.14.11 25-May-2007  nisimura - revert the way to initialize extents. The DINK32/U-Boot follows such
the PCI convention of 0-origin PCI io space address enumeration.
- adjust the lowest PCI io address assignment for PCI_NETBSD_CONFIGURE
case.
 1.35.14.10 23-May-2007  nisimura - add mpc107memsize() to determine the amount of SDRAM.
Assuptions, reasonable among popular products I think of, are;
1. upto 4 SDRAM banks are populated.
2. these banks are used in ascending order to make a contiguos space.
 1.35.14.9 23-May-2007  nisimura Add dbg console. DDB is now available while being in initppc().
 1.35.14.8 23-May-2007  nisimura - pci_machdep.c tries to fixup PCI stuff by identifying the target with
some heuristics.
- have eumb device nodes for bus.h and mainbus.c and machdep.c.
 1.35.14.7 10-May-2007  garbled HAVE_GENERIC_SOFTINTRS is no longer optional. Delete ifndef'd code from
oea_machdep.c, and move softintr__init() to oea_startup(). Remove
softintr__init from every port's cpu_startup().
 1.35.14.6 10-May-2007  garbled More cleanup:
1) Remove lcsplx, strayintr, and foosoft from all the converted ports.
None of this stuff is needed anymore.
2) because lcsplx is just "return spllower", just call spllower from
locore_subr.S instead.
3) Every port (except macppc) had a pretty similar cpu_configure(), so
take the common parts out and make a genppc_cpu_configure() in an attempt
to stop using imask[] outside of intr.c
 1.35.14.5 08-May-2007  garbled Make powerpc/intr.h more common than it previously was. Having done
that, delete all the duplicate entries from the 4 ports that have
converted to shared pic code. Also, commit a minor change to sandpoint
that I forgot to commit earlier (delete an unused variable)
 1.35.14.4 08-May-2007  nisimura - have (restore, indeed) bootinfo capability with some extensions.
Would bring true ELF symbol table loading, machdep HW paramters,
console designation, and rootdev selection by device_register().
Compatiblity for non bootinfo-ware loader, like DINK32, is
maintained.
- prepare to have MPC8245 buildin serial console support.
- abandon NVGA > 0 configuration.
 1.35.14.3 07-May-2007  garbled Adapt sandpoint to the changes made to the shared powerpc isa_machdep stuff.
 1.35.14.2 04-May-2007  nisimura - place a comment in machdep.c to tell interrupt number scheme.
- make EPIC register locator valid both for direct and serial mode irq.
- fix a typo (?) in openpicreg.h for OPENPIC_SERIAL_MODE case.
 1.35.14.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- make sure locore.S to clear BSS before use. remove defunct intrnames.
- make machdep.c and mainbus.c similiar to prep.
- adapt powerpc/pic scheme.
 1.35.6.2 03-Dec-2007  ad Sync with HEAD.
 1.35.6.1 23-Oct-2007  ad Sync with head.
 1.39.8.1 13-Dec-2007  bouyer Sync with HEAD
 1.39.6.1 13-Dec-2007  yamt sync with head.
 1.39.4.1 26-Dec-2007  ad Sync with head.
 1.40.8.1 18-May-2008  yamt sync with head.
 1.40.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.40.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.42.10.2 03-Mar-2009  skrll Sync with HEAD.
 1.42.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.42.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.42.4.2 14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.
 1.42.4.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.42.2.5 11-Aug-2010  yamt sync with head.
 1.42.2.4 11-Mar-2010  yamt sync with head
 1.42.2.3 19-Aug-2009  yamt sync with head.
 1.42.2.2 18-Jul-2009  yamt sync with head.
 1.42.2.1 04-May-2009  yamt sync with head.
 1.45.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.49.4.3 21-Apr-2011  rmind sync with head
 1.49.4.2 05-Mar-2011  rmind sync with head
 1.49.4.1 30-May-2010  rmind sync with head
 1.49.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.54.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.56.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.58.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.58.2.1 17-Apr-2012  yamt sync with head
 1.59.2.1 18-Feb-2012  mrg merge to -current.
 1.62.6.2 03-Dec-2017  jdolecek update from HEAD
 1.62.6.1 23-Jun-2013  tls resync from head
 1.63.12.3 05-Feb-2017  skrll Sync with HEAD
 1.63.12.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.63.12.1 22-Sep-2015  skrll Sync with HEAD
 1.63.10.1 04-Nov-2015  riz Pull up following revision(s) (requested by phx in ticket #976):
sys/arch/sandpoint/sandpoint/mainbus.c: revision 1.30
sys/arch/sandpoint/sandpoint/machdep.c: revision 1.64
sys/arch/sandpoint/sandpoint/flash_cfi.c: revision 1.4
Fix nor-flash bus space: extent limit should not be zero and bus space is
definitely big-endian. Reading the flash via /dev/flash0 works now.
Writing is untested.
 1.65.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.66.16.1 10-Jun-2019  christos Sync with HEAD
 1.66.14.1 28-Jul-2018  pgoyette Sync with HEAD
 1.67.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.35 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.34 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.33 24-Apr-2021  thorpej branches: 1.33.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.32 07-Jul-2020  thorpej branches: 1.32.4;
Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.
 1.31 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.30 07-Sep-2015  phx Fix nor-flash bus space: extent limit should not be zero and bus space is
definitely big-endian. Reading the flash via /dev/flash0 works now.
Writing is untested.
 1.29 31-Jan-2012  phx branches: 1.29.6; 1.29.22; 1.29.24;
Print MPC8245 cpu speed. We can calculate it using the PLL ratio.
 1.28 27-Jan-2012  para converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.27 14-Jan-2012  phx New device nhpow(4) to support the onboard GPIO pins on a NH230/231 board for
buttons, powerdown, reset, LEDs and fan control. It attaches gpio(4) for
its 8 pins on demand.
 1.26 18-Dec-2011  phx Replaced conf_args by mainbus_attach_args.
 1.25 17-Dec-2011  phx Added NOR flash driver, using nor(4) and flash(4).
 1.24 01-Jul-2011  dyoung branches: 1.24.2; 1.24.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.23 05-Jun-2011  matt struct device * -> device_t, struct cfdata * -> cfdata_t
CFATTACH_DECL(*, sizeof(struct device), -> CFATTACH_DECL_NEW(&, 0
 1.22 17-May-2011  dyoung branches: 1.22.2;
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.21 14-Mar-2009  dsl branches: 1.21.4; 1.21.6;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.20 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.19 17-Oct-2007  garbled branches: 1.19.20; 1.19.28; 1.19.34;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.18 11-Dec-2005  christos branches: 1.18.30; 1.18.38; 1.18.48; 1.18.50; 1.18.52; 1.18.54;
merge ktrace-lwp.
 1.17 30-Aug-2004  drochner branches: 1.17.12;
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.16 29-Jul-2004  drochner remove some typecasts to "cfmatch_t" which are obviously relicts from
__BROKEN_INDIRECT_CONFIG times
 1.15 15-Jul-2003  lukem __KERNEL_RCSID()
 1.14 15-Jun-2003  fvdl branches: 1.14.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.13 02-Feb-2003  matt Perform a rototill of the powerpc code. Mandate use of SPRG0 to store
a pointer to current cpu's cpu_info structure. Use cpu_info for
intstk,intr_depth,still_stk,idle_pcb,curpcb,curlwp,etal even on
non-MULTIPROCESSOR machines. Add common macros GET_CPUINFO and
INIT_CPUINFO to get and initialize the cpu_info struct on startup. Make
ibm4xx use the standard <powerpc/frame.h>. Use IFRAME_xx in ibm4xx
trap_subr.S instead of explicit magic offsets. Move INTSTK and SPILLSTK
to std.<platform>. Change faultbuf to a struct instead of an array.

On MPC6XX cpus, stop using the vector page for temporary space and use
reserved space in cpu_info.
 1.12 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.11 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.10 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 16-May-2002  thorpej branches: 1.8.2;
* 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.7 28-Nov-2001  thorpej Add a "cacheline_size" argument to pci_configure_bus(). It is used
to set the cacheline size in the BHLC register. This should be the
size of the largest D-cache line on a system.
 1.6 09-Nov-2001  thorpej Add a "firstbus" argument to pci_configure_bus(), indicating the
first bus number to use, rather than always assuming that we should
start at bus #0.
 1.5 26-Aug-2001  matt branches: 1.5.4; 1.5.6;
Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.4 10-Jun-2001  briggs branches: 1.4.2;
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
 1.3 07-Mar-2001  briggs Set the PCI mem tag to 0. The BAR already contains the value that was here.
 1.2 08-Feb-2001  briggs branches: 1.2.2; 1.2.4;
Make it a #error to define PCI without PCI_NETBSD_CONFIGURE.
 1.1 04-Feb-2001  briggs Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.2.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.2.4.1 09-Apr-2001  nathanw Catch up with -current.
 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 08-Feb-2001  bouyer file mainbus.c was added on branch thorpej_scsipi on 2001-02-11 19:12:09 +0000
 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 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 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.5.6.5 03-Jan-2003  thorpej Sync with HEAD.
 1.5.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.5.6.3 20-Jun-2002  nathanw Catch up to -current.
 1.5.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.6.1 26-Aug-2001  nathanw file mainbus.c was added on branch nathanw_sa on 2002-01-08 00:27:24 +0000
 1.5.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.8.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.8.2.1 16-May-2002  thorpej file mainbus.c was added on branch gehenna-devsw on 2002-05-16 01:01:40 +0000
 1.14.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.14.2.2 03-Sep-2004  skrll Sync with HEAD
 1.14.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.12.1 27-Oct-2007  yamt sync with head.
 1.18.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.18.52.1 18-Oct-2007  yamt sync with head.
 1.18.50.1 06-Nov-2007  matt sync with HEAD
 1.18.48.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.18.38.4 25-May-2007  nisimura - revert the way to initialize extents. The DINK32/U-Boot follows such
the PCI convention of 0-origin PCI io space address enumeration.
- adjust the lowest PCI io address assignment for PCI_NETBSD_CONFIGURE
case.
 1.18.38.3 23-May-2007  nisimura - pci_machdep.c tries to fixup PCI stuff by identifying the target with
some heuristics.
- have eumb device nodes for bus.h and mainbus.c and machdep.c.
 1.18.38.2 09-May-2007  nisimura allow ENCPP1 to have no PCI_NETBSD_CONFIGURE to adapt a smart booloader
performs PCI device configuration before exec'ing kernels.
 1.18.38.1 04-May-2007  nisimura NetBSD/sandpoint steps forward to ppcoea-renovation.
- make sure locore.S to clear BSS before use. remove defunct intrnames.
- make machdep.c and mainbus.c similiar to prep.
- adapt powerpc/pic scheme.
 1.18.30.1 23-Oct-2007  ad Sync with head.
 1.19.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.19.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.19.20.1 04-May-2009  yamt sync with head.
 1.21.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.21.4.2 12-Jun-2011  rmind sync with head
 1.21.4.1 31-May-2011  rmind sync with head
 1.22.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.24.6.1 18-Feb-2012  mrg merge to -current.
 1.24.2.1 17-Apr-2012  yamt sync with head
 1.29.24.1 22-Sep-2015  skrll Sync with HEAD
 1.29.22.1 04-Nov-2015  riz Pull up following revision(s) (requested by phx in ticket #976):
sys/arch/sandpoint/sandpoint/mainbus.c: revision 1.30
sys/arch/sandpoint/sandpoint/machdep.c: revision 1.64
sys/arch/sandpoint/sandpoint/flash_cfi.c: revision 1.4
Fix nor-flash bus space: extent limit should not be zero and bus space is
definitely big-endian. Reading the flash via /dev/flash0 works now.
Writing is untested.
 1.29.6.1 03-Dec-2017  jdolecek update from HEAD
 1.32.4.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.33.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.3 24-Apr-2021  thorpej branches: 1.3.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.2 17-Mar-2021  rin branches: 1.2.2;
Switch to intr_establish_xname().
 1.1 14-Jan-2012  phx branches: 1.1.4; 1.1.6; 1.1.64;
New device nhpow(4) to support the onboard GPIO pins on a NH230/231 board for
buttons, powerdown, reset, LEDs and fan control. It attaches gpio(4) for
its 8 pins on demand.
 1.1.64.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 14-Jan-2012  yamt file nhpow.c was added on branch yamt-pagecache on 2012-04-17 00:06:50 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 14-Jan-2012  mrg file nhpow.c was added on branch jmcneill-usbmp on 2012-02-18 07:33:04 +0000
 1.2.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.3.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 05-Mar-2003  matt Remove port-specific procfs_machdep.c (since they are all identical and
a better one resides in powerpc/powerpc/).
 1.1 04-Feb-2001  briggs branches: 1.1.2;
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module. See the README for more information.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 04-Feb-2001  bouyer file procfs_machdep.c was added on branch thorpej_scsipi on 2001-02-11 19:12:09 +0000
 1.31 26-Sep-2021  thorpej Change the kqueue filterops::f_isfd field to filterops::f_flags, and
define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd.
Field and flag name aligned with OpenBSD.

This does not constitute a functional or ABI change, as the field location
and size, and the value placed in that field, are the same as the previous
code, but we're bumping __NetBSD_Version__ so 3rd-party module source code
can adapt, as needed.

NetBSD 9.99.89
 1.30 17-Mar-2021  rin Switch to intr_establish_xname().
 1.29 04-Jan-2021  thorpej Use sel{record,remove}_knote().
 1.28 03-Sep-2018  riastradh branches: 1.28.12;
Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.27 25-Oct-2017  maya branches: 1.27.2; 1.27.4;
Use C99 initializer for filterops

Mostly done with spatch with touchups for indentation

@@
expression a;
identifier b,c,d;
identifier p;
@@
const struct filterops p =
- { a, b, c, d
+ {
+ .f_isfd = a,
+ .f_attach = b,
+ .f_detach = c,
+ .f_event = d,
};
 1.26 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.25 16-Mar-2014  dholland branches: 1.25.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.24 19-Feb-2013  phx branches: 1.24.2;
Implement real hardware power-off for DSM-G600 using the "ZWC" command.
It seems that not all microcontrollers support the command, though, so
the old solution to flash the power LED is still present as a fallback.
 1.23 15-May-2012  nisimura branches: 1.23.2;

A temporaly fix to avoid a lockup by KBT4 DISP button. Not sure
the real fix. Curse on the every poorly written engineering
documents on Earth.
 1.22 11-May-2012  nisimura A temporary solution to have KURO-BOX/T4 two way "dialogue" style
sat protocol. Need more work for robustness. Unbreak the previous
commit made by accident.
 1.21 11-May-2012  nisimura make sure to have the correct I2C TOD attached for KURO-BOX/T4.
 1.20 24-Apr-2012  nisimura Quick fixes to make KURO-BOX/T4 "miconv2" power management work.
The patch was supplied by mef@.
 1.19 16-Apr-2012  nisimura Preliminary support of TS-TGL/KBT4 power down operation.
 1.18 09-Apr-2012  nisimura Change to use "kurot4" product name for Terastation TGL and
KuroBox/T4.
 1.17 08-Apr-2012  nisimura Add an entry for "miconv2" satellite processor control. The button
press event handler remains unimplemented for now. Use /dev/satmgr
to talk the processor.
 1.16 22-Feb-2012  nisimura - fix an error which prevents satmgr from sending NUL bytes.
- a bit cosmetic change for IOMEGA multibyte control sequence.
 1.15 23-Jan-2012  phx branches: 1.15.2;
Insert some missing aprint_naive().
 1.14 29-Dec-2011  phx Replaced 16 by I8259_ICU in intr_establish().
 1.13 12-Nov-2011  phx branches: 1.13.4;
Add Iomega support (init, reboot, poweroff).
Make new sysctl-nodes for Iomega fan control in machdep.satmgr.
 1.12 01-Jul-2011  dyoung branches: 1.12.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.11 19-Apr-2011  phx It is probably better to flash the power LED after power-off on a DSM-G600,
to make the user aware that he needs to remove power manually.
 1.10 17-Apr-2011  phx DSM-G600: Turn off all LEDs when shutting down, to indicate the device
can be switched off.
 1.9 10-Apr-2011  phx Missing comma. Make it compile again.
 1.8 08-Apr-2011  nisimura Minor format knots; sort a model list in alphabetical order and adjust
spacing.
 1.7 26-Mar-2011  phx Add QNAP reboot, reset and button handling functions.
Introduced an optional init function per board, which can set LEDs and other
special hardware to an initial state using the satellite processor.
 1.6 12-Mar-2011  phx The DSM-G600's satellite microcontroller provides no possibility to reboot
or powerdown the board, so we can only support reboot by falling back to
a default reboot procedure.
The default procedure will turn off interrupts and the MMU, then jump
through the firmware's reset vector (0xfff00100).
 1.5 09-Mar-2011  phx DLink DSM-G600 button handling.
There are no commands to reboot or poweroff a G600, though.
 1.4 24-Feb-2011  phx Print "interrupting at". Improved style guide conformance.
 1.3 10-Feb-2011  nisimura - add D-Link EPIC defition to pci_machdep.c
- change the way to reboot/pwroff to make satmgr.c more flexible for
a multiple byte sat protocol.
 1.2 03-Jun-2010  phx branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8;
Applied a patch by Toru Nishimura:
Fixed kmutex usage error and replaced tsleep by cv_waitsig.
Now "cat /dev/satmgr" no longer panics when pressing a button.
 1.1 29-May-2010  phx branches: 1.1.2;
'satmgr' device for communicating with the satellite processor found on many
MPC824x-based systems. It registers the power button to sysmon and sets
a reboot/shutdown callback for cpu_reboot(). Other functions can be controlled
through /dev/satmgr.
Currently there is support for KuroBox and Synology, which will be extended
as soon more platforms have been reasearched.
This patch was submitted by Toru Nishimura.
 1.1.2.5 21-Apr-2011  rmind sync with head
 1.1.2.4 05-Mar-2011  rmind sync with head
 1.1.2.3 03-Jul-2010  rmind sync with head
 1.1.2.2 30-May-2010  rmind sync with head
 1.1.2.1 29-May-2010  rmind file satmgr.c was added on branch rmind-uvmplock on 2010-05-30 05:17:05 +0000
 1.2.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.2.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.2.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.4.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.2.4.1 03-Jun-2010  uebayasi file satmgr.c was added on branch uebayasi-xip on 2010-08-17 06:45:08 +0000
 1.2.2.2 11-Aug-2010  yamt sync with head.
 1.2.2.1 03-Jun-2010  yamt file satmgr.c was added on branch yamt-nfs-mp on 2010-08-11 22:52:39 +0000
 1.12.2.3 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12.2.2 23-May-2012  yamt sync with head.
 1.12.2.1 17-Apr-2012  yamt sync with head
 1.13.4.4 02-Jun-2012  mrg sync to latest -current.
 1.13.4.3 29-Apr-2012  mrg sync to latest -current.
 1.13.4.2 24-Feb-2012  mrg sync to -current.
 1.13.4.1 18-Feb-2012  mrg merge to -current.
 1.15.2.1 23-Feb-2012  riz Pull up following revision(s) (requested by nisimura in ticket #35):
sys/arch/sandpoint/sandpoint/satmgr.c: revision 1.16
- fix an error which prevents satmgr from sending NUL bytes.
- a bit cosmetic change for IOMEGA multibyte control sequence.
 1.23.2.3 03-Dec-2017  jdolecek update from HEAD
 1.23.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.2.1 25-Feb-2013  tls resync with head
 1.24.2.1 18-May-2014  rmind sync with head
 1.25.2.1 10-Aug-2014  tls Rebase.
 1.27.4.1 10-Jun-2019  christos Sync with HEAD
 1.27.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.28.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.1 20-Jul-2009  nisimura branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
- fix rge.c breakage.
- stand/netboot is reported working for KuroBox and TeraStatation.
Some more fixes will follow.
- withdraw files which remain work-in-progress for now.
 1.1.10.1 08-Feb-2011  bouyer Sync with HEAD
 1.1.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.1 05-Mar-2011  rmind sync with head
 1.1.2.2 19-Aug-2009  yamt sync with head.
 1.1.2.1 20-Jul-2009  yamt file Makefile was added on branch yamt-nfs-mp on 2009-08-19 18:46:43 +0000
 1.2 28-Aug-2016  christos NOPIE here too
 1.1 28-Jan-2011  phx branches: 1.1.2; 1.1.4; 1.1.8; 1.1.20; 1.1.38;
Included sys/arc/sandpoint/stand/altboot in the build process.
Install altboot and altboot.bin in /usr/mdec and copy them also into the
installation directory of the sandpoint release.
 1.1.38.1 05-Oct-2016  skrll Sync with HEAD
 1.1.20.1 03-Dec-2017  jdolecek update from HEAD
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 28-Jan-2011  jruoho file Makefile.inc was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.1.4.2 05-Mar-2011  rmind sync with head
 1.1.4.1 28-Jan-2011  rmind file Makefile.inc was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.1.2.2 08-Feb-2011  bouyer Sync with HEAD
 1.1.2.1 28-Jan-2011  bouyer file Makefile.inc was added on branch bouyer-quota2 on 2011-02-08 16:19:37 +0000
 1.19 09-Feb-2024  christos PR/57915: Jan-Benedict Glaw: Use $MKREPRO_TIMESTAMP for repro builds in uBoot
images
 1.18 24-Mar-2021  rin Remove "lib" directory for cleandir.
 1.17 08-Apr-2017  christos branches: 1.17.26; 1.17.28;
centralize vers.c building for standalone programs.
 1.16 10-Aug-2014  joerg branches: 1.16.4; 1.16.8; 1.16.12;
Put GCC/GAS options under ACTIVE_CC == "gcc".
 1.15 08-Aug-2014  joerg Don't set -mmultiple or -mno-string for PowerPC, the difference is too
small to really matter and it sometimes even increases the size.
 1.14 12-Jan-2014  tsutsui branches: 1.14.2;
Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

XXX: probabry we should have bsd.saprog.mk or something.
 1.13 21-Aug-2013  matt Use <bsd.klinks.mk>
 1.12 30-Oct-2011  phx branches: 1.12.2; 1.12.12; 1.12.16;
Make sure to disable interrupts, as U-Boot may call us with interrupts
enabled, causing quite unpleasant effects (e.g. by decrementer interrupts).

When DEBUG is defined, an exception handler will be installed, which reports
about all exceptions while altboot is running, including register dump and
stack frame backtrace.
 1.11 25-May-2011  phx branches: 1.11.4;
Use printf() from libsa.
Ok by nisimura@.
 1.10 06-Mar-2011  phx Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.9 06-Mar-2011  phx branches: 1.9.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.8 26-Feb-2011  phx branches: 1.8.2;
Build altboot.img, which fakes a Linux kernel module, loadable with "bootm",
for extremely stripped U-Boot firmware. Arguments are passed through the
"bootargs" environment variable, which is detected automatically when
using bootm.
The startup code also fixes a bug in bootm, which doesn't flush the cache
before running the image.
 1.7 28-Jan-2011  phx Included sys/arc/sandpoint/stand/altboot in the build process.
Install altboot and altboot.bin in /usr/mdec and copy them also into the
installation directory of the sandpoint release.
 1.6 27-Jan-2011  phx Some cleanup. No functional change.
 1.5 27-Jan-2011  nisimura remove an excess echo line accidentally creeped in.
 1.4 27-Jan-2011  nisimura arrange vers.c generation to honour MKREPRO for global build control.
 1.3 26-Jan-2011  nisimura one more twist to complete newvers_stand.sh transition. Include timestamp
in banner.
 1.2 23-Jan-2011  nisimura switch to use newvers_stand.sh as suggested by joerg@
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.8.2.4 31-May-2011  rmind sync with head
 1.8.2.3 21-Apr-2011  rmind sync with head
 1.8.2.2 05-Mar-2011  rmind sync with head
 1.8.2.1 26-Feb-2011  rmind file Makefile was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.9.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.9.2.1 06-Mar-2011  bouyer file Makefile was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.11.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.11.4.1 25-May-2011  jruoho file Makefile was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.12.16.2 18-May-2014  rmind sync with head
 1.12.16.1 28-Aug-2013  rmind sync with head
 1.12.12.2 03-Dec-2017  jdolecek update from HEAD
 1.12.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.2.1 10-Aug-2014  tls Rebase.
 1.16.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.16.8.1 26-Apr-2017  pgoyette Sync with HEAD
 1.16.4.1 28-Aug-2017  skrll Sync with HEAD
 1.17.28.1 03-Apr-2021  thorpej Sync with HEAD.
 1.17.26.1 03-Apr-2021  thorpej Sync with HEAD.
 1.11 26-Apr-2012  phx Multiple boot devices and/or paths may be specified, which are booted one
after another until success. When no boot device is specified altboot tries
to boot from all disk devices with a valid NetBSD disklabel, starting with
unit 0.
 1.10 24-Apr-2012  nisimura Add KURO-BOX/T4 vendor custom U-Boot version message.
 1.9 14-Jan-2012  phx Netronics is spelled Netronix.
 1.8 14-Jan-2012  phx Add NH230 PPCboot version.
 1.7 01-Jan-2012  phx Add Iomega StorCenter.
 1.6 13-Nov-2011  phx branches: 1.6.4;
Add DS-106j.
 1.5 02-Jun-2011  phx branches: 1.5.2; 1.5.4;
Add PPCBoot version from DS-207 and CS-407e.
 1.4 19-Apr-2011  phx branches: 1.4.2;
Added a detailed description of altboot command line and boot arguments.
 1.3 08-Apr-2011  phx QNAP support.
Note about the D-Link firmware.
 1.2 13-Mar-2011  phx With the new boot argument "altboot" the program can replace itself with a
new binary while running.
The default boot path was changed from nfs: to wd0:.
Bumped altboot version to 1.7.
 1.1 23-Jan-2011  nisimura branches: 1.1.2; 1.1.4;
change bootloader name to "altboot". bump version and add README.
 1.1.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 23-Jan-2011  bouyer file README.altboot was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.1.2.4 12-Jun-2011  rmind sync with head
 1.1.2.3 21-Apr-2011  rmind sync with head
 1.1.2.2 05-Mar-2011  rmind sync with head
 1.1.2.1 23-Jan-2011  rmind file README.altboot was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.4.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.5.4.2 23-May-2012  yamt sync with head.
 1.5.4.1 17-Apr-2012  yamt sync with head
 1.5.2.2 06-Jun-2011  jruoho Sync with HEAD.
 1.5.2.1 02-Jun-2011  jruoho file README.altboot was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.6.4.2 29-Apr-2012  mrg sync to latest -current.
 1.6.4.1 18-Feb-2012  mrg merge to -current.
 1.42 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.41 16-Feb-2022  riastradh powerpc: Sprinkle "memory" clobbers on eieio and nearby asm blocks.

Otherwise the compiler may reorder these around loads and stores,
which mostly defeats the purpose. `asm volatile' just ensures the
instruction isn't _deleted_; it may still move around.
 1.40 09-Aug-2021  andvar fix various typos in compatibility, mainly in comments.
 1.39 03-Aug-2017  phx Some Synology network devices show vendor 0x1148 (Schneider & Koch) instead
of 0x11ab (Marvell). Detect both.
Improve spinning up of both disk drives on Synology DS20x by adding some
more delays (directly at the start and after powering up the second drive).
 1.38 03-Aug-2017  phx Fixed overflow in delay() for delays greater than 2 seconds.
Replaced u_long by uint32_t and u_quad by uint64_t whenever the exact
32- or 64-bit word is needed.
 1.37 15-Oct-2015  nisimura fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.36 30-Sep-2015  phx Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
 1.35 08-Aug-2014  joerg branches: 1.35.2; 1.35.4;
Use __unreachable().
 1.34 05-Aug-2014  joerg Don't use non-literal strings as format strings.
XXX Switch to strlcpy.
 1.33 07-Nov-2013  nisimura branches: 1.33.2;

shut off gcc 4.8 unused variable warnings.
 1.32 25-Dec-2012  phx branches: 1.32.2;
QNAP V200 boards have no EEPROM for the MAC address, so all devices default
to the same address (00:e0:4c:69:20:01).
Now we read the real MAC address from the flash ROM. It is stored at the
beginning of a 512-byte block in ASCII format. Some QNAP's have a broken
ext2 file system, so we cannot look for the file ETH0.MAC_ADDR therein,
but have to search the whole flash in 512-byte steps for candidates...
 1.31 16-Apr-2012  phx branches: 1.31.2;
Improved Synology CS/RS support: watch power-state of all SATA drives before
initializing them, configure drive LEDs to reflect SATA activity.
Configure drives on all ATA PCI devices, not only on the first one.
 1.30 09-Apr-2012  nisimura The processor ExtClk value of Kurobox/T4 is comfirmed as 32768000.
 1.29 09-Apr-2012  nisimura Change to use "kurot4" product name for Terastation TGL and
KuroBox/T4.
 1.28 08-Apr-2012  nisimura Add an entry for Terastation TGL miconv2 satellite processor which
features a more complex protocol than Linkstation/Kurobox.
 1.27 14-Jan-2012  phx branches: 1.27.2;
Netronics is spelled Netronix.
 1.26 14-Jan-2012  phx Add 0x70000000 BAT-mapping for NH230/231.
NH23x: Initialize LEDs on startup (status off, to indicate the bootloader
is running). Hardware reset routine.
 1.25 08-Jan-2012  phx Set the extclk for NH230 to 33000000Hz.
Prepare a synosetup() function which should set a different extclk for
the 400MHz models, as soon as we find a method to check for them.
 1.24 07-Jan-2012  phx NH230 PPCBoot configures the memory boundary registers for 128MB, although
the board has only 64MB. Fix that.
 1.23 12-Nov-2011  phx branches: 1.23.4;
Improved Iomega microcontroller support. Bumped version to 1.8.
 1.22 07-Nov-2011  phx Fixed Iomega microcontroller support. Implemented Iomega reboot function.
 1.21 06-Nov-2011  phx Added a test terminal for communicating with the satellite microcontroller.
When compiled with DEBUG option it can be entered by typing 'C'.
 1.20 01-Nov-2011  phx branches: 1.20.2;
The Apollo family of IDE interface chips has both channels disabled by
default, so we have to enable them in a new chipfix function. Also move
the channel enable code for the 82C686B from encpcifix() to pciide.c.
 1.19 30-Oct-2011  phx Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.18 29-May-2011  phx branches: 1.18.4;
When PPCBoot supports the SKnet interface it will configure it to automatically
byte-reverse all descriptors by setting a vendor-specific bit in PCI config
space. We have to clear that bit to make sure our driver can send and
receive.
 1.17 26-Apr-2011  phx Priority of QNAP board detection was still too high. It should be lowest,
because a Realtek chip at pci device 15 is used on several boards. Now
NH230/All6250 detection should work again.
 1.16 25-Apr-2011  phx Detect StorCenter before QNAP, otherwise the Realtek NIC will mis-detect as
StorCenter boards as QNAP.
 1.15 17-Apr-2011  phx DSM-G600 has a 33.000 MHz oscillator on board.
 1.14 13-Apr-2011  phx ExtClk for QNAP should be the same as for Synology's 266MHz systems.
This seems logical, as both boards are very similar, and the clock precision
is ok now.
 1.13 09-Apr-2011  phx Set D-Link DSM-G600 power LED to solid green on start.
 1.12 26-Mar-2011  phx QNAP support. Detect wm(4) based V1.02 and re(4) based V200 boards.
That should include all TS-101 and TS-201 models.
Add reset-code and LED-illumination code for the QNAP PIC, which listens
on the second UART with 19200 bps.
 1.11 13-Mar-2011  phx Enter interactive mode, when a key is pressed within two seconds.
 1.10 12-Mar-2011  phx Introduced an optional shutdown function for all network interfaces.
This is needed to stop a NIF and make it return to a known state. A running
NIF may cause all sorts of bad effects, like for example making it impossible
to reboot a board without a hardware-reset function.
 1.9 11-Mar-2011  phx Some code cleanup, suggested by nisimura@.
 1.8 10-Mar-2011  phx Make sure the device class is IDE (class 0, subclass 1), before checking
the PCI interface for native/legacy mode. Different subclasses are always
assumed being in native mode. That makes the Acard IDE controller work.

New macros for PCI interface, revision and class.
 1.7 06-Mar-2011  phx Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.6 06-Mar-2011  phx branches: 1.6.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.5 14-Feb-2011  nisimura branches: 1.5.2;
- add preliminary Netronics NH230 and NH231 supports.
- assign PCI configuration register 0x3c with IDSEL value by PCI framework,
eliminating most of pcifixup() logic in simple NASes.
 1.4 10-Feb-2011  nisimura - some rework for PCI device enumeration.
- allow dual IDE/SATA devices.
- fix a typo of D-Link #define.
 1.3 08-Feb-2011  nisimura - add preliminary code to support D-Link DSM-G600 rev.B NAS.
- it features 9600bps console, Moto MCU on the 2nd DUART channel,
ACARD ATP865 PCIIDE and IP Plus IP1000A GbE. It has MiniPCI
slot.
 1.2 07-Feb-2011  nisimura add IOMEGA StorCenter fixup codes. Need more change as the satellite
microcontroller protocol is defined in 8-byte fixed length sequence.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.5.2.4 31-May-2011  rmind sync with head
 1.5.2.3 21-Apr-2011  rmind sync with head
 1.5.2.2 05-Mar-2011  rmind sync with head
 1.5.2.1 14-Feb-2011  rmind file brdsetup.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.6.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.6.2.1 06-Mar-2011  bouyer file brdsetup.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.18.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.18.4.1 29-May-2011  jruoho file brdsetup.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.20.2.5 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.20.2.4 23-Jan-2013  yamt sync with head
 1.20.2.3 23-May-2012  yamt sync with head.
 1.20.2.2 17-Apr-2012  yamt sync with head
 1.20.2.1 10-Nov-2011  yamt sync with head
 1.23.4.2 29-Apr-2012  mrg sync to latest -current.
 1.23.4.1 18-Feb-2012  mrg merge to -current.
 1.27.2.1 18-Sep-2013  bouyer Pull up following revision(s) (requested by phx in ticket #946):
sys/arch/sandpoint/stand/altboot/rge.c: revision 1.7
sys/arch/sandpoint/stand/altboot/brdsetup.c: revision 1.32
sys/dev/ic/rtl8169.c: revision 1.138
QNAP V200 boards have no EEPROM for the MAC address, so all devices default
to the same address (00:e0:4c:69:20:01).
Now we read the real MAC address from the flash ROM. It is stored at the
beginning of a 512-byte block in ASCII format. Some QNAP's have a broken
ext2 file system, so we cannot look for the file ETH0.MAC_ADDR therein,
but have to search the whole flash in 512-byte steps for candidates...
Make re(4) driver always use IDR register values for its MAC address.
Some sandpoint NAS firmwares set MAC address per their
firmware settings and don't use re(4)'s EEPROM values.
Per rtl8169 manuals re(4) chip reads EEPROM automatically after
hardware reset and Linux driver also uses IDR registers,
so this change should not affect existing other boards
which actually have vaild EEPROM.
Per discussion in old tech-kern@ thread:
http://mail-index.netbsd.org/tech-kern/2012/12/01/msg014573.html
Note rtl81x9.c is still shared among rtk(4) only for a multicast function
(to avoid boring refactoring work).
 1.31.2.3 03-Dec-2017  jdolecek update from HEAD
 1.31.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.31.2.1 25-Feb-2013  tls resync with head
 1.32.2.1 18-May-2014  rmind sync with head
 1.33.2.1 10-Aug-2014  tls Rebase.
 1.35.4.2 28-Aug-2017  skrll Sync with HEAD
 1.35.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.35.2.1 16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.3 05-Aug-2014  joerg Don't use non-literal strings as format strings.
XXX Switch to strlcpy.
 1.2 17-Jul-2011  joerg branches: 1.2.12; 1.2.26;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.1 23-Jan-2011  nisimura branches: 1.1.2; 1.1.4; 1.1.8;
change bootloader name to "altboot". bump version and add README.
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 23-Jan-2011  jruoho file dev_net.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.1.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 23-Jan-2011  bouyer file dev_net.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.1.2.2 05-Mar-2011  rmind sync with head
 1.1.2.1 23-Jan-2011  rmind file dev_net.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.2.26.1 10-Aug-2014  tls Rebase.
 1.2.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 05-Jan-2014  jakllsch Drop duplicate and unused extern global variable.
 1.2 06-Mar-2011  phx branches: 1.2.4; 1.2.6; 1.2.16; 1.2.20;
Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.1 23-Jan-2011  nisimura branches: 1.1.2; 1.1.4;
change bootloader name to "altboot". bump version and add README.
 1.1.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 23-Jan-2011  bouyer file devopen.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.1.2.3 21-Apr-2011  rmind sync with head
 1.1.2.2 05-Mar-2011  rmind sync with head
 1.1.2.1 23-Jan-2011  rmind file devopen.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.2.20.1 18-May-2014  rmind sync with head
 1.2.16.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.4.1 06-Mar-2011  jruoho file devopen.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.19 30-Apr-2022  rin Fix fallout from libsa change; stand.h includes <sys/param.h> now.

Do not use NULL for integer 0.
 1.18 29-Sep-2015  phx The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
 1.17 05-Aug-2014  joerg branches: 1.17.2; 1.17.4;
Don't use non-literal strings as format strings.
XXX Switch to strlcpy.
 1.16 26-Apr-2012  phx branches: 1.16.2; 1.16.12;
Multiple boot devices and/or paths may be specified, which are booted one
after another until success. When no boot device is specified altboot tries
to boot from all disk devices with a valid NetBSD disklabel, starting with
unit 0.
 1.15 09-Apr-2012  nisimura Refactor disklabel decode logic. RAIDFRAME case needs more attention
as it's not certain whether a general solution.
 1.14 22-Jan-2012  phx Cleanup in perform_atareset().
 1.13 22-Jan-2012  phx Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.
 1.12 19-Jan-2012  nisimura Change BTINFO_ROOTDEV to include boot device partition number in
its cookie field to allow a kernel to determine rootdev correctly
when kernel image is loaded from other than 'a' partition.
 1.11 12-Nov-2011  phx branches: 1.11.4;
Add support for IT821x IDE.
 1.10 01-Nov-2011  phx branches: 1.10.2;
The Apollo family of IDE interface chips has both channels disabled by
default, so we have to enable them in a new chipfix function. Also move
the channel enable code for the 82C686B from encpcifix() to pciide.c.
 1.9 30-Oct-2011  phx Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.8 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.7 20-Jun-2011  jdc Add support for booting from RAID 1.
Note, that the RAID partition must be the first partition of the disk.
Reviewed by phx@.
 1.6 08-Jun-2011  phx Support disk units from multiple IDE/SATA PCI controllers.
 1.5 06-Mar-2011  phx branches: 1.5.2; 1.5.4; 1.5.6;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.4 10-Feb-2011  nisimura branches: 1.4.2;
- some rework for PCI device enumeration.
- allow dual IDE/SATA devices.
- fix a typo of D-Link #define.
 1.3 27-Jan-2011  phx Debugging output is only visible when DEBUG is defined.
 1.2 23-Jan-2011  nisimura - add "ll" modifier to printf.
- be more conscious about int type propagation.
- add missing version and newvers.sh
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.4.2.4 12-Jun-2011  rmind sync with head
 1.4.2.3 21-Apr-2011  rmind sync with head
 1.4.2.2 05-Mar-2011  rmind sync with head
 1.4.2.1 10-Feb-2011  rmind file dsk.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.5.6.2 06-Jun-2011  jruoho Sync with HEAD.
 1.5.6.1 06-Mar-2011  jruoho file dsk.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.5.4.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.5.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.5.2.1 06-Mar-2011  bouyer file dsk.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.10.2.2 23-May-2012  yamt sync with head.
 1.10.2.1 17-Apr-2012  yamt sync with head
 1.11.4.2 29-Apr-2012  mrg sync to latest -current.
 1.11.4.1 18-Feb-2012  mrg merge to -current.
 1.16.12.1 10-Aug-2014  tls Rebase.
 1.16.2.2 03-Dec-2017  jdolecek update from HEAD
 1.16.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.17.2.1 16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.6 14-Jan-2012  phx Add 0x70000000 BAT-mapping for NH230/231.
NH23x: Initialize LEDs on startup (status off, to indicate the bootloader
is running). Hardware reset routine.
 1.5 30-Oct-2011  phx branches: 1.5.2; 1.5.6;
Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.4 30-Oct-2011  phx Make sure to disable interrupts, as U-Boot may call us with interrupts
enabled, causing quite unpleasant effects (e.g. by decrementer interrupts).

When DEBUG is defined, an exception handler will be installed, which reports
about all exceptions while altboot is running, including register dump and
stack frame backtrace.
 1.3 13-Mar-2011  phx branches: 1.3.4;
With the new boot argument "altboot" the program can replace itself with a
new binary while running.
The default boot path was changed from nfs: to wd0:.
Bumped altboot version to 1.7.
 1.2 26-Feb-2011  phx branches: 1.2.2; 1.2.4;
Build altboot.img, which fakes a Linux kernel module, loadable with "bootm",
for extremely stripped U-Boot firmware. Arguments are passed through the
"bootargs" environment variable, which is detected automatically when
using bootm.
The startup code also fixes a bug in bootm, which doesn't flush the cache
before running the image.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 26-Feb-2011  bouyer file entry.S was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.2.2.3 21-Apr-2011  rmind sync with head
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 26-Feb-2011  rmind file entry.S was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.3.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.3.4.1 13-Mar-2011  jruoho file entry.S was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.5.6.1 18-Feb-2012  mrg merge to -current.
 1.5.2.1 17-Apr-2012  yamt sync with head
 1.1 30-Oct-2011  phx Make sure to disable interrupts, as U-Boot may call us with interrupts
enabled, causing quite unpleasant effects (e.g. by decrementer interrupts).

When DEBUG is defined, an exception handler will be installed, which reports
about all exceptions while altboot is running, including register dump and
stack frame backtrace.
 1.3 30-Oct-2011  phx Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4; 1.2.8;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.8.1 27-Jan-2011  jruoho file fxp.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file fxp.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file fxp.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.21 30-Sep-2015  phx Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
 1.20 29-Sep-2015  phx The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
 1.19 26-Apr-2012  phx branches: 1.19.2; 1.19.14; 1.19.16;
Multiple boot devices and/or paths may be specified, which are booted one
after another until success. When no boot device is specified altboot tries
to boot from all disk devices with a valid NetBSD disklabel, starting with
unit 0.
 1.18 16-Apr-2012  phx Improved Synology CS/RS support: watch power-state of all SATA drives before
initializing them, configure drive LEDs to reflect SATA activity.
Configure drives on all ATA PCI devices, not only on the first one.
 1.17 08-Apr-2012  nisimura Add an entry for Terastation TGL miconv2 satellite processor which
features a more complex protocol than Linkstation/Kurobox.
 1.16 22-Jan-2012  phx Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.
 1.15 07-Jan-2012  phx NH230 PPCBoot configures the memory boundary registers for 128MB, although
the board has only 64MB. Fix that.
 1.14 06-Nov-2011  phx branches: 1.14.4;
Added a test terminal for communicating with the satellite microcontroller.
When compiled with DEBUG option it can be entered by typing 'C'.
 1.13 30-Oct-2011  phx branches: 1.13.2;
Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.12 26-Mar-2011  phx branches: 1.12.4;
QNAP support. Detect wm(4) based V1.02 and re(4) based V200 boards.
That should include all TS-101 and TS-201 models.
Add reset-code and LED-illumination code for the QNAP PIC, which listens
on the second UART with 19200 bps.
 1.11 13-Mar-2011  phx Enter interactive mode, when a key is pressed within two seconds.
 1.10 12-Mar-2011  phx Introduced an optional shutdown function for all network interfaces.
This is needed to stop a NIF and make it return to a known state. A running
NIF may cause all sorts of bad effects, like for example making it impossible
to reboot a board without a hardware-reset function.
 1.9 10-Mar-2011  phx Make sure the device class is IDE (class 0, subclass 1), before checking
the PCI interface for native/legacy mode. Different subclasses are always
assumed being in native mode. That makes the Acard IDE controller work.

New macros for PCI interface, revision and class.
 1.8 06-Mar-2011  phx Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.7 06-Mar-2011  phx branches: 1.7.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.6 14-Feb-2011  nisimura branches: 1.6.2;
- add preliminary Netronics NH230 and NH231 supports.
- assign PCI configuration register 0x3c with IDSEL value by PCI framework,
eliminating most of pcifixup() logic in simple NASes.
 1.5 10-Feb-2011  nisimura - some rework for PCI device enumeration.
- allow dual IDE/SATA devices.
- fix a typo of D-Link #define.
 1.4 08-Feb-2011  nisimura - add preliminary code to support D-Link DSM-G600 rev.B NAS.
- it features 9600bps console, Moto MCU on the 2nd DUART channel,
ACARD ATP865 PCIIDE and IP Plus IP1000A GbE. It has MiniPCI
slot.
 1.3 27-Jan-2011  phx Debugging output is only visible when DEBUG is defined.
 1.2 23-Jan-2011  nisimura - add "ll" modifier to printf.
- be more conscious about int type propagation.
- add missing version and newvers.sh
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.6.2.3 21-Apr-2011  rmind sync with head
 1.6.2.2 05-Mar-2011  rmind sync with head
 1.6.2.1 14-Feb-2011  rmind file globals.h was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.7.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.7.2.1 06-Mar-2011  bouyer file globals.h was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.12.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.12.4.1 26-Mar-2011  jruoho file globals.h was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.13.2.3 23-May-2012  yamt sync with head.
 1.13.2.2 17-Apr-2012  yamt sync with head
 1.13.2.1 10-Nov-2011  yamt sync with head
 1.14.4.2 29-Apr-2012  mrg sync to latest -current.
 1.14.4.1 18-Feb-2012  mrg merge to -current.
 1.19.16.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.19.14.1 16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.19.2.1 03-Dec-2017  jdolecek update from HEAD
 1.1 23-Jan-2011  nisimura branches: 1.1.2; 1.1.4; 1.1.8;
change bootloader name to "altboot". bump version and add README.
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 23-Jan-2011  jruoho file kse.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.1.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 23-Jan-2011  bouyer file kse.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.1.2.2 05-Mar-2011  rmind sync with head
 1.1.2.1 23-Jan-2011  rmind file kse.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.34 22-Sep-2022  riastradh sandpoint: Teach altboot to handle 9.99.100 modules.

Not tested, but something here will be necessary to make it work, and
the same change does work in x86 efiboot.
 1.33 23-Mar-2021  rin Make this compile with -DDEBUG.
 1.32 23-Mar-2021  rin Make sure not to run kernel if fdloadfile() fails;
it returns *non-zero* value on error.
 1.31 26-Jun-2019  christos branches: 1.31.10; 1.31.12;
make this compile again
 1.30 26-Jun-2019  pgoyette Similar to changes made for x86, allow for the boot-loader to auto-push
a list of modules for file-system support. This allows, for example,
booting from an ext2fs file-system when the kernel has no built-in ufs
or ext2fs modules.

XXX Untested, as I have no sandpoint hardware. I'd appreciate it if
XXX someone with hardware can build and test.
 1.29 08-Feb-2018  dholland branches: 1.29.4;
Typos.
 1.28 11-Jun-2016  dholland PR 51200 gets in libsa considered harmful: use kgets
 1.27 30-Sep-2015  phx Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
 1.26 05-Aug-2014  joerg branches: 1.26.2; 1.26.4;
Don't use non-literal strings as format strings.
XXX Switch to strlcpy.
 1.25 26-Mar-2014  christos branches: 1.25.2;
fix sprintf.
 1.24 22-Mar-2014  jakllsch drop trailing whitespace
 1.23 05-Jan-2014  jakllsch sprinkle const
 1.22 25-Dec-2012  phx branches: 1.22.2;
Add a DEBUG function to search the Flash for byte-streams, as U-Boot usually
doesn't offer a search function.
 1.21 21-May-2012  dsl branches: 1.21.2;
Remove the code that tries to load the "ffs" kernel module during boot.
This is in line with the core decision than even modular kernels should
contain the ffs code.
I've left in the code that tries to load "nfs" and "ext2fs", but it
isn't clear that is necessary.
Removes a warning message that (usually) flashes past to fast to read.
AFAICT all the relevant kernels contain ffs (and nfs for that matter).
 1.20 27-Apr-2012  nisimura Comment improvement. altboot(8) is now aware of the disk removal
for mirrored drive configuration.
 1.19 26-Apr-2012  phx Multiple boot devices and/or paths may be specified, which are booted one
after another until success. When no boot device is specified altboot tries
to boot from all disk devices with a valid NetBSD disklabel, starting with
unit 0.
 1.18 16-Apr-2012  phx Improved Synology CS/RS support: watch power-state of all SATA drives before
initializing them, configure drive LEDs to reflect SATA activity.
Configure drives on all ATA PCI devices, not only on the first one.
 1.17 22-Jan-2012  phx branches: 1.17.2;
Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.
 1.16 01-Jan-2012  phx Handle devices with two network interfaces (e.g. a DSM-G600 with stge(4)
and ath(4)).
 1.15 06-Nov-2011  phx branches: 1.15.4;
Added a test terminal for communicating with the satellite microcontroller.
When compiled with DEBUG option it can be entered by typing 'C'.
 1.14 25-Apr-2011  phx branches: 1.14.4; 1.14.6;
Also scan for PCI_CLASS_RAID, when looking for disk devices.
 1.13 20-Mar-2011  phx The DSM-G600 U-Boot is so restricted that there is no possibility to pass
any bootargs. So we will just do the default multiuser boot from wd0: when
altboot was started together with a Linux initrd image.
 1.12 13-Mar-2011  phx With the new boot argument "altboot" the program can replace itself with a
new binary while running.
The default boot path was changed from nfs: to wd0:.
Bumped altboot version to 1.7.
 1.11 13-Mar-2011  phx Enter interactive mode, when a key is pressed within two seconds.
 1.10 12-Mar-2011  phx Introduced an optional shutdown function for all network interfaces.
This is needed to stop a NIF and make it return to a known state. A running
NIF may cause all sorts of bad effects, like for example making it impossible
to reboot a board without a hardware-reset function.
 1.9 06-Mar-2011  phx Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.8 06-Mar-2011  phx branches: 1.8.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.7 26-Feb-2011  phx branches: 1.7.2;
Build altboot.img, which fakes a Linux kernel module, loadable with "bootm",
for extremely stripped U-Boot firmware. Arguments are passed through the
"bootargs" environment variable, which is detected automatically when
using bootm.
The startup code also fixes a bug in bootm, which doesn't flush the cache
before running the image.
 1.6 10-Feb-2011  nisimura - some rework for PCI device enumeration.
- allow dual IDE/SATA devices.
- fix a typo of D-Link #define.
 1.5 27-Jan-2011  phx Debugging output is only visible when DEBUG is defined.
 1.4 26-Jan-2011  nisimura one more twist to complete newvers_stand.sh transition. Include timestamp
in banner.
 1.3 26-Jan-2011  phx bootprog_maker and bootprog_date are missing since we switched to the
MI newvers_stand.sh script. Remove the refering information line.
 1.2 23-Jan-2011  nisimura switch to use newvers_stand.sh as suggested by joerg@
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.7.2.4 31-May-2011  rmind sync with head
 1.7.2.3 21-Apr-2011  rmind sync with head
 1.7.2.2 05-Mar-2011  rmind sync with head
 1.7.2.1 26-Feb-2011  rmind file main.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.8.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.8.2.1 06-Mar-2011  bouyer file main.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.14.6.5 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.6.4 23-Jan-2013  yamt sync with head
 1.14.6.3 23-May-2012  yamt sync with head.
 1.14.6.2 17-Apr-2012  yamt sync with head
 1.14.6.1 10-Nov-2011  yamt sync with head
 1.14.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.14.4.1 25-Apr-2011  jruoho file main.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.15.4.3 02-Jun-2012  mrg sync to latest -current.
 1.15.4.2 29-Apr-2012  mrg sync to latest -current.
 1.15.4.1 18-Feb-2012  mrg merge to -current.
 1.17.2.1 03-Jun-2012  jdc Pull up revisions:
src/sys/arch/i386/stand/lib/exec.c revision 1.50
src/sys/arch/sandpoint/stand/altboot/main.c revision 1.21 via patch
src/sys/lib/libsa/ext2fs.c revision 1.13
src/sys/lib/libsa/ffsv1.c revision 1.6
src/sys/lib/libsa/ffsv2.c revision 1.6
src/sys/lib/libsa/globals.c revision 1.9
src/sys/lib/libsa/lfsv1.c revision 1.5
src/sys/lib/libsa/lfsv2.c revision 1.5
src/sys/lib/libsa/stand.h revision 1.76
src/sys/lib/libsa/ufs.c revision 1.58
(requested by dsl in ticket #279).

Remove the code that tries to load the "ffs" kernel module during boot.
This is in line with the core decision than even modular kernels should
contain the ffs code.
I've left in the code that tries to load "nfs" and "ext2fs", but it
isn't clear that is necessary.
Removes a warning message that (usually) flashes past to fast to read.
AFAICT all the relevant kernels contain ffs (and nfs for that matter).
 1.21.2.3 03-Dec-2017  jdolecek update from HEAD
 1.21.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.2.1 25-Feb-2013  tls resync with head
 1.22.2.1 18-May-2014  rmind sync with head
 1.25.2.1 10-Aug-2014  tls Rebase.
 1.26.4.2 09-Jul-2016  skrll Sync with HEAD
 1.26.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.26.2.1 16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.29.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.31.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.31.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 06-Mar-2011  phx branches: 1.1.2; 1.1.6;
Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.1.6.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.1 06-Mar-2011  jruoho file memfs.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.1.2.2 21-Apr-2011  rmind sync with head
 1.1.2.1 06-Mar-2011  rmind file memfs.c was added on branch rmind-uvmplock on 2011-04-21 01:41:22 +0000
 1.1 06-Mar-2011  phx branches: 1.1.2; 1.1.6;
Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.1.6.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.1 06-Mar-2011  jruoho file memfs.h was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.1.2.2 21-Apr-2011  rmind sync with head
 1.1.2.1 06-Mar-2011  rmind file memfs.h was added on branch rmind-uvmplock on 2011-04-21 01:41:22 +0000
 1.2 23-Jan-2011  nisimura switch to use newvers_stand.sh as suggested by joerg@
 1.1 23-Jan-2011  nisimura - add "ll" modifier to printf.
- be more conscious about int type propagation.
- add missing version and newvers.sh
 1.6 05-Aug-2014  joerg Don't use non-literal strings as format strings.
XXX Switch to strlcpy.
 1.5 12-Mar-2011  phx branches: 1.5.4; 1.5.16; 1.5.30;
Introduced an optional shutdown function for all network interfaces.
This is needed to stop a NIF and make it return to a known state. A running
NIF may cause all sorts of bad effects, like for example making it impossible
to reboot a board without a hardware-reset function.
 1.4 06-Mar-2011  phx Renamed "stg" to "stge" as in the kernel.
 1.3 06-Mar-2011  phx branches: 1.3.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.2 10-Feb-2011  nisimura branches: 1.2.2;
- some rework for PCI device enumeration.
- allow dual IDE/SATA devices.
- fix a typo of D-Link #define.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.2.3 21-Apr-2011  rmind sync with head
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 10-Feb-2011  rmind file nif.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.3.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.3.2.1 06-Mar-2011  bouyer file nif.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.5.30.1 10-Aug-2014  tls Rebase.
 1.5.16.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.5.4.1 12-Mar-2011  jruoho file nif.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.3 30-Oct-2011  phx Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4; 1.2.8;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.8.1 27-Jan-2011  jruoho file nvt.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file nvt.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file nvt.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.5 10-Mar-2011  phx branches: 1.5.4;
Make sure the device class is IDE (class 0, subclass 1), before checking
the PCI interface for native/legacy mode. Different subclasses are always
assumed being in native mode. That makes the Acard IDE controller work.

New macros for PCI interface, revision and class.
 1.4 14-Feb-2011  nisimura branches: 1.4.2; 1.4.4;
- add preliminary Netronics NH230 and NH231 supports.
- assign PCI configuration register 0x3c with IDSEL value by PCI framework,
eliminating most of pcifixup() logic in simple NASes.
 1.3 10-Feb-2011  nisimura - some rework for PCI device enumeration.
- allow dual IDE/SATA devices.
- fix a typo of D-Link #define.
 1.2 27-Jan-2011  phx Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.4.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.4.4.1 14-Feb-2011  bouyer file pci.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.4.2.3 21-Apr-2011  rmind sync with head
 1.4.2.2 05-Mar-2011  rmind sync with head
 1.4.2.1 14-Feb-2011  rmind file pci.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.5.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.5.4.1 10-Mar-2011  jruoho file pci.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.12 22-Jan-2012  phx Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.
 1.11 13-Nov-2011  phx branches: 1.11.4;
Make the chipfix() functions return void instead of int, as the return
value is useless. Suggested by nisimura.
 1.10 12-Nov-2011  phx Add support for IT821x IDE.
 1.9 02-Nov-2011  nisimura branches: 1.9.2;

VIA 82C586A/B 82C686A/B SouthBridges share PCI ID 0x1066-0571.
They are distinguishable by looking at PCI-ISA bridge PCI ID and
revision number.
 1.8 01-Nov-2011  phx The Apollo family of IDE interface chips has both channels disabled by
default, so we have to enable them in a new chipfix function. Also move
the channel enable code for the 82C686B from encpcifix() to pciide.c.
 1.7 25-Apr-2011  phx branches: 1.7.4;
Add VIA VT6410 vendor/product IDs (StorCenter).
 1.6 19-Apr-2011  phx Some DSM-G600 use a Acard ATP865A instead of ATP865. Added its product id.
 1.5 10-Mar-2011  phx Make sure the device class is IDE (class 0, subclass 1), before checking
the PCI interface for native/legacy mode. Different subclasses are always
assumed being in native mode. That makes the Acard IDE controller work.

New macros for PCI interface, revision and class.
 1.4 09-Mar-2011  phx Check the PCI-interface for legacy/native mode, not the PCI-revision.
 1.3 06-Mar-2011  phx branches: 1.3.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.2 08-Feb-2011  nisimura branches: 1.2.2;
- add preliminary code to support D-Link DSM-G600 rev.B NAS.
- it features 9600bps console, Moto MCU on the 2nd DUART channel,
ACARD ATP865 PCIIDE and IP Plus IP1000A GbE. It has MiniPCI
slot.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.2.4 31-May-2011  rmind sync with head
 1.2.2.3 21-Apr-2011  rmind sync with head
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 08-Feb-2011  rmind file pciide.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.3.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.3.2.1 06-Mar-2011  bouyer file pciide.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.7.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.7.4.1 25-Apr-2011  jruoho file pciide.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.9.2.1 17-Apr-2012  yamt sync with head
 1.11.4.1 18-Feb-2012  mrg merge to -current.
 1.1 23-Jan-2011  nisimura branches: 1.1.2; 1.1.4; 1.1.8;
change bootloader name to "altboot". bump version and add README.
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 23-Jan-2011  jruoho file pcn.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.1.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 23-Jan-2011  bouyer file pcn.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.1.2.2 05-Mar-2011  rmind sync with head
 1.1.2.1 23-Jan-2011  rmind file pcn.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.5 25-May-2011  phx Use printf() from libsa.
Ok by nisimura@.
 1.4 07-Mar-2011  phx mkdigit() didn't work with values which have bit 31 set (>=0x80000000).
Do not cast to (int).
 1.3 23-Jan-2011  nisimura branches: 1.3.2; 1.3.4;
fix a failure in the sign extension consideration.
 1.2 23-Jan-2011  nisimura - add "ll" modifier to printf.
- be more conscious about int type propagation.
- add missing version and newvers.sh
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.3.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.3.4.1 23-Jan-2011  bouyer file printf.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.3.2.4 31-May-2011  rmind sync with head
 1.3.2.3 21-Apr-2011  rmind sync with head
 1.3.2.2 05-Mar-2011  rmind sync with head
 1.3.2.1 23-Jan-2011  rmind file printf.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.8 25-Mar-2021  rin Fix tftp boot with RTL8169/8110.

When sending frame shorter than 60 octets, we add trailing \0's to
payload to construct 60-octet frame.

rge.c rev 1.4--1.7 did this tail-padding on buffer provided by caller,
which results in memory corruption if buffer is shorter than 60 bytes.

Instead, allocate temporary buffer on stack, and work on it.

This bug affects tftp_getnextblock() compiled by GCC8 and later, by
which stack layout has drastically changed. However, even with GCC7,
if tftp.c is compiled with -O0, the bug becomes tangible.
 1.7 25-Dec-2012  phx branches: 1.7.50; 1.7.52;
QNAP V200 boards have no EEPROM for the MAC address, so all devices default
to the same address (00:e0:4c:69:20:01).
Now we read the real MAC address from the flash ROM. It is stored at the
beginning of a 512-byte block in ASCII format. Some QNAP's have a broken
ext2 file system, so we cannot look for the file ETH0.MAC_ADDR therein,
but have to search the whole flash in 512-byte steps for candidates...
 1.6 30-Oct-2011  phx branches: 1.6.2; 1.6.8; 1.6.12;
Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.5 29-Apr-2011  phx branches: 1.5.4;
When we stretch a short frame to 60 bytes in rge_send() do not return 60,
but the original frame size.
 1.4 04-Apr-2011  phx Make sure a frame is at least 60 bytes, as Realtek does not automatically
expand small frames.
Patch suggested by nisimura@.
 1.3 27-Mar-2011  phx Fixed PHY access.
Support 8169SC/8110SC (as found on QNAP V200 boards).
Make frame receiving work (FRAMELEN <-> FRAMESIZE).
Driver works now, but not the first time after cold start.
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file rge.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.4 31-May-2011  rmind sync with head
 1.2.2.3 21-Apr-2011  rmind sync with head
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file rge.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.5.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.5.4.1 29-Apr-2011  jruoho file rge.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.6.12.1 25-Feb-2013  tls resync with head
 1.6.8.1 18-Sep-2013  bouyer Pull up following revision(s) (requested by phx in ticket #946):
sys/arch/sandpoint/stand/altboot/rge.c: revision 1.7
sys/arch/sandpoint/stand/altboot/brdsetup.c: revision 1.32
sys/dev/ic/rtl8169.c: revision 1.138
QNAP V200 boards have no EEPROM for the MAC address, so all devices default
to the same address (00:e0:4c:69:20:01).
Now we read the real MAC address from the flash ROM. It is stored at the
beginning of a 512-byte block in ASCII format. Some QNAP's have a broken
ext2 file system, so we cannot look for the file ETH0.MAC_ADDR therein,
but have to search the whole flash in 512-byte steps for candidates...
Make re(4) driver always use IDR register values for its MAC address.
Some sandpoint NAS firmwares set MAC address per their
firmware settings and don't use re(4)'s EEPROM values.
Per rtl8169 manuals re(4) chip reads EEPROM automatically after
hardware reset and Linux driver also uses IDR registers,
so this change should not affect existing other boards
which actually have vaild EEPROM.
Per discussion in old tech-kern@ thread:
http://mail-index.netbsd.org/tech-kern/2012/12/01/msg014573.html
Note rtl81x9.c is still shared among rtk(4) only for a multicast function
(to avoid boring refactoring work).
 1.6.2.1 23-Jan-2013  yamt sync with head
 1.7.52.1 03-Apr-2021  thorpej Sync with HEAD.
 1.7.50.1 03-Apr-2021  thorpej Sync with HEAD.
 1.7 03-Aug-2017  phx Some Synology network devices show vendor 0x1148 (Schneider & Koch) instead
of 0x11ab (Marvell). Detect both.
Improve spinning up of both disk drives on Synology DS20x by adding some
more delays (directly at the start and after powering up the second drive).
 1.6 30-Sep-2015  phx Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
 1.5 22-Jan-2012  phx branches: 1.5.6; 1.5.22; 1.5.24;
Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.
 1.4 30-May-2011  phx branches: 1.4.4; 1.4.6; 1.4.10;
When a drive is present, retry ATA-reset for a maximum of 10 seconds, until
successful.
 1.3 06-Mar-2011  phx branches: 1.3.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.2 27-Jan-2011  phx branches: 1.2.2;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.2.4 31-May-2011  rmind sync with head
 1.2.2.3 21-Apr-2011  rmind sync with head
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file siisata.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.3.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.3.2.1 06-Mar-2011  bouyer file siisata.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.4.10.1 18-Feb-2012  mrg merge to -current.
 1.4.6.1 17-Apr-2012  yamt sync with head
 1.4.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.4.4.1 30-May-2011  jruoho file siisata.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.5.24.2 28-Aug-2017  skrll Sync with HEAD
 1.5.24.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.5.22.1 16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.5.6.1 03-Dec-2017  jdolecek update from HEAD
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4; 1.2.8;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.8.1 27-Jan-2011  jruoho file sip.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file sip.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file sip.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.5 03-Aug-2017  phx This driver should also support Schneider & Koch SK-9821 v2.0, besides
Marvell SKnet.
 1.4 30-Oct-2011  phx branches: 1.4.12; 1.4.30;
Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.3 29-May-2011  phx branches: 1.3.4;
When PPCBoot supports the SKnet interface it will configure it to automatically
byte-reverse all descriptors by setting a vendor-specific bit in PCI config
space. We have to clear that bit to make sure our driver can send and
receive.
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file skg.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.3 31-May-2011  rmind sync with head
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file skg.c was added on branch rmind-uvmplock on 2011-03-05 20:51:48 +0000
 1.3.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.3.4.1 29-May-2011  jruoho file skg.c was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.4.30.1 28-Aug-2017  skrll Sync with HEAD
 1.4.12.1 03-Dec-2017  jdolecek update from HEAD
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4; 1.2.8;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.8.1 27-Jan-2011  jruoho file sme.c was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file sme.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file sme.c was added on branch rmind-uvmplock on 2011-03-05 20:51:48 +0000
 1.6 30-Oct-2011  phx Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.5 12-Mar-2011  phx branches: 1.5.2; 1.5.6;
Introduced an optional shutdown function for all network interfaces.
This is needed to stop a NIF and make it return to a known state. A running
NIF may cause all sorts of bad effects, like for example making it impossible
to reboot a board without a hardware-reset function.
 1.4 11-Mar-2011  phx Some code cleanup, suggested by nisimura@.
 1.3 10-Mar-2011  phx Make sure the device class is IDE (class 0, subclass 1), before checking
the PCI interface for native/legacy mode. Different subclasses are always
assumed being in native mode. That makes the Acard IDE controller work.

New macros for PCI interface, revision and class.
 1.2 08-Mar-2011  phx Driver seems to work now. Successfully booted a kernel via BOOTP and NFS on
an ST1023-compatible IC+ IP1000A chip.
 1.1 06-Mar-2011  phx New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.5.6.2 06-Jun-2011  jruoho Sync with HEAD.
 1.5.6.1 12-Mar-2011  jruoho file stg.c was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.5.2.2 21-Apr-2011  rmind sync with head
 1.5.2.1 12-Mar-2011  rmind file stg.c was added on branch rmind-uvmplock on 2011-04-21 01:41:22 +0000
 1.3 05-Dec-2021  msaitoh s/stauts/status/
 1.2 27-Dec-2019  msaitoh s/transfered/transferred/
 1.1 23-Jan-2011  nisimura branches: 1.1.2; 1.1.4; 1.1.8; 1.1.62;
change bootloader name to "altboot". bump version and add README.
 1.1.62.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 23-Jan-2011  jruoho file tlp.c was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.1.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 23-Jan-2011  bouyer file tlp.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.1.2.2 05-Mar-2011  rmind sync with head
 1.1.2.1 23-Jan-2011  rmind file tlp.c was added on branch rmind-uvmplock on 2011-03-05 20:51:48 +0000
 1.11 05-Apr-2022  andvar s/confortable/comfortable/
 1.10 04-Apr-2022  andvar fix various typos, mainly in comments.
 1.9 03-Aug-2017  phx Some Synology network devices show vendor 0x1148 (Schneider & Koch) instead
of 0x11ab (Marvell). Detect both.
Improve spinning up of both disk drives on Synology DS20x by adding some
more delays (directly at the start and after powering up the second drive).
 1.8 30-Sep-2015  phx Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
 1.7 15-Sep-2013  phx branches: 1.7.4; 1.7.6;
New version can read the MAC address for QNAP systems from flash.
 1.6 22-Jan-2012  phx branches: 1.6.6; 1.6.10;
Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.
 1.5 12-Nov-2011  phx branches: 1.5.4;
Improved Iomega microcontroller support. Bumped version to 1.8.
 1.4 13-Mar-2011  phx branches: 1.4.4; 1.4.6;
With the new boot argument "altboot" the program can replace itself with a
new binary while running.
The default boot path was changed from nfs: to wd0:.
Bumped altboot version to 1.7.
 1.3 26-Feb-2011  phx branches: 1.3.2; 1.3.4;
Build altboot.img, which fakes a Linux kernel module, loadable with "bootm",
for extremely stripped U-Boot firmware. Arguments are passed through the
"bootargs" environment variable, which is detected automatically when
using bootm.
The startup code also fixes a bug in bootm, which doesn't flush the cache
before running the image.
 1.2 23-Jan-2011  nisimura switch to use newvers_stand.sh as suggested by joerg@
 1.1 23-Jan-2011  nisimura - add "ll" modifier to printf.
- be more conscious about int type propagation.
- add missing version and newvers.sh
 1.3.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.3.4.1 26-Feb-2011  bouyer file version was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.3.2.3 21-Apr-2011  rmind sync with head
 1.3.2.2 05-Mar-2011  rmind sync with head
 1.3.2.1 26-Feb-2011  rmind file version was added on branch rmind-uvmplock on 2011-03-05 20:51:48 +0000
 1.4.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.6.1 17-Apr-2012  yamt sync with head
 1.4.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.4.4.1 13-Mar-2011  jruoho file version was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.5.4.1 18-Feb-2012  mrg merge to -current.
 1.6.10.1 18-May-2014  rmind sync with head
 1.6.6.2 03-Dec-2017  jdolecek update from HEAD
 1.6.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.6.2 28-Aug-2017  skrll Sync with HEAD
 1.7.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.7.4.1 16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.3 30-Oct-2011  phx Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4; 1.2.8;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.8.1 27-Jan-2011  jruoho file vge.c was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file vge.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file vge.c was added on branch rmind-uvmplock on 2011-03-05 20:51:48 +0000
 1.3 03-Sep-2021  andvar fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4; 1.2.8;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.8.1 27-Jan-2011  jruoho file wm.c was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file wm.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file wm.c was added on branch rmind-uvmplock on 2011-03-05 20:51:48 +0000

RSS XML Feed