Home | History | Annotate | only in /src/sys/arch/acorn32/podulebus
History log of /src/sys/arch/acorn32/podulebus
RevisionDateAuthorComments
 1.24 02-Jan-2025  andvar s/Mulit/Multi/ in comment.
 1.23 07-Aug-2021  thorpej branches: 1.23.12;
Merge thorpej-cfargs2.
 1.22 24-Apr-2021  thorpej branches: 1.22.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.21 08-Dec-2018  thorpej branches: 1.21.14;
Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.20 27-Oct-2012  chs branches: 1.20.36; 1.20.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.19 19-Jul-2011  dyoung branches: 1.19.2; 1.19.12;
Change <machine/bus.h> to <sys/bus.h> throughout.

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

Mark acorn32/bus.h obsolete.
 1.18 03-Jun-2011  matt device_t, cfdata_t, device_private, device_xname cleanup
CFATTACH_DECL_NEW for struct device only devices
bump SYMTAB_SPACE for EB7500ATX
 1.17 27-Nov-2009  rmind branches: 1.17.4; 1.17.6; 1.17.10;
- 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.16 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.15 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.14 28-Apr-2008  martin branches: 1.14.8; 1.14.14;
Remove clause 3 and 4 from TNF licenses
 1.13 14-Mar-2008  cube branches: 1.13.2; 1.13.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.12 13-Jul-2006  gdamore branches: 1.12.34; 1.12.36; 1.12.56; 1.12.60;
Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@. Fixes PR port-evbmips/32362.
 1.11 11-Dec-2005  christos branches: 1.11.4; 1.11.8; 1.11.16;
merge ktrace-lwp.
 1.10 13-Sep-2004  drochner branches: 1.10.12;
use config_found() instead of config_found_sm() if no submatch
function is used
 1.9 14-Jul-2003  lukem use __KERNEL_RCSID() in a consistent manner
 1.8 01-Jan-2003  thorpej branches: 1.8.2;
Use aprint_normal() for cfprint routines.
 1.7 05-Oct-2002  chs add missing protos, clean up includes.
 1.6 02-Oct-2002  thorpej Fix script-o's in previous.
 1.5 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 22-May-2002  bjh21 Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.

This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.2 27-Nov-2001  thorpej branches: 1.2.2; 1.2.10; 1.2.12;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.5 03-Jan-2003  thorpej Sync with HEAD.
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file amps.c was added on branch nathanw_sa on 2002-01-08 00:22:46 +0000
 1.2.12.1 01-Nov-2002  tron Pull up revision 1.3 (requested by chris in ticket #120):
Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.
This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.2.10.1 30-May-2002  gehenna Catch up with -current.
 1.2.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.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 27-Nov-2001  thorpej file amps.c was added on branch kqueue on 2002-01-10 19:36:30 +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.10.12.2 17-Mar-2008  yamt sync with head.
 1.10.12.1 30-Dec-2006  yamt sync with head.
 1.11.16.1 20-Jun-2006  gdamore COM_INIT_REGS-ify acorn32.
 1.11.8.1 11-Aug-2006  yamt sync with head
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.12.60.2 02-Jun-2008  mjf Sync with HEAD.
 1.12.60.1 03-Apr-2008  mjf Sync with HEAD.
 1.12.56.1 24-Mar-2008  keiichi sync with head.
 1.12.36.1 23-Mar-2008  matt sync with HEAD
 1.12.34.1 21-Mar-2008  chris Sync with head.
 1.13.4.3 11-Mar-2010  yamt sync with head
 1.13.4.2 04-May-2009  yamt sync with head.
 1.13.4.1 16-May-2008  yamt sync with head.
 1.13.2.1 18-May-2008  yamt sync with head.
 1.14.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.17.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.17.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.17.4.1 12-Jun-2011  rmind sync with head
 1.19.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.2.1 30-Oct-2012  yamt sync with head
 1.20.38.1 10-Jun-2019  christos Sync with HEAD
 1.20.36.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.21.14.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.22.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.23.12.1 02-Aug-2025  perseant Sync with HEAD
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.128; 1.1.130; 1.1.132;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 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.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file ampsreg.h was added on branch kqueue on 2002-01-10 19:36:30 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file ampsreg.h was added on branch nathanw_sa on 2001-10-05 22:27:55 +0000
 1.22 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.21 24-Apr-2021  thorpej branches: 1.21.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.20 25-Oct-2014  skrll branches: 1.20.4; 1.20.10; 1.20.34;
Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.19 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.18 19-Jul-2011  dyoung branches: 1.18.2; 1.18.12;
Change <machine/bus.h> to <sys/bus.h> throughout.

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

Mark acorn32/bus.h obsolete.
 1.17 03-Jun-2011  matt device_t, cfdata_t, device_private, device_xname cleanup
CFATTACH_DECL_NEW for struct device only devices
bump SYMTAB_SPACE for EB7500ATX
 1.16 12-May-2009  cegger branches: 1.16.4; 1.16.6; 1.16.10;
use device_xname()
 1.15 12-Jun-2008  cegger branches: 1.15.10;
use device_lookup_private to get softc
 1.14 11-Dec-2005  christos branches: 1.14.76; 1.14.78; 1.14.80; 1.14.82; 1.14.84;
merge ktrace-lwp.
 1.13 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.12 03-May-2003  wiz branches: 1.12.2;
DMA, not dma nor Dma.
 1.11 02-Oct-2002  thorpej Fix script-o's in previous.
 1.10 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.7 05-Aug-2002  bjh21 Rather than forcing on XS_POLL in SCSI transfers ourselves, set
SCSIPI_ADAPT_POLL_ONLY to tell the MI scsipi layer to do it for us. This,
plus G/Cing some debugging code, removes the card-specific scsi_request
wrappers.
 1.6 22-May-2002  bjh21 Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.

This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.5 10-Mar-2002  bjh21 branches: 1.5.4; 1.5.6;
__RCSID -> __KERNEL_RCSID
 1.4 18-Feb-2002  bjh21 Add a prototype for asc_dump().
Delete asc_dmaintr(): it's unused.
__RCSID().
 1.3 27-Nov-2001  thorpej branches: 1.3.2;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.2 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.7 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.6 13-Aug-2002  nathanw Catch up to -current.
 1.1.4.5 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file asc.c was added on branch nathanw_sa on 2002-01-08 00:22:46 +0000
 1.3.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.3.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.1 27-Nov-2001  thorpej file asc.c was added on branch kqueue on 2002-01-10 19:36:30 +0000
 1.5.6.1 01-Nov-2002  tron Pull up revision 1.6 (requested by chris in ticket #120):
Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.
This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.5.4.2 30-Aug-2002  gehenna catch up with -current.
 1.5.4.1 30-May-2002  gehenna Catch up with -current.
 1.12.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.84.1 18-Jun-2008  simonb Sync with head.
 1.14.82.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.14.80.2 16-May-2009  yamt sync with head
 1.14.80.1 04-May-2009  yamt sync with head.
 1.14.78.1 17-Jun-2008  yamt sync with head.
 1.14.76.1 29-Jun-2008  mjf Sync with HEAD.
 1.15.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.16.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.16.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.16.4.1 12-Jun-2011  rmind sync with head
 1.18.12.2 03-Dec-2017  jdolecek update from HEAD
 1.18.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.2.1 30-Oct-2012  yamt sync with head
 1.20.34.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.20.10.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.20.4.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.20.4.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.21.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.6 20-Aug-2006  bjh21 Clean out some of the junk from this file, sepcifically definitions for
an Amiga DMA controller, and #if 0'ed WD33C93 definitions that are duplicated
in sbicreg.h. uPD71071 definitions can stay for now, since they're not
actually useless even though they're unused.
 1.5 08-Mar-2006  lukem Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.4 24-Dec-2005  perry branches: 1.4.4; 1.4.6; 1.4.8; 1.4.10;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.3 11-Dec-2005  christos 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 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.24;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file ascreg.h was added on branch kqueue on 2002-01-10 19:36:30 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file ascreg.h was added on branch nathanw_sa on 2001-10-05 22:27:55 +0000
 1.2.16.2 30-Dec-2006  yamt sync with head.
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.4.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.4.8.2 03-Sep-2006  yamt sync with head.
 1.4.8.1 13-Mar-2006  yamt sync with head.
 1.4.6.1 22-Apr-2006  simonb Sync with head.
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file ascvar.h was added on branch kqueue on 2002-01-10 19:36:31 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file ascvar.h was added on branch nathanw_sa on 2001-10-05 22:27:55 +0000
 1.22 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.21 24-Apr-2021  thorpej branches: 1.21.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.20 25-Oct-2014  skrll branches: 1.20.34;
Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.19 21-Jan-2014  christos fix unused variable
 1.18 27-Oct-2012  chs branches: 1.18.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.17 03-Jun-2011  matt branches: 1.17.2; 1.17.12;
device_t, cfdata_t, device_private, device_xname cleanup
CFATTACH_DECL_NEW for struct device only devices
bump SYMTAB_SPACE for EB7500ATX
 1.16 12-May-2009  cegger branches: 1.16.4; 1.16.6; 1.16.10;
use device_xname()
 1.15 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.14 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.13 11-Dec-2005  christos branches: 1.13.80; 1.13.88; 1.13.94;
merge ktrace-lwp.
 1.12 14-Jul-2003  lukem use __KERNEL_RCSID() in a consistent manner
 1.11 01-Apr-2003  thorpej branches: 1.11.2;
Use PAGE_SIZE rather than NBPG.
 1.10 05-Oct-2002  chs add missing protos, clean up includes.
 1.9 02-Oct-2002  thorpej Fix script-o's in previous.
 1.8 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.5 05-Aug-2002  bjh21 Rather than forcing on XS_POLL in SCSI transfers ourselves, set
SCSIPI_ADAPT_POLL_ONLY to tell the MI scsipi layer to do it for us. This,
plus G/Cing some debugging code, removes the card-specific scsi_request
wrappers.
 1.4 22-May-2002  bjh21 Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.

This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.3 27-Nov-2001  thorpej branches: 1.3.2; 1.3.10; 1.3.12;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.2 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.4 13-Aug-2002  nathanw Catch up to -current.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file cosc.c was added on branch nathanw_sa on 2002-01-08 00:22:46 +0000
 1.3.12.1 01-Nov-2002  tron Pull up revision 1.4 (requested by chris in ticket #120):
Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.
This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.3.10.2 30-Aug-2002  gehenna catch up with -current.
 1.3.10.1 30-May-2002  gehenna Catch up with -current.
 1.3.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.3.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.1 27-Nov-2001  thorpej file cosc.c was added on branch kqueue on 2002-01-10 19:36:31 +0000
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.13.80.2 16-May-2009  yamt sync with head
 1.13.80.1 04-May-2009  yamt sync with head.
 1.16.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.16.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.16.4.1 12-Jun-2011  rmind sync with head
 1.17.12.3 03-Dec-2017  jdolecek update from HEAD
 1.17.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.17.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.17.2.1 30-Oct-2012  yamt sync with head
 1.18.2.1 18-May-2014  rmind sync with head
 1.20.34.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.21.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file coscreg.h was added on branch kqueue on 2002-01-10 19:36:31 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file coscreg.h was added on branch nathanw_sa on 2001-10-05 22:27:55 +0000
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file coscvar.h was added on branch kqueue on 2002-01-10 19:36:31 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file coscvar.h was added on branch nathanw_sa on 2001-10-05 22:27:56 +0000
 1.12 21-Mar-2014  christos kill sprintf
 1.11 27-Oct-2012  chs branches: 1.11.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.10 28-Apr-2008  martin branches: 1.10.34; 1.10.44;
Remove clause 3 and 4 from TNF licenses
 1.9 04-Apr-2008  tsutsui branches: 1.9.2; 1.9.4;
Split devict_t/softc for ncr5380sbc SCSI, and misc cosmetic changes.
 1.8 11-Dec-2005  christos branches: 1.8.76;
merge ktrace-lwp.
 1.7 14-Jul-2003  lukem use __KERNEL_RCSID() in a consistent manner
 1.6 02-Oct-2002  thorpej branches: 1.6.8;
Fix script-o's in previous.
 1.5 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 22-May-2002  bjh21 Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.

This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.2 27-Nov-2001  thorpej branches: 1.2.2; 1.2.10; 1.2.12;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file csa.c was added on branch nathanw_sa on 2002-01-08 00:22:46 +0000
 1.2.12.1 01-Nov-2002  tron Pull up revision 1.3 (requested by chris in ticket #120):
Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.
This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.2.10.1 30-May-2002  gehenna Catch up with -current.
 1.2.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.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 27-Nov-2001  thorpej file csa.c was added on branch kqueue on 2002-01-10 19:36:31 +0000
 1.6.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.8.1 03-Aug-2004  skrll Sync with HEAD
 1.8.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.4.1 16-May-2008  yamt sync with head.
 1.9.2.1 18-May-2008  yamt sync with head.
 1.10.44.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.10.34.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.10.34.1 30-Oct-2012  yamt sync with head
 1.11.2.1 18-May-2014  rmind sync with head
 1.21 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.20 24-Apr-2021  thorpej branches: 1.20.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.19 21-Jan-2014  christos branches: 1.19.44;
fix unused variables
 1.18 27-Oct-2012  chs branches: 1.18.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.17 03-Jun-2011  matt branches: 1.17.2; 1.17.12;
device_t, cfdata_t, device_private, device_xname cleanup
CFATTACH_DECL_NEW for struct device only devices
bump SYMTAB_SPACE for EB7500ATX
 1.16 12-May-2009  cegger branches: 1.16.4; 1.16.6; 1.16.10;
use device_xname()
 1.15 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.14 28-Apr-2008  martin branches: 1.14.8; 1.14.14;
Remove clause 3 and 4 from TNF licenses
 1.13 11-Dec-2005  christos branches: 1.13.76; 1.13.78; 1.13.80;
merge ktrace-lwp.
 1.12 14-Jul-2003  lukem use __KERNEL_RCSID() in a consistent manner
 1.11 03-May-2003  wiz branches: 1.11.2;
DMA, not dma nor Dma.
 1.10 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.9 05-Oct-2002  chs add missing protos, clean up includes.
 1.8 02-Oct-2002  thorpej Fix script-o's in previous.
 1.7 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.4 05-Aug-2002  bjh21 Rather than forcing on XS_POLL in SCSI transfers ourselves, set
SCSIPI_ADAPT_POLL_ONLY to tell the MI scsipi layer to do it for us. This,
plus G/Cing some debugging code, removes the card-specific scsi_request
wrappers.
 1.3 22-May-2002  bjh21 Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.

This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.2 27-Nov-2001  thorpej branches: 1.2.2; 1.2.10; 1.2.12;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.4 13-Aug-2002  nathanw Catch up to -current.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file csc.c was added on branch nathanw_sa on 2002-01-08 00:22:46 +0000
 1.2.12.2 01-Nov-2002  tron Pull up revision 1.3 (requested by chris in ticket #120):
Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.
This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.2.12.1 07-Aug-2002  lukem Pull up revision 1.4 (requested by bjh21 in ticket #640):
Rather than forcing on XS_POLL in SCSI transfers ourselves, set
SCSIPI_ADAPT_POLL_ONLY to tell the MI scsipi layer to do it for us. This,
plus G/Cing some debugging code, removes the card-specific scsi_request
wrappers.
 1.2.10.2 30-Aug-2002  gehenna catch up with -current.
 1.2.10.1 30-May-2002  gehenna Catch up with -current.
 1.2.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.2.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 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 27-Nov-2001  thorpej file csc.c was added on branch kqueue on 2002-01-10 19:36:32 +0000
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.80.3 16-May-2009  yamt sync with head
 1.13.80.2 04-May-2009  yamt sync with head.
 1.13.80.1 16-May-2008  yamt sync with head.
 1.13.78.1 18-May-2008  yamt sync with head.
 1.13.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.16.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.16.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.16.4.1 12-Jun-2011  rmind sync with head
 1.17.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.17.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.17.2.1 30-Oct-2012  yamt sync with head
 1.18.2.1 18-May-2014  rmind sync with head
 1.19.44.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.20.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.128; 1.1.130; 1.1.132;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 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.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file cscreg.h was added on branch kqueue on 2002-01-10 19:36:32 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file cscreg.h was added on branch nathanw_sa on 2001-10-05 22:27:56 +0000
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.128; 1.1.130; 1.1.132;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 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.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file cscvar.h was added on branch kqueue on 2002-01-10 19:36:32 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file cscvar.h was added on branch nathanw_sa on 2001-10-05 22:27:56 +0000
 1.34 21-Aug-2021  andvar fix some more typos in comments/log messages, improve wording as well.
 1.33 22-Jul-2020  msaitoh s/reseting/resetting/
 1.32 27-Dec-2019  msaitoh s/transfered/transferred/
 1.31 17-Aug-2016  skrll branches: 1.31.16;
Spelling on comment
 1.30 13-Dec-2015  christos PR/50514: David Binderman: Add missing break
 1.29 25-Oct-2014  skrll branches: 1.29.2;
Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.28 13-Sep-2014  matt Replace more vm_offset_t, vm_size_t with vaddr_t, vsize_t
Use paddr_t for msgbufphys
 1.27 22-Feb-2014  matt Deal with non-4KB page sizes
 1.26 21-Jan-2014  christos fix unused variables
 1.25 27-Oct-2012  chs branches: 1.25.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.24 09-Dec-2010  uebayasi branches: 1.24.8; 1.24.18;
Fix DEBUG build.
 1.23 16-May-2009  cegger branches: 1.23.4;
KNF, same object code generated
 1.22 18-Mar-2009  cegger bcopy -> memcpy
 1.21 18-Mar-2009  cegger bzero -> memset
 1.20 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.19 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.18 08-Mar-2006  lukem branches: 1.18.70; 1.18.78; 1.18.84;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.17 11-Dec-2005  christos branches: 1.17.4; 1.17.6; 1.17.8; 1.17.10;
merge ktrace-lwp.
 1.16 01-Apr-2005  yamt branches: 1.16.2;
merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.15 10-Nov-2003  wiz branches: 1.15.8; 1.15.10;
Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.14 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.13 14-Jul-2003  lukem use __KERNEL_RCSID() in a consistent manner
 1.12 14-Jul-2003  lukem use __KERNEL_RCSID(0, instead of RCSID( in the kernel
 1.11 03-May-2003  wiz branches: 1.11.2;
DMA, not dma nor Dma.
 1.10 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.9 05-Oct-2002  chs add missing protos, clean up includes.
 1.8 22-Aug-2002  thorpej * Add PTE_SYNC() and PTE_SYNC_RANGE() macros. These don't actually do
anything yet.
* Use PTE_SYNC() and PTE_SYNC_RANGE() in some obvious places, i.e.
where vtopte() is used.
 1.7 05-Apr-2002  thorpej branches: 1.7.2;
* Rewrite the 32-bit ARM pte.h based on the ARM architecture manual.
Significant cleanup, here, including better PTE bit names.
* Add XScale PTE extensions (ECC enable, write-allocate cache mode).
* Mechanical changes everywhere else to update for new pte.h. While
doing this, two bugs (as a result of typos) were fixed in

arm/arm32/bus_dma.c
evbarm/integrator/int_bus_dma.c
 1.6 24-Mar-2002  thorpej Use vtopte() instead of pmap_pte().
 1.5 18-Feb-2002  bjh21 Internal prototypes for loads of functions.
Casts in calls to sc_setup_dma and sc_need_bump to match implementations.
__RCSID() while I'm here.
 1.4 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.3 27-Nov-2001  thorpej branches: 1.3.2;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.2 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.7 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.6 27-Aug-2002  thorpej Sync with -current.
 1.1.4.5 17-Apr-2002  nathanw Catch up to -current.
 1.1.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file esc.c was added on branch nathanw_sa on 2002-01-08 00:22:46 +0000
 1.3.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.3.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.1 27-Nov-2001  thorpej file esc.c was added on branch kqueue on 2002-01-10 19:36:32 +0000
 1.7.2.1 30-Aug-2002  gehenna catch up with -current.
 1.11.2.4 01-Apr-2005  skrll Sync with HEAD.
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.15.10.1 28-Jan-2005  yamt convert arch/acorn{26,32} to new apis.
 1.15.8.1 29-Apr-2005  kent sync with -current
 1.16.2.1 21-Jun-2006  yamt sync with head.
 1.17.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.17.8.1 13-Mar-2006  yamt sync with head.
 1.17.6.1 22-Apr-2006  simonb Sync with head.
 1.17.4.1 09-Sep-2006  rpaulo sync with head
 1.18.84.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.78.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.70.2 20-Jun-2009  yamt sync with head
 1.18.70.1 04-May-2009  yamt sync with head.
 1.23.4.1 05-Mar-2011  rmind sync with head
 1.24.18.3 03-Dec-2017  jdolecek update from HEAD
 1.24.18.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.24.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.24.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.24.8.1 30-Oct-2012  yamt sync with head
 1.25.2.1 18-May-2014  rmind sync with head
 1.29.2.2 05-Oct-2016  skrll Sync with HEAD
 1.29.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.31.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file escreg.h was added on branch kqueue on 2002-01-10 19:36:32 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file escreg.h was added on branch nathanw_sa on 2001-10-05 22:27:56 +0000
 1.10 21-Aug-2021  andvar fix some more typos in comments/log messages, improve wording as well.
 1.9 22-Jul-2020  msaitoh s/reseting/resetting/
 1.8 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.7 14-Mar-2009  dsl branches: 1.7.12; 1.7.22;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.6 11-Dec-2005  christos branches: 1.6.80; 1.6.88; 1.6.94;
merge ktrace-lwp.
 1.5 10-Nov-2003  wiz Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.4 09-Apr-2003  thorpej branches: 1.4.2;
Use PAGE_SIZE rather than NBPG.
 1.3 05-Oct-2002  chs add missing protos, clean up includes.
 1.2 18-Feb-2002  bjh21 Add prototypes for function pointers in struct esc_softc.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file escvar.h was added on branch kqueue on 2002-01-10 19:36:33 +0000
 1.1.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file escvar.h was added on branch nathanw_sa on 2002-02-28 04:05:57 +0000
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.6.80.1 04-May-2009  yamt sync with head.
 1.7.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7.12.1 30-Oct-2012  yamt sync with head
 1.36 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.35 04-Apr-2022  andvar fix various typos, mainly in comments.
 1.34 20-Oct-2017  jdolecek move ata_queue_alloc(1) and ata_queue_free() calls to ata_channel_init()
and ata_channel_destroy() respectively, to make attachment code simpler,
and to make it easier to spot special queue manipulation like cmdide(4)

on topic of PR kern/52606
 1.33 07-Oct-2017  jdolecek Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch

ATA subsystem was changed to support several outstanding commands, and use
NCQ xfers if supported by both the controller and the disk, including NCQ
error recovery. Set NCQ high priority for BPRIO_TIMECRITICAL xfers
if supported. Added FUA support.

Done some work towards MP-safe, all ATA code tsleep()/wakeup() replaced
by condvars, and switched most code from spl* to mutexes (separate
wd(4) and ata channel lock).

Introduced new option WD_CHAOS_MONKEY to facilitate testing of error
handling, fixed several uncovered issues. Also fixed several problems
with kernel dump to wd(4) disk.

Tested with ahcisata(4), mvsata(4), siisata(4), piixide(4) on amd64,
with and without port multiplier, both disk and ATAPI devices; other
drivers and archs mechanically adjusted and compile-tested. NCQ is
supported for ahcisata(4) and siisata(4) for any controller, for
mvsata(4) only Gen IIe ones for now. Also enabled ATAPI support in
mvsata(4).

Thanks to Matt Thomas for initial ATA infrastructure patch, and
Jonathan A.Kollasch for siisata(4) NCQ changes and general testing.

Also fixes PR kern/43169 (wd(4)); and PR kern/11811, PR kern/47041,
PR kern/51979 (kernel dump)
 1.32 31-Jul-2012  bouyer branches: 1.32.2; 1.32.28;
Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
 1.31 26-Jul-2012  jakllsch Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
 1.30 02-Jul-2012  bouyer Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
when SATA cable move was needed
 1.29 19-Jul-2011  dyoung branches: 1.29.2;
Change <machine/bus.h> to <sys/bus.h> throughout.

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

Mark acorn32/bus.h obsolete.
 1.28 12-May-2009  cegger use device_xname()
 1.27 18-Mar-2008  cube branches: 1.27.4; 1.27.18;
Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
 1.26 09-Oct-2006  bjh21 branches: 1.26.28; 1.26.30; 1.26.50; 1.26.54;
The correct number of elements to insert into cmd_iohs is WDC_NREG. Using
larger numbers risks a buffer overflow and panic. Bug spotted by Mike Pumford.
Patch compile-tested only, but it's obviously correct.
 1.25 16-Jan-2006  bouyer branches: 1.25.18; 1.25.20;
properly use ata_channel->ch_ndrive:
- initialize it properly in the bus front-ends (all 2, exept in wdc_pcmcia.c
for the "Sandisk CompactFlash Card" where it's set to 1)
- remplace hardcoded '2' by ata_channel->ch_ndrive in MI IDE drivers.

From Christos Zoulas in kern/32501.
 1.24 11-Dec-2005  christos branches: 1.24.2;
merge ktrace-lwp.
 1.23 20-Aug-2004  thorpej branches: 1.23.12;
Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
 1.22 14-Aug-2004  thorpej - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
ata_channel. Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
maximum number of drives that can be present on the channel. For now,
this is always 2. Add an ATA_MAXDRIVES constant that places an upper
limit on this value, also currently 2.
 1.21 25-May-2004  thorpej Add the notion of "shadow registers" to the wdc driver. These shadow
registers are registers that overlap with others on many controllers, but
which may actually be distinct on some controllers. Right now, the two
shadows are:

- wd_status (usually overlaps wd_command)
- wd_features (usually overlaps wd_error)

Add a new helper function, wdc_init_shadow_regs(), used to initialize
the shadow register handles on controllers where they do actually overlap.

Partially from Jordan Rhody @ Wasabi Systems, Inc.
 1.20 03-Jan-2004  thorpej More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc
 1.19 03-Jan-2004  thorpej Rename "struct channel_softc" to "struct wdc_channel".
 1.18 01-Jan-2004  thorpej Rename:
- wdc_xfer to ata_xfer
- channel_queue to ata_queue
and move them to <dev/ata/atavar.h> so they can be used by non-wdc ATA
controllers. Clean up the member names of these structures while at it.
 1.17 31-Dec-2003  thorpej Simplify allocation of the channel queue.
 1.16 02-Dec-2003  bjh21 Update for new world of indirect wdc registers.
 1.15 19-Oct-2003  he Adapt to the new wdcattach() signature.
 1.14 08-Oct-2003  bouyer Adapt for wdcattach() prototype change.
 1.13 25-Sep-2003  mycroft Hide the use of config_interrupts() in one place.
 1.12 24-Sep-2003  mycroft Take a stab at making this compile, at least.
 1.11 21-Sep-2003  matt Adapt to new wdcattach calling conventions.
 1.10 02-Oct-2002  thorpej branches: 1.10.8;
Fix script-o's in previous.
 1.9 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.8 01-Oct-2002  bjh21 Constify ide_versions.
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 15-Sep-2002  bjh21 Cleanup: Remove no-longer-accurate comment, un-__P, ANSIfy, __KERNEL_RCSID,
other light KNF.
 1.5 15-Sep-2002  bjh21 Allocate channel structures as part of the softc rather than malloc'ing them
at run time. This simplifies the code and avoids problems with uninitialised
variables, and if it's good enough for pciide(4), it's good enough for me.

Also normalise the prefix for channel-specific messages.
 1.4 14-Sep-2002  bjh21 On ARCIN v6 cards, clear the EPROM page latch on shutdown. This seems to be
necessary to allow the card to be detected afterwards. In theory, this
shouldn't be necessary, since we don't touch the page latch yet, but I'm not
going to argue.
 1.3 22-May-2002  bjh21 Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.

This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.2 27-Nov-2001  thorpej branches: 1.2.2; 1.2.10; 1.2.12;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.4 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file icside.c was added on branch nathanw_sa on 2002-01-08 00:22:46 +0000
 1.2.12.1 01-Nov-2002  tron Pull up revision 1.3 (requested by chris in ticket #120):
Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.
This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.2.10.1 30-May-2002  gehenna Catch up with -current.
 1.2.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.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 27-Nov-2001  thorpej file icside.c was added on branch kqueue on 2002-01-10 19:36:33 +0000
 1.10.8.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.8.3 18-Sep-2004  skrll Sync with HEAD.
 1.10.8.2 25-Aug-2004  skrll Sync with HEAD.
 1.10.8.1 03-Aug-2004  skrll Sync with HEAD
 1.23.12.3 24-Mar-2008  yamt sync with head.
 1.23.12.2 30-Dec-2006  yamt sync with head.
 1.23.12.1 21-Jun-2006  yamt sync with head.
 1.24.2.1 01-Feb-2006  yamt sync with head.
 1.25.20.1 22-Oct-2006  yamt sync with head
 1.25.18.1 18-Nov-2006  ad Sync with head.
 1.26.54.1 03-Apr-2008  mjf Sync with HEAD.
 1.26.50.1 24-Mar-2008  keiichi sync with head.
 1.26.30.1 23-Mar-2008  matt sync with HEAD
 1.26.28.1 21-Mar-2008  chris Sync with head.
 1.27.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.27.4.1 16-May-2009  yamt sync with head
 1.29.2.1 30-Oct-2012  yamt sync with head
 1.32.28.2 27-Sep-2017  jdolecek change wdc_init_shadow_regs() to accept only struct wdc_regs, it doesn't
touch anything else

factor out the probe-only struct ata_channel initialization to wdcprobe(), to
reduce duplication of logic in individual drivers, and to actually work now
that more init is needed beyond the memset()
 1.32.28.1 24-Apr-2017  jdolecek use ata_queue_alloc() to dynamically allocate ata_queue for ata channel
 1.32.2.1 03-Dec-2017  jdolecek update from HEAD
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file icside_io_asm.S was added on branch kqueue on 2002-01-10 19:36:33 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file icside_io_asm.S was added on branch nathanw_sa on 2001-10-05 22:27:57 +0000
 1.3 15-Sep-2002  bjh21 Allocate channel structures as part of the softc rather than malloc'ing them
at run time. This simplifies the code and avoids problems with uninitialised
variables, and if it's good enough for pciide(4), it's good enough for me.

Also normalise the prefix for channel-specific messages.
 1.2 14-Sep-2002  bjh21 On ARCIN v6 cards, clear the EPROM page latch on shutdown. This seems to be
necessary to allow the card to be detected afterwards. In theory, this
shouldn't be necessary, since we don't touch the page latch yet, but I'm not
going to argue.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file icsidereg.h was added on branch kqueue on 2002-01-10 19:36:33 +0000
 1.1.4.2 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file icsidereg.h was added on branch nathanw_sa on 2002-09-17 21:12:27 +0000
 1.57 18-Aug-2025  andvar Fix various typos, mainly in comments:
s/invaid/invalid/
s/instad/instead/
s/wich/with/
s/tranform/transform/
s/tranmist/transmit/
s/tranceiver/transceiver/
s/Tranparent/Transparent/
s/tranlated/translated/
s/tranfer/transfer/
s/tranmissions/transmissions/
s/condtions/conditions/
s/Recient/Recent/
 1.56 06-Oct-2024  andvar Fix couple of typos in comments.
 1.55 05-Feb-2024  andvar branches: 1.55.2;
triple "r" typos, mainly s/interrrupt/interrupt/ in comments and one definition.
 1.54 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.53 17-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.52 08-Apr-2022  andvar fix various typos, mainly in comments, but also log messages, docs, game text.
 1.51 10-Nov-2021  msaitoh s/structre/structure/ in comment.
 1.50 19-Sep-2021  andvar fix various typos in comments, messages and documentation.
 1.49 24-Jul-2021  andvar s/structres/structures + s/whenver/whenever
 1.48 05-Feb-2020  skrll branches: 1.48.10;
Adopt <net/if_stats.h>
 1.47 05-Feb-2020  skrll Adopt <net/if_stats.h>
 1.46 04-Feb-2020  skrll Trailing whitespace
 1.45 04-Feb-2020  skrll Adopt <net/if_stats.h>
 1.44 13-Sep-2019  msaitoh branches: 1.44.2;
if_flags is neither int nor short. It's unsigned short.
 1.43 05-Feb-2019  msaitoh Remove very old IFF_NOTRAILERS flag.
 1.42 26-Jun-2018  msaitoh branches: 1.42.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.41 22-Jun-2018  msaitoh It's not required to include net/bpfdesc.h. Remove it.
 1.40 25-Jun-2017  maxv branches: 1.40.4;
spl leak, found by Mootja
 1.39 22-Feb-2017  nonaka branches: 1.39.6;
Apply deferred if_start to more MD drivers.
 1.38 15-Dec-2016  ozaki-r branches: 1.38.2;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

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

Proposed on tech-kern and tech-net
 1.37 10-Jun-2016  ozaki-r branches: 1.37.2;
Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
 1.36 09-Feb-2016  ozaki-r Introduce softint-based if_input

This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.35 20-May-2015  ozaki-r Remove leftover use of AF_NS and NS option

Unnecessary NETISR_NS is also removed.
 1.34 25-Oct-2014  skrll branches: 1.34.2;
Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.33 18-Oct-2014  snj src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.32 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.31 10-May-2012  skrll branches: 1.31.2;
_int*_t -> uint*_t

Same code before and after.
 1.30 03-Jun-2011  matt branches: 1.30.2; 1.30.6;
device_t, cfdata_t, device_private, device_xname cleanup
CFATTACH_DECL_NEW for struct device only devices
bump SYMTAB_SPACE for EB7500ATX
 1.29 05-Apr-2010  joerg branches: 1.29.2; 1.29.6;
Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.28 19-Jan-2010  pooka branches: 1.28.2; 1.28.4;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

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

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.27 16-May-2009  cegger KNF, same object code generated
 1.26 12-May-2009  cegger use device_xname()
 1.25 18-Mar-2009  cegger bcopy -> memcpy
 1.24 18-Mar-2009  cegger bzero -> memset
 1.23 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.22 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.21 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.20 07-Nov-2008  dyoung branches: 1.20.4;
*** Summary ***

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

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

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

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

Return consistent, appropriate error codes from network drivers.

Improve readability. KNF.

*** Details ***

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Let ifioctl_common() handle SIOCGIFADDR.

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

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

bzero -> memset. Delete unnecessary casts to void *. Use
sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with
NULL instead of "testing truth". Replace some instances of (type
*)0 with NULL. Change some K&R prototypes to ANSI C, and join
lines.
 1.19 17-Oct-2007  garbled branches: 1.19.16; 1.19.20; 1.19.26; 1.19.28;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.18 26-Aug-2007  dyoung branches: 1.18.2;
Constify.
 1.17 04-Mar-2007  christos branches: 1.17.2; 1.17.10; 1.17.14; 1.17.18; 1.17.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.16 26-Oct-2006  bjh21 branches: 1.16.4;
No need for two __KERNEL_RCSIDs.
 1.15 24-Dec-2005  perry branches: 1.15.20; 1.15.22;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.14 11-Dec-2005  christos merge ktrace-lwp.
 1.13 14-Jul-2003  lukem branches: 1.13.16;
use __KERNEL_RCSID() in a consistent manner
 1.12 14-Jul-2003  lukem use __KERNEL_RCSID(0, instead of RCSID( in the kernel
 1.11 20-Jan-2003  bouyer branches: 1.11.2;
bzero the part of the buffer used to pad the packet to
ETHER_MIN_LEN - ETHER_CRC_LEN.
 1.10 02-Oct-2002  thorpej Fix script-o's in previous.
 1.9 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.6 22-May-2002  bjh21 Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.

This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.5 18-Feb-2002  bjh21 branches: 1.5.8; 1.5.10;
Add internal prototypes for lots of functions.
Add __RCSID() while I'm here.
 1.4 16-Jan-2002  thorpej Use bpf_mtap().
 1.3 27-Nov-2001  thorpej branches: 1.3.2;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.2 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.4 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file if_ie.c was added on branch nathanw_sa on 2002-01-08 00:22:46 +0000
 1.3.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.3.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.1 27-Nov-2001  thorpej file if_ie.c was added on branch kqueue on 2002-01-10 19:36:34 +0000
 1.5.10.2 28-Jan-2003  jmc Pullup revisions 1.10-1.11 (requested by bouyer in ticket #1120)
bzero the part of the buffer used to pad the packet to
ETHER_MIN_LEN - ETHER_CRC_LEN.
 1.5.10.1 01-Nov-2002  tron Pull up revision 1.6 (requested by chris in ticket #120):
Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.
This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.5.8.1 30-May-2002  gehenna Catch up with -current.
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.16.3 03-Sep-2007  yamt sync with head.
 1.13.16.2 30-Dec-2006  yamt sync with head.
 1.13.16.1 21-Jun-2006  yamt sync with head.
 1.15.22.1 10-Dec-2006  yamt sync with head.
 1.15.20.1 18-Nov-2006  ad Sync with head.
 1.16.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.17.20.1 01-Jan-2008  chris Sync with HEAD.
 1.17.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.17.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.17.10.1 03-Oct-2007  garbled Sync with HEAD
 1.17.2.1 09-Oct-2007  ad Sync with head.
 1.18.2.1 06-Nov-2007  matt sync with HEAD
 1.19.28.2 28-Apr-2009  skrll Sync with HEAD.
 1.19.28.1 19-Jan-2009  skrll Sync with HEAD.
 1.19.26.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.19.20.5 11-Aug-2010  yamt sync with head.
 1.19.20.4 11-Mar-2010  yamt sync with head
 1.19.20.3 20-Jun-2009  yamt sync with head
 1.19.20.2 16-May-2009  yamt sync with head
 1.19.20.1 04-May-2009  yamt sync with head.
 1.19.16.1 17-Jan-2009  mjf Sync with HEAD.
 1.20.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.28.4.2 12-Jun-2011  rmind sync with head
 1.28.4.1 30-May-2010  rmind sync with head
 1.28.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.29.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.29.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.30.6.1 02-Jun-2012  mrg sync to latest -current.
 1.30.2.2 30-Oct-2012  yamt sync with head
 1.30.2.1 23-May-2012  yamt sync with head.
 1.31.2.2 03-Dec-2017  jdolecek update from HEAD
 1.31.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.34.2.5 28-Aug-2017  skrll Sync with HEAD
 1.34.2.4 05-Feb-2017  skrll Sync with HEAD
 1.34.2.3 09-Jul-2016  skrll Sync with HEAD
 1.34.2.2 19-Mar-2016  skrll Sync with HEAD
 1.34.2.1 06-Jun-2015  skrll Sync with HEAD
 1.37.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.37.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.38.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.39.6.1 26-Jul-2018  snj Pull up following revision(s) (requested by msaitoh in ticket #938):
sys/arch/acorn32/podulebus/if_ie.c: revision 1.41
sys/arch/amiga/dev/if_es.c: revision 1.58
sys/arch/amiga/dev/if_qn.c: revision 1.45
sys/arch/arm/at91/at91emac.c: revision 1.20
sys/arch/arm/ep93xx/epe.c: revision 1.37
sys/arch/emips/ebus/if_le_ebus.c: revision 1.14
sys/arch/emips/ebus/if_le_ebus.c: revision 1.15
sys/arch/mac68k/dev/if_mc.c: revision 1.46
sys/arch/macppc/dev/am79c950.c: revision 1.39
sys/arch/newsmips/apbus/if_sn.c: revision 1.40
sys/arch/next68k/dev/mb8795.c: revision 1.59
sys/arch/playstation2/dev/if_smap.c: revision 1.25
sys/arch/playstation2/dev/if_smap.c: revision 1.26
sys/arch/sun2/dev/if_ec.c: revision 1.28
sys/arch/sun3/dev/if_ie.c: revision 1.63
sys/arch/x68k/dev/if_ne_intio.c: revision 1.19
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.75
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.63
sys/dev/bi/if_ni.c: revision 1.45
sys/dev/cadence/if_cemac.c: revision 1.12
sys/dev/ic/am7990.c: revision 1.78
sys/dev/ic/am79900.c: revision 1.27
sys/dev/ic/an.c: revision 1.67
sys/dev/ic/cs89x0.c: revision 1.40
sys/dev/ic/dm9000.c: revision 1.13
sys/dev/ic/dm9000.c: revision 1.14
sys/dev/ic/dp8390.c: revision 1.88
sys/dev/ic/elink3.c: revision 1.141
sys/dev/ic/elinkxl.c: revision 1.122
sys/dev/ic/hme.c: revision 1.98
sys/dev/ic/i82586.c: revision 1.77
sys/dev/ic/lance.c: revision 1.53
sys/dev/ic/mb86950.c: revision 1.27
sys/dev/ic/mb86960.c: revision 1.86
sys/dev/ic/mtd803.c: revision 1.34
sys/dev/ic/pdq_ifsubr.c: revision 1.59
sys/dev/ic/rrunner.c: revision 1.86
sys/dev/ic/seeq8005.c: revision 1.58
sys/dev/ic/sgec.c: revision 1.47
sys/dev/ic/smc90cx6.c: revision 1.72
sys/dev/ic/smc91cxx.c: revision 1.96
sys/dev/ic/tropic.c: revision 1.49
sys/dev/ic/wi.c: revision 1.245
sys/dev/isa/if_eg.c: revision 1.93
sys/dev/isa/if_el.c: revision 1.95
sys/dev/isa/if_iy.c: revision 1.101
sys/dev/ofw/ofnet.c: revision 1.58
sys/dev/pci/if_alc.c: revision 1.27
sys/dev/pci/if_de.c: revision 1.152
sys/dev/pci/if_fpa.c: revision 1.61
sys/dev/pci/if_jme.c: revision 1.34
sys/dev/pci/if_tl.c: revision 1.108
sys/dev/pci/if_vte.c: revision 1.19
sys/dev/pci/ixgbe/ixgbe.h: revision 1.50
sys/dev/pcmcia/if_cnw.c: revision 1.62
sys/dev/pcmcia/if_malo_pcmcia.c: revision 1.17
sys/dev/pcmcia/if_ray.c: revision 1.89
sys/dev/pcmcia/if_xi.c: revision 1.81
sys/dev/pcmcia/mhzc.c: revision 1.51
sys/dev/pcmcia/xirc.c: revision 1.34
sys/dev/qbus/if_de.c: revision 1.33
sys/dev/qbus/if_qe.c: revision 1.78
sys/dev/qbus/if_qt.c: revision 1.22
sys/dev/sbus/be.c: revision 1.87
sys/dev/sbus/qe.c: revision 1.68
sys/dev/scsipi/if_se.c: revision 1.96
sys/dev/usb/if_atu.c: revision 1.59
sys/net/if_l2tp.c: revision 1.28 via patch
sys/net/if_ppp.c: revision 1.160
It's not required to include net/bpfdesc.h. Remove it.
--
Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
--
Remove duplicated inclusion of net/bpf.h.
--
Remove duplicated inclusion of net/bpf.h.
--
Simplify bpf_mtap() call. No functional change.
 1.40.4.2 28-Jul-2018  pgoyette Sync with HEAD
 1.40.4.1 25-Jun-2018  pgoyette Sync with HEAD
 1.42.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.42.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.42.2.1 10-Jun-2019  christos Sync with HEAD
 1.44.2.1 29-Feb-2020  ad Sync with head.
 1.48.10.1 01-Aug-2021  thorpej Sync with HEAD.
 1.55.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 04-Mar-2007  christos branches: 1.2.42; 1.2.44; 1.2.46;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.40; 1.1.78;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.78.1 12-Mar-2007  rmind Sync with HEAD.
 1.1.40.1 03-Sep-2007  yamt sync with head.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file if_iereg.h was added on branch kqueue on 2002-01-10 19:36:34 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file if_iereg.h was added on branch nathanw_sa on 2001-10-05 22:27:57 +0000
 1.2.46.1 16-May-2008  yamt sync with head.
 1.2.44.1 18-May-2008  yamt sync with head.
 1.2.42.1 02-Jun-2008  mjf Sync with HEAD.
 1.20 29-May-2019  msaitoh KNF. No functional change.
 1.19 25-Apr-2019  msaitoh No functional change:
- Use __arraycount().
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.
 1.18 21-Jan-2014  christos branches: 1.18.30;
fix unused variables
 1.17 10-May-2012  skrll branches: 1.17.2; 1.17.4;
_int*_t -> uint*_t

Same code before and after.
 1.16 19-Jul-2011  dyoung branches: 1.16.2; 1.16.6;
Change <machine/bus.h> to <sys/bus.h> throughout.

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

Mark acorn32/bus.h obsolete.
 1.15 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.14 12-Mar-2008  cube branches: 1.14.2; 1.14.4;
Split device_t and softc for the NE2000 Ethernet chip and all its variants
and attachments. Use device_t accessors, correct types, and ANSIfy when
appropriate.
 1.13 11-Dec-2005  christos branches: 1.13.50; 1.13.52; 1.13.72; 1.13.76;
merge ktrace-lwp.
 1.12 06-Dec-2003  bjh21 branches: 1.12.16;
Correct typo in last.
 1.11 06-Dec-2003  bjh21 Fix tiny formatting glitches.
 1.10 14-Jul-2003  lukem use __KERNEL_RCSID() in a consistent manner
 1.9 02-Oct-2002  thorpej branches: 1.9.8;
Fix script-o's in previous.
 1.8 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.5 22-May-2002  bjh21 Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.

This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.4 16-Dec-2001  bjh21 branches: 1.4.2; 1.4.10; 1.4.12;
Use the MI DP83905 support for media selection on those cards that use it.
 1.3 15-Dec-2001  bjh21 Use the MX98905 bug workaround for EtherN and EtherI cards.
 1.2 27-Nov-2001  thorpej Use <machine/intr.h>, not <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file if_ne_pbus.c was added on branch nathanw_sa on 2002-01-08 00:22:47 +0000
 1.4.12.1 01-Nov-2002  tron Pull up revision 1.5 (requested by chris in ticket #120):
Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.
This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.4.10.1 30-May-2002  gehenna Catch up with -current.
 1.4.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.3 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 16-Dec-2001  thorpej file if_ne_pbus.c was added on branch kqueue on 2002-01-10 19:36:34 +0000
 1.9.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.8.1 03-Aug-2004  skrll Sync with HEAD
 1.12.16.1 17-Mar-2008  yamt sync with head.
 1.13.76.2 02-Jun-2008  mjf Sync with HEAD.
 1.13.76.1 03-Apr-2008  mjf Sync with HEAD.
 1.13.72.1 24-Mar-2008  keiichi sync with head.
 1.13.52.1 23-Mar-2008  matt sync with HEAD
 1.13.50.2 21-Mar-2008  chris Sync with head.
 1.13.50.1 09-Feb-2008  chris Add initial reworking of acorn32 to use new interrupt code.

Note that cats probably won't work currently as acorn32 changed the way
that the pic is registered, it has to provide the irq lines as on acorn32
we attach the iomd after we need to register irqs for the pioc. So we
setup the irqs for iomd before malloc etc are available. This needs
to be fixed.

More work is still needed to update most of the podulebus drivers.
First I need to add podulebus wrapper for interrupts that handles the
maskaddr and maskbits. Exposing them to the common irq code is wrong.
 1.14.4.1 16-May-2008  yamt sync with head.
 1.14.2.1 18-May-2008  yamt sync with head.
 1.16.6.1 02-Jun-2012  mrg sync to latest -current.
 1.16.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.16.2.1 23-May-2012  yamt sync with head.
 1.17.4.1 18-May-2014  rmind sync with head
 1.17.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.30.1 10-Jun-2019  christos Sync with HEAD
 1.4 10-Feb-2024  andvar fix various typos in comments and log messages.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 16-Dec-2001  bjh21 branches: 1.2.2; 1.2.124; 1.2.126; 1.2.128;
Use the MI DP83905 support for media selection on those cards that use it.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file if_ne_pbusreg.h was added on branch nathanw_sa on 2002-01-08 00:22:47 +0000
 1.2.128.1 16-May-2008  yamt sync with head.
 1.2.126.1 18-May-2008  yamt sync with head.
 1.2.124.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 16-Dec-2001  thorpej file if_ne_pbusreg.h was added on branch kqueue on 2002-01-10 19:36:34 +0000
 1.12 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.11 25-Oct-2014  skrll Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.10 10-May-2012  skrll branches: 1.10.2;
_int*_t -> uint*_t

Same code before and after.
 1.9 03-Jun-2011  matt branches: 1.9.2; 1.9.6;
device_t, cfdata_t, device_private, device_xname cleanup
CFATTACH_DECL_NEW for struct device only devices
bump SYMTAB_SPACE for EB7500ATX
 1.8 14-Mar-2009  dsl branches: 1.8.4; 1.8.6; 1.8.10;
Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.7 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.6 05-Oct-2002  chs branches: 1.6.116; 1.6.124; 1.6.130;
add missing protos, clean up includes.
 1.5 19-Jun-2002  bjh21 $Id$ -> $NetBSD$ (oops).
 1.4 27-Nov-2001  thorpej branches: 1.4.2; 1.4.10;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.3 23-Nov-2001  thorpej No need to pull in <machine/pte.h> directly.
 1.2 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 01-Aug-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file netslot.c was added on branch nathanw_sa on 2002-01-08 00:22:47 +0000
 1.4.10.1 16-Jul-2002  gehenna catch up with -current.
 1.4.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 27-Nov-2001  thorpej file netslot.c was added on branch kqueue on 2002-01-10 19:36:35 +0000
 1.6.130.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6.124.1 28-Apr-2009  skrll Sync with HEAD.
 1.6.116.1 04-May-2009  yamt sync with head.
 1.8.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.8.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.4.1 12-Jun-2011  rmind sync with head
 1.9.6.1 02-Jun-2012  mrg sync to latest -current.
 1.9.2.1 23-May-2012  yamt sync with head.
 1.10.2.1 03-Dec-2017  jdolecek update from HEAD
 1.34 30-May-2022  andvar s/identifing/identifying/ and s/multipler/multiplier/ in comments.
 1.33 11-Sep-2021  andvar Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
 1.32 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.31 24-Apr-2021  thorpej branches: 1.31.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.30 20-Nov-2020  thorpej branches: 1.30.2;
malloc(9) -> kmem(9)
 1.29 25-Oct-2014  skrll branches: 1.29.32;
Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.28 13-Sep-2014  matt Replace more vm_offset_t, vm_size_t with vaddr_t, vsize_t
Use paddr_t for msgbufphys
 1.27 21-Mar-2014  christos kill sprintf
 1.26 03-Jun-2011  matt branches: 1.26.2; 1.26.12; 1.26.16;
device_t, cfdata_t, device_private, device_xname cleanup
CFATTACH_DECL_NEW for struct device only devices
bump SYMTAB_SPACE for EB7500ATX
 1.25 12-May-2009  cegger branches: 1.25.4; 1.25.6; 1.25.10;
use device_xname()
 1.24 15-Mar-2009  cegger ansify function definitions
 1.23 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.22 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.21 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.20 11-Dec-2005  christos branches: 1.20.80; 1.20.88; 1.20.94;
merge ktrace-lwp.
 1.19 26-Aug-2005  drochner s/locdesc_t/int/g
 1.18 28-Jun-2005  drochner branches: 1.18.2;
convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose
(untested, sorry)
 1.17 21-May-2003  thorpej branches: 1.17.2;
Fully switch acorn32 to the new pmap; it has been confirmed to work.
 1.16 26-Apr-2003  chris Add support for ARM32_PMAP_NEW. Note that due to changes to how the l1
table is handled the podulebus mappings are now done at initarm, rather
than in the podulebus code. While I'm not happy with this it does work,
perhaps there's a better way to do it?

Not enableing by default I've not got enough cards to check the podulebus
change hasn't broken something (works with my rapide and with my network
podule)
 1.15 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.14 02-Oct-2002  thorpej Fix script-o's in previous.
 1.13 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.12 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.11 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.10 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.9 22-May-2002  bjh21 Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.

This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.8 05-Apr-2002  thorpej branches: 1.8.2; 1.8.4;
* Rewrite the 32-bit ARM pte.h based on the ARM architecture manual.
Significant cleanup, here, including better PTE bit names.
* Add XScale PTE extensions (ECC enable, write-allocate cache mode).
* Mechanical changes everywhere else to update for new pte.h. While
doing this, two bugs (as a result of typos) were fixed in

arm/arm32/bus_dma.c
evbarm/integrator/int_bus_dma.c
 1.7 10-Mar-2002  bjh21 __RCSID -> __KERNEL_RCSID
 1.6 20-Feb-2002  thorpej Rename map_section() to pmap_map_section(), move it to pmap.c, and give it
an extra argument (prot - specifies protection of the mapping).
 1.5 18-Feb-2002  bjh21 Add prototypes for podulebusmatch(), podulebusattach(), podulebusprint(),
podulebussubmatch(), podulechunkdirectory() and podulesncan().
Fix argument types of podulebussubmatch().
Remove podloader_read_region(), since it's not used externally.
 1.4 27-Nov-2001  thorpej branches: 1.4.2;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.3 23-Nov-2001  thorpej No need to pull in <machine/pte.h> directly.
 1.2 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.8 03-Jan-2003  thorpej Sync with HEAD.
 1.1.4.7 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.6 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.5 17-Apr-2002  nathanw Catch up to -current.
 1.1.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file podulebus.c was added on branch nathanw_sa on 2002-01-08 00:22:47 +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 16-Mar-2002  jdolecek Catch up with -current.
 1.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 27-Nov-2001  thorpej file podulebus.c was added on branch kqueue on 2002-01-10 19:36:35 +0000
 1.8.4.1 01-Nov-2002  tron Pull up revision 1.9 (requested by chris in ticket #120):
Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.
This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.8.2.1 30-May-2002  gehenna Catch up with -current.
 1.17.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.2.1 21-Jun-2006  yamt sync with head.
 1.20.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.20.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.20.80.2 16-May-2009  yamt sync with head
 1.20.80.1 04-May-2009  yamt sync with head.
 1.25.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.25.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.25.4.1 12-Jun-2011  rmind sync with head
 1.26.16.1 18-May-2014  rmind sync with head
 1.26.12.2 03-Dec-2017  jdolecek update from HEAD
 1.26.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.26.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.29.32.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.30.2.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.30.2.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.31.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file podulebus.h was added on branch kqueue on 2002-01-10 19:36:35 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file podulebus.h was added on branch nathanw_sa on 2001-10-05 22:27:58 +0000
 1.9 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.8 10-May-2012  skrll branches: 1.8.38;
_int*_t -> uint*_t

Same code before and after.
 1.7 19-Jul-2011  dyoung branches: 1.7.2; 1.7.6;
Change <machine/bus.h> to <sys/bus.h> throughout.

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

Mark acorn32/bus.h obsolete.
 1.6 15-Mar-2009  cegger ansify function definitions
 1.5 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.4 11-Dec-2005  christos branches: 1.4.80; 1.4.88; 1.4.94;
merge ktrace-lwp.
 1.3 14-Jul-2003  lukem use __KERNEL_RCSID() in a consistent manner
 1.2 27-Sep-2002  provos branches: 1.2.8;
remove trailing \n in panic(). approved perry.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file podulebus_io.c was added on branch kqueue on 2002-01-10 19:36:35 +0000
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file podulebus_io.c was added on branch nathanw_sa on 2002-10-18 02:33:44 +0000
 1.2.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.8.1 03-Aug-2004  skrll Sync with HEAD
 1.4.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.80.1 04-May-2009  yamt sync with head.
 1.7.6.1 02-Jun-2012  mrg sync to latest -current.
 1.7.2.1 23-May-2012  yamt sync with head.
 1.8.38.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file podulebus_io_asm.S was added on branch kqueue on 2002-01-10 19:36:36 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file podulebus_io_asm.S was added on branch nathanw_sa on 2001-10-05 22:27:59 +0000
 1.21 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.20 24-Apr-2021  thorpej branches: 1.20.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.19 13-Sep-2014  matt branches: 1.19.34;
Replace more vm_offset_t, vm_size_t with vaddr_t, vsize_t
Use paddr_t for msgbufphys
 1.18 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.17 03-Jun-2011  matt branches: 1.17.2; 1.17.12;
device_t, cfdata_t, device_private, device_xname cleanup
CFATTACH_DECL_NEW for struct device only devices
bump SYMTAB_SPACE for EB7500ATX
 1.16 12-May-2009  cegger branches: 1.16.4; 1.16.6; 1.16.10;
use device_xname()
 1.15 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.14 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.13 11-Dec-2005  christos branches: 1.13.80; 1.13.88; 1.13.94;
merge ktrace-lwp.
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.11 14-Jul-2003  lukem use __KERNEL_RCSID() in a consistent manner
 1.10 03-May-2003  wiz branches: 1.10.2;
DMA, not dma nor Dma.
 1.9 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.8 05-Oct-2002  chs add missing protos, clean up includes.
 1.7 02-Oct-2002  thorpej Fix script-o's in previous.
 1.6 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.3 05-Aug-2002  bjh21 Rather than forcing on XS_POLL in SCSI transfers ourselves, set
SCSIPI_ADAPT_POLL_ONLY to tell the MI scsipi layer to do it for us. This,
plus G/Cing some debugging code, removes the card-specific scsi_request
wrappers.
 1.2 27-Nov-2001  thorpej branches: 1.2.2; 1.2.10;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 13-Aug-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file ptsc.c was added on branch nathanw_sa on 2002-01-08 00:22:47 +0000
 1.2.10.1 30-Aug-2002  gehenna catch up with -current.
 1.2.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.2.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 27-Nov-2001  thorpej file ptsc.c was added on branch kqueue on 2002-01-10 19:36:36 +0000
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.13.80.2 16-May-2009  yamt sync with head
 1.13.80.1 04-May-2009  yamt sync with head.
 1.16.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.16.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.16.4.1 12-Jun-2011  rmind sync with head
 1.17.12.2 03-Dec-2017  jdolecek update from HEAD
 1.17.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.17.2.1 30-Oct-2012  yamt sync with head
 1.19.34.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.20.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file ptscreg.h was added on branch kqueue on 2002-01-10 19:36:36 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file ptscreg.h was added on branch nathanw_sa on 2001-10-05 22:27:59 +0000
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file ptscvar.h was added on branch kqueue on 2002-01-10 19:36:36 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file ptscvar.h was added on branch nathanw_sa on 2001-10-05 22:27:59 +0000
 1.33 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.32 20-Oct-2017  jdolecek move ata_queue_alloc(1) and ata_queue_free() calls to ata_channel_init()
and ata_channel_destroy() respectively, to make attachment code simpler,
and to make it easier to spot special queue manipulation like cmdide(4)

on topic of PR kern/52606
 1.31 07-Oct-2017  jdolecek Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch

ATA subsystem was changed to support several outstanding commands, and use
NCQ xfers if supported by both the controller and the disk, including NCQ
error recovery. Set NCQ high priority for BPRIO_TIMECRITICAL xfers
if supported. Added FUA support.

Done some work towards MP-safe, all ATA code tsleep()/wakeup() replaced
by condvars, and switched most code from spl* to mutexes (separate
wd(4) and ata channel lock).

Introduced new option WD_CHAOS_MONKEY to facilitate testing of error
handling, fixed several uncovered issues. Also fixed several problems
with kernel dump to wd(4) disk.

Tested with ahcisata(4), mvsata(4), siisata(4), piixide(4) on amd64,
with and without port multiplier, both disk and ATAPI devices; other
drivers and archs mechanically adjusted and compile-tested. NCQ is
supported for ahcisata(4) and siisata(4) for any controller, for
mvsata(4) only Gen IIe ones for now. Also enabled ATAPI support in
mvsata(4).

Thanks to Matt Thomas for initial ATA infrastructure patch, and
Jonathan A.Kollasch for siisata(4) NCQ changes and general testing.

Also fixes PR kern/43169 (wd(4)); and PR kern/11811, PR kern/47041,
PR kern/51979 (kernel dump)
 1.30 31-Jul-2012  bouyer branches: 1.30.2; 1.30.28;
Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
 1.29 26-Jul-2012  jakllsch Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
 1.28 02-Jul-2012  bouyer Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
when SATA cable move was needed
 1.27 19-Jul-2011  dyoung branches: 1.27.2;
Change <machine/bus.h> to <sys/bus.h> throughout.

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

Mark acorn32/bus.h obsolete.
 1.26 18-Mar-2008  cube Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
 1.25 09-Oct-2006  bjh21 branches: 1.25.28; 1.25.30; 1.25.50; 1.25.54;
The correct number of elements to insert into cmd_iohs is WDC_NREG. Using
larger numbers risks a buffer overflow and panic. Bug spotted by Mike Pumford.
Patch compile-tested only, but it's obviously correct.
 1.24 16-Jan-2006  bouyer branches: 1.24.18; 1.24.20;
properly use ata_channel->ch_ndrive:
- initialize it properly in the bus front-ends (all 2, exept in wdc_pcmcia.c
for the "Sandisk CompactFlash Card" where it's set to 1)
- remplace hardcoded '2' by ata_channel->ch_ndrive in MI IDE drivers.

From Christos Zoulas in kern/32501.
 1.23 11-Dec-2005  christos branches: 1.23.2;
merge ktrace-lwp.
 1.22 20-Aug-2004  thorpej branches: 1.22.12;
Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
 1.21 14-Aug-2004  thorpej - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
ata_channel. Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
maximum number of drives that can be present on the channel. For now,
this is always 2. Add an ATA_MAXDRIVES constant that places an upper
limit on this value, also currently 2.
 1.20 25-May-2004  thorpej Add the notion of "shadow registers" to the wdc driver. These shadow
registers are registers that overlap with others on many controllers, but
which may actually be distinct on some controllers. Right now, the two
shadows are:

- wd_status (usually overlaps wd_command)
- wd_features (usually overlaps wd_error)

Add a new helper function, wdc_init_shadow_regs(), used to initialize
the shadow register handles on controllers where they do actually overlap.

Partially from Jordan Rhody @ Wasabi Systems, Inc.
 1.19 03-Jan-2004  thorpej More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc
 1.18 03-Jan-2004  thorpej Rename "struct channel_softc" to "struct wdc_channel".
 1.17 01-Jan-2004  thorpej Rename:
- wdc_xfer to ata_xfer
- channel_queue to ata_queue
and move them to <dev/ata/atavar.h> so they can be used by non-wdc ATA
controllers. Clean up the member names of these structures while at it.
 1.16 31-Dec-2003  thorpej Simplify allocation of the channel queue.
 1.15 02-Dec-2003  bjh21 Update for new world of indirect wdc registers.
 1.14 19-Oct-2003  he Adapt to the new wdcattach() signature.
 1.13 08-Oct-2003  bouyer Adapt for wdcattach() prototype change.
 1.12 25-Sep-2003  mycroft Hide the use of config_interrupts() in one place.
 1.11 24-Sep-2003  mycroft Take a stab at making this compile, at least.
 1.10 21-Sep-2003  matt Adapt to new wdcattach calling conventions.
 1.9 14-Jul-2003  lukem use __KERNEL_RCSID() in a consistent manner
 1.8 04-Feb-2003  perry branches: 1.8.2;
correct grammar and use use
 1.7 02-Oct-2002  thorpej Fix script-o's in previous.
 1.6 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.3 22-May-2002  bjh21 Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.

This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.2 27-Nov-2001  thorpej branches: 1.2.2; 1.2.10; 1.2.12;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file rapide.c was added on branch nathanw_sa on 2002-01-08 00:22:47 +0000
 1.2.12.1 01-Nov-2002  tron Pull up revision 1.3 (requested by chris in ticket #120):
Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.
This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.2.10.1 30-May-2002  gehenna Catch up with -current.
 1.2.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.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 27-Nov-2001  thorpej file rapide.c was added on branch kqueue on 2002-01-10 19:36:37 +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 25-Aug-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.22.12.3 24-Mar-2008  yamt sync with head.
 1.22.12.2 30-Dec-2006  yamt sync with head.
 1.22.12.1 21-Jun-2006  yamt sync with head.
 1.23.2.1 01-Feb-2006  yamt sync with head.
 1.24.20.1 22-Oct-2006  yamt sync with head
 1.24.18.1 18-Nov-2006  ad Sync with head.
 1.25.54.1 03-Apr-2008  mjf Sync with HEAD.
 1.25.50.1 24-Mar-2008  keiichi sync with head.
 1.25.30.1 23-Mar-2008  matt sync with HEAD
 1.25.28.2 21-Mar-2008  chris Sync with head.
 1.25.28.1 09-Feb-2008  chris Add initial reworking of acorn32 to use new interrupt code.

Note that cats probably won't work currently as acorn32 changed the way
that the pic is registered, it has to provide the irq lines as on acorn32
we attach the iomd after we need to register irqs for the pioc. So we
setup the irqs for iomd before malloc etc are available. This needs
to be fixed.

More work is still needed to update most of the podulebus drivers.
First I need to add podulebus wrapper for interrupts that handles the
maskaddr and maskbits. Exposing them to the common irq code is wrong.
 1.27.2.1 30-Oct-2012  yamt sync with head
 1.30.28.2 27-Sep-2017  jdolecek change wdc_init_shadow_regs() to accept only struct wdc_regs, it doesn't
touch anything else

factor out the probe-only struct ata_channel initialization to wdcprobe(), to
reduce duplication of logic in individual drivers, and to actually work now
that more init is needed beyond the memset()
 1.30.28.1 24-Apr-2017  jdolecek use ata_queue_alloc() to dynamically allocate ata_queue for ata channel
 1.30.2.1 03-Dec-2017  jdolecek update from HEAD
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file rapide_io_asm.S was added on branch kqueue on 2002-01-10 19:36:37 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file rapide_io_asm.S was added on branch nathanw_sa on 2001-10-05 22:27:59 +0000
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file rapidereg.h was added on branch kqueue on 2002-01-10 19:36:37 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file rapidereg.h was added on branch nathanw_sa on 2001-10-05 22:27:59 +0000
 1.18 03-May-2022  andvar fix various typos, mainly s/trasfering/transferring/ and s/theese/these/.
 1.17 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.16 19-Jul-2011  dyoung branches: 1.16.2; 1.16.12;
Change <machine/bus.h> to <sys/bus.h> throughout.

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

Mark acorn32/bus.h obsolete.
 1.15 12-May-2009  cegger use device_xname()
 1.14 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.13 17-Oct-2007  garbled branches: 1.13.20; 1.13.28; 1.13.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.12 09-Jul-2007  ad branches: 1.12.10; 1.12.12;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.11 08-Mar-2006  lukem branches: 1.11.20; 1.11.22; 1.11.28;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.6; 1.10.8; 1.10.10;
merge ktrace-lwp.
 1.9 09-Jun-2005  he branches: 1.9.2;
Adapt to compiling with -Wcast-qual and -Wshadow.
 1.8 21-Sep-2003  matt Fix GCC 3.3.1 nits.
 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 03-May-2003  wiz branches: 1.6.2;
DMA, not dma nor Dma.
 1.5 04-Oct-2002  bjh21 Don't define DEBUG if it's already defined.
 1.4 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.3 10-Mar-2002  bjh21 __RCSID -> __KERNEL_RCSID
 1.2 18-Feb-2002  bjh21 Add prototype for sbicdumpstate().
Add in-core RCSID.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file sbic.c was added on branch kqueue on 2002-01-10 19:36:37 +0000
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file sbic.c was added on branch nathanw_sa on 2002-02-28 04:05:58 +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.9.2.2 03-Sep-2007  yamt sync with head.
 1.9.2.1 21-Jun-2006  yamt sync with head.
 1.10.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.10.8.1 13-Mar-2006  yamt sync with head.
 1.10.6.1 22-Apr-2006  simonb Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.28.1 03-Oct-2007  garbled Sync with HEAD
 1.11.22.1 11-Jul-2007  mjf Sync with head.
 1.11.20.1 15-Jul-2007  ad Sync with head.
 1.12.12.1 06-Nov-2007  matt sync with HEAD
 1.12.10.1 01-Jan-2008  chris Sync with HEAD.
 1.13.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.13.20.2 16-May-2009  yamt sync with head
 1.13.20.1 04-May-2009  yamt sync with head.
 1.16.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.16.2.1 30-Oct-2012  yamt sync with head
 1.6 16-Sep-2021  andvar fix various typos, mainly in comments.
 1.5 08-Mar-2006  lukem Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.4 11-Dec-2005  christos branches: 1.4.4; 1.4.6; 1.4.8; 1.4.10;
merge ktrace-lwp.
 1.3 21-Sep-2003  matt branches: 1.3.16;
Fix GCC 3.3.1 nits.
 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 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.24;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file sbicreg.h was added on branch kqueue on 2002-01-10 19:36:38 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file sbicreg.h was added on branch nathanw_sa on 2001-10-05 22:27:59 +0000
 1.3.16.1 21-Jun-2006  yamt sync with head.
 1.4.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.4.8.1 13-Mar-2006  yamt sync with head.
 1.4.6.1 22-Apr-2006  simonb Sync with head.
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.8 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.7 01-Jan-2022  andvar fix typos in comments, mainly basicly -> basically.
 1.6 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.5 29-Jul-2012  matt branches: 1.5.2;
Fix more -fno-common fallout.
Move more variables to common locations.
 1.4 11-Dec-2005  christos branches: 1.4.114;
merge ktrace-lwp.
 1.3 07-Dec-2004  thorpej Use "struct scsipi_command" in internal command structures so that
we have enough space for 16-byte CDBs.
 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 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.24;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.24.4 18-Dec-2004  skrll Sync with HEAD.
 1.1.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file sbicvar.h was added on branch kqueue on 2002-01-10 19:36:38 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file sbicvar.h was added on branch nathanw_sa on 2001-10-05 22:28:00 +0000
 1.4.114.1 30-Oct-2012  yamt sync with head
 1.5.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.31 28-Aug-2023  andvar fix SFAS_DEBUG enabled build for acorn32:
declare dump_nexus(), dump_nexii(), dump_sfassoftc() than option is enabled.
fix specifier for nexus->dma[loop].ptr in printf().
 1.30 21-Aug-2021  andvar fix some more typos in comments/log messages, improve wording as well.
 1.29 22-Jul-2020  msaitoh s/reseting/resetting/
 1.28 27-Dec-2019  msaitoh s/transfered/transferred/
 1.27 17-Aug-2016  skrll branches: 1.27.16;
Spelling on comment
 1.26 25-Oct-2014  skrll branches: 1.26.2;
Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.25 13-Sep-2014  matt Replace more vm_offset_t, vm_size_t with vaddr_t, vsize_t
Use paddr_t for msgbufphys
 1.24 22-Feb-2014  matt Deal with non-4KB page sizes
 1.23 21-Jan-2014  christos fix unused variables
 1.22 27-Oct-2012  chs branches: 1.22.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.21 09-Dec-2010  uebayasi branches: 1.21.8; 1.21.18;
Fix DEBUG build.
 1.20 16-May-2009  cegger branches: 1.20.4;
KNF, same object code generated
 1.19 18-Mar-2009  cegger bcopy -> memcpy
 1.18 18-Mar-2009  cegger bzero -> memset
 1.17 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.16 08-Mar-2006  lukem branches: 1.16.70; 1.16.78; 1.16.84;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.15 11-Dec-2005  christos branches: 1.15.4; 1.15.6; 1.15.8; 1.15.10;
merge ktrace-lwp.
 1.14 01-Apr-2005  yamt branches: 1.14.2;
merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.13 10-Nov-2003  wiz branches: 1.13.8; 1.13.10;
Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.11 14-Jul-2003  lukem use __KERNEL_RCSID() in a consistent manner
 1.10 03-May-2003  wiz branches: 1.10.2;
DMA, not dma nor Dma.
 1.9 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.8 05-Oct-2002  chs add missing protos, clean up includes.
 1.7 22-Aug-2002  thorpej * Add PTE_SYNC() and PTE_SYNC_RANGE() macros. These don't actually do
anything yet.
* Use PTE_SYNC() and PTE_SYNC_RANGE() in some obvious places, i.e.
where vtopte() is used.
 1.6 05-Apr-2002  thorpej branches: 1.6.2;
* Rewrite the 32-bit ARM pte.h based on the ARM architecture manual.
Significant cleanup, here, including better PTE bit names.
* Add XScale PTE extensions (ECC enable, write-allocate cache mode).
* Mechanical changes everywhere else to update for new pte.h. While
doing this, two bugs (as a result of typos) were fixed in

arm/arm32/bus_dma.c
evbarm/integrator/int_bus_dma.c
 1.5 24-Mar-2002  thorpej Use vtopte() instead of pmap_pte().
 1.4 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.3 27-Nov-2001  thorpej branches: 1.3.2;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.2 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.7 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.6 27-Aug-2002  thorpej Sync with -current.
 1.1.4.5 17-Apr-2002  nathanw Catch up to -current.
 1.1.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file sfas.c was added on branch nathanw_sa on 2002-01-08 00:22:47 +0000
 1.3.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.1 27-Nov-2001  thorpej file sfas.c was added on branch kqueue on 2002-01-10 19:36:38 +0000
 1.6.2.1 30-Aug-2002  gehenna catch up with -current.
 1.10.2.4 01-Apr-2005  skrll Sync with HEAD.
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.10.1 28-Jan-2005  yamt convert arch/acorn{26,32} to new apis.
 1.13.8.1 29-Apr-2005  kent sync with -current
 1.14.2.1 21-Jun-2006  yamt sync with head.
 1.15.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.15.8.1 13-Mar-2006  yamt sync with head.
 1.15.6.1 22-Apr-2006  simonb Sync with head.
 1.15.4.1 09-Sep-2006  rpaulo sync with head
 1.16.84.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.16.78.1 28-Apr-2009  skrll Sync with HEAD.
 1.16.70.2 20-Jun-2009  yamt sync with head
 1.16.70.1 04-May-2009  yamt sync with head.
 1.20.4.1 05-Mar-2011  rmind sync with head
 1.21.18.3 03-Dec-2017  jdolecek update from HEAD
 1.21.18.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.21.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.21.8.1 30-Oct-2012  yamt sync with head
 1.22.2.1 18-May-2014  rmind sync with head
 1.26.2.1 05-Oct-2016  skrll Sync with HEAD
 1.27.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file sfasreg.h was added on branch kqueue on 2002-01-10 19:36:39 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file sfasreg.h was added on branch nathanw_sa on 2001-10-05 22:28:00 +0000
 1.9 21-Aug-2021  andvar fix some more typos in comments/log messages, improve wording as well.
 1.8 22-Jul-2020  msaitoh s/reseting/resetting/
 1.7 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.6 14-Mar-2009  dsl branches: 1.6.12; 1.6.22;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.5 11-Dec-2005  christos branches: 1.5.80; 1.5.88; 1.5.94;
merge ktrace-lwp.
 1.4 10-Nov-2003  wiz Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.3 09-Apr-2003  thorpej branches: 1.3.2;
Use PAGE_SIZE rather than NBPG.
 1.2 05-Oct-2002  chs add missing protos, clean up includes.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file sfasvar.h was added on branch kqueue on 2002-01-10 19:36:40 +0000
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file sfasvar.h was added on branch nathanw_sa on 2002-10-18 02:33:46 +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.5.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.5.80.1 04-May-2009  yamt sync with head.
 1.6.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.12.1 30-Oct-2012  yamt sync with head
 1.33 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.32 04-Apr-2022  andvar fix various typos, mainly in comments.
 1.31 20-Oct-2017  jdolecek move ata_queue_alloc(1) and ata_queue_free() calls to ata_channel_init()
and ata_channel_destroy() respectively, to make attachment code simpler,
and to make it easier to spot special queue manipulation like cmdide(4)

on topic of PR kern/52606
 1.30 07-Oct-2017  jdolecek Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch

ATA subsystem was changed to support several outstanding commands, and use
NCQ xfers if supported by both the controller and the disk, including NCQ
error recovery. Set NCQ high priority for BPRIO_TIMECRITICAL xfers
if supported. Added FUA support.

Done some work towards MP-safe, all ATA code tsleep()/wakeup() replaced
by condvars, and switched most code from spl* to mutexes (separate
wd(4) and ata channel lock).

Introduced new option WD_CHAOS_MONKEY to facilitate testing of error
handling, fixed several uncovered issues. Also fixed several problems
with kernel dump to wd(4) disk.

Tested with ahcisata(4), mvsata(4), siisata(4), piixide(4) on amd64,
with and without port multiplier, both disk and ATAPI devices; other
drivers and archs mechanically adjusted and compile-tested. NCQ is
supported for ahcisata(4) and siisata(4) for any controller, for
mvsata(4) only Gen IIe ones for now. Also enabled ATAPI support in
mvsata(4).

Thanks to Matt Thomas for initial ATA infrastructure patch, and
Jonathan A.Kollasch for siisata(4) NCQ changes and general testing.

Also fixes PR kern/43169 (wd(4)); and PR kern/11811, PR kern/47041,
PR kern/51979 (kernel dump)
 1.29 31-Jul-2012  bouyer branches: 1.29.2; 1.29.28;
Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
 1.28 26-Jul-2012  jakllsch Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
 1.27 02-Jul-2012  bouyer Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
when SATA cable move was needed
 1.26 19-Jul-2011  dyoung branches: 1.26.2;
Change <machine/bus.h> to <sys/bus.h> throughout.

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

Mark acorn32/bus.h obsolete.
 1.25 18-Mar-2008  cube Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
 1.24 24-Sep-2006  bjh21 branches: 1.24.28; 1.24.30; 1.24.50; 1.24.54;
PR 23783: the correct number of elements to insert into cmd_iohs is WDC_NREG,
not DRIVE_REGISTERS_SPACE. The latter is much bigger and causes a buffer
overrun and panic. Patch supplied by Mike Pumford.
 1.23 16-Jan-2006  bouyer branches: 1.23.18; 1.23.20;
properly use ata_channel->ch_ndrive:
- initialize it properly in the bus front-ends (all 2, exept in wdc_pcmcia.c
for the "Sandisk CompactFlash Card" where it's set to 1)
- remplace hardcoded '2' by ata_channel->ch_ndrive in MI IDE drivers.

From Christos Zoulas in kern/32501.
 1.22 11-Dec-2005  christos branches: 1.22.2;
merge ktrace-lwp.
 1.21 20-Aug-2004  thorpej branches: 1.21.10; 1.21.12;
Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
 1.20 14-Aug-2004  thorpej - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
ata_channel. Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
maximum number of drives that can be present on the channel. For now,
this is always 2. Add an ATA_MAXDRIVES constant that places an upper
limit on this value, also currently 2.
 1.19 25-May-2004  thorpej Add the notion of "shadow registers" to the wdc driver. These shadow
registers are registers that overlap with others on many controllers, but
which may actually be distinct on some controllers. Right now, the two
shadows are:

- wd_status (usually overlaps wd_command)
- wd_features (usually overlaps wd_error)

Add a new helper function, wdc_init_shadow_regs(), used to initialize
the shadow register handles on controllers where they do actually overlap.

Partially from Jordan Rhody @ Wasabi Systems, Inc.
 1.18 03-Jan-2004  thorpej branches: 1.18.2; 1.18.4; 1.18.6;
More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc
 1.17 03-Jan-2004  thorpej Rename "struct channel_softc" to "struct wdc_channel".
 1.16 01-Jan-2004  thorpej Rename:
- wdc_xfer to ata_xfer
- channel_queue to ata_queue
and move them to <dev/ata/atavar.h> so they can be used by non-wdc ATA
controllers. Clean up the member names of these structures while at it.
 1.15 31-Dec-2003  thorpej Simplify allocation of the channel queue.
 1.14 02-Dec-2003  bjh21 Update for new world of indirect wdc registers.
 1.13 19-Oct-2003  he Adapt to the new wdcattach() signature.
 1.12 08-Oct-2003  bouyer Adapt for wdcattach() prototype change.
 1.11 25-Sep-2003  mycroft Hide the use of config_interrupts() in one place.
 1.10 24-Sep-2003  mycroft Take a stab at making this compile, at least.
 1.9 21-Sep-2003  matt Adapt to new wdcattach calling conventions.
 1.8 14-Jul-2003  lukem use __KERNEL_RCSID() in a consistent manner
 1.7 02-Oct-2002  thorpej branches: 1.7.8;
Fix script-o's in previous.
 1.6 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.3 22-May-2002  bjh21 Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.

This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.2 27-Nov-2001  thorpej branches: 1.2.2; 1.2.10; 1.2.12;
Use <machine/intr.h>, not <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file simide.c was added on branch nathanw_sa on 2002-01-08 00:22:47 +0000
 1.2.12.1 01-Nov-2002  tron Pull up revision 1.3 (requested by chris in ticket #120):
Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers. This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus. Thus, we don't do that
any more.
This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
 1.2.10.1 30-May-2002  gehenna Catch up with -current.
 1.2.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.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 27-Nov-2001  thorpej file simide.c was added on branch kqueue on 2002-01-10 19:36:40 +0000
 1.7.8.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.8.3 18-Sep-2004  skrll Sync with HEAD.
 1.7.8.2 25-Aug-2004  skrll Sync with HEAD.
 1.7.8.1 03-Aug-2004  skrll Sync with HEAD
 1.18.6.1 09-Oct-2006  bouyer Pull up following revision(s) (requested by bjh21 in ticket #10703):
sys/arch/acorn32/podulebus/simide.c: revision 1.24
PR 23783: the correct number of elements to insert into cmd_iohs is WDC_NREG,
not DRIVE_REGISTERS_SPACE. The latter is much bigger and causes a buffer
overrun and panic. Patch supplied by Mike Pumford.
 1.18.4.1 09-Oct-2006  bouyer Pull up following revision(s) (requested by bjh21 in ticket #10703):
sys/arch/acorn32/podulebus/simide.c: revision 1.24
PR 23783: the correct number of elements to insert into cmd_iohs is WDC_NREG,
not DRIVE_REGISTERS_SPACE. The latter is much bigger and causes a buffer
overrun and panic. Patch supplied by Mike Pumford.
 1.18.2.1 09-Oct-2006  bouyer Pull up following revision(s) (requested by bjh21 in ticket #10703):
sys/arch/acorn32/podulebus/simide.c: revision 1.24
PR 23783: the correct number of elements to insert into cmd_iohs is WDC_NREG,
not DRIVE_REGISTERS_SPACE. The latter is much bigger and causes a buffer
overrun and panic. Patch supplied by Mike Pumford.
 1.21.12.3 24-Mar-2008  yamt sync with head.
 1.21.12.2 30-Dec-2006  yamt sync with head.
 1.21.12.1 21-Jun-2006  yamt sync with head.
 1.21.10.1 06-Oct-2006  ghen Pull up following revision(s) (requested by bjh21 in ticket #1534):
sys/arch/acorn32/podulebus/simide.c: revision 1.24
PR 23783: the correct number of elements to insert into cmd_iohs is WDC_NREG,
not DRIVE_REGISTERS_SPACE. The latter is much bigger and causes a buffer
overrun and panic. Patch supplied by Mike Pumford.
 1.22.2.1 01-Feb-2006  yamt sync with head.
 1.23.20.1 22-Oct-2006  yamt sync with head
 1.23.18.1 18-Nov-2006  ad Sync with head.
 1.24.54.1 03-Apr-2008  mjf Sync with HEAD.
 1.24.50.1 24-Mar-2008  keiichi sync with head.
 1.24.30.1 23-Mar-2008  matt sync with HEAD
 1.24.28.1 21-Mar-2008  chris Sync with head.
 1.26.2.1 30-Oct-2012  yamt sync with head
 1.29.28.2 27-Sep-2017  jdolecek change wdc_init_shadow_regs() to accept only struct wdc_regs, it doesn't
touch anything else

factor out the probe-only struct ata_channel initialization to wdcprobe(), to
reduce duplication of logic in individual drivers, and to actually work now
that more init is needed beyond the memset()
 1.29.28.1 24-Apr-2017  jdolecek use ata_queue_alloc() to dynamically allocate ata_queue for ata channel
 1.29.2.1 03-Dec-2017  jdolecek update from HEAD
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file simide_io_asm.S was added on branch kqueue on 2002-01-10 19:36:40 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file simide_io_asm.S was added on branch nathanw_sa on 2001-10-05 22:28:00 +0000
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file simidereg.h was added on branch kqueue on 2002-01-10 19:36:40 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file simidereg.h was added on branch nathanw_sa on 2001-10-05 22:28:00 +0000

RSS XML Feed