Home | History | Annotate | only in /src/sys/arch/i386/pnpbios
History log of /src/sys/arch/i386/pnpbios
RevisionDateAuthorComments
 1.1 28-Dec-2002  sommerfeld branches: 1.1.2;
TODO list, paraphrasing Jason Thorpe
 1.1.2.2 29-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 28-Dec-2002  thorpej file TODO was added on branch nathanw_sa on 2002-12-29 19:29:19 +0000
 1.9 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.8 28-Apr-2008  martin branches: 1.8.14;
Remove clause 3 and 4 from TNF licenses
 1.7 16-Apr-2008  cegger branches: 1.7.2; 1.7.4;
device_t / softc split. From Hans Rosenfeld.
 1.6 15-Apr-2008  cegger device_t / softc split. From Hans Rosenfeld
 1.5 04-Apr-2008  cegger use aprint_*_dev and device_xname
OK joerg
 1.4 04-Mar-2007  christos branches: 1.4.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.3 26-Dec-2005  perry branches: 1.3.26;
u_intN_t -> uintN_t
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 28-Jan-2004  jdolecek branches: 1.1.4; 1.1.18;
add PNPBIOS attachment foor atppc(4) driver; compiles, otherwise untested
 1.1.18.2 03-Sep-2007  yamt sync with head.
 1.1.18.1 21-Jun-2006  yamt sync with head.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 28-Jan-2004  skrll file atppc_pnpbios.c was added on branch ktrace-lwp on 2004-08-03 10:36:14 +0000
 1.3.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.4.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.4.1 16-May-2008  yamt sync with head.
 1.7.2.1 18-May-2008  yamt sync with head.
 1.8.14.1 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.16 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.15 01-Jul-2011  dyoung branches: 1.15.52; 1.15.54;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.14 14-Mar-2008  cube branches: 1.14.18;
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.13 16-Nov-2006  christos branches: 1.13.28; 1.13.48; 1.13.52;
__unused removal on arguments; approved by core.
 1.12 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.11 13-Jul-2006  gdamore branches: 1.11.4; 1.11.6;
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.10 11-Dec-2005  christos branches: 1.10.4; 1.10.8; 1.10.16;
merge ktrace-lwp.
 1.9 03-Feb-2005  perry branches: 1.9.6;
de-__P
 1.8 02-Oct-2002  thorpej branches: 1.8.6; 1.8.14; 1.8.16;
Tidy up CFATTACH_DECL() formatting.
 1.7 01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 15-Nov-2001  lukem branches: 1.5.2;
add RCSID
 1.4 14-Jun-2000  jhawk branches: 1.4.6; 1.4.8; 1.4.10;
If comprobe1() fails, print a message. Otherwise one gets the xname
prepended to the next configure device, i.e.

com1lpt0: at pnpbios0 index 18 (PNP0401)
 1.3 01-Feb-2000  soren branches: 1.3.2;
Match PNP0510 as well.
 1.2 14-Nov-1999  thorpej branches: 1.2.2; 1.2.4;
Add an "index" locator to the pnpbios `bus'. This allows us to wire down
device instances if there are more than one of a given type in the PnP
BIOS device table.

Add a pnpbios attachment for `lpt'.
 1.1 12-Nov-1999  drochner "pnpbios" pseudo-bus. Reads out device IDs and ressource usage from the
BIOS and attaches devices to it.
While it is potentially able to deal with all the motherboard ISA
devices, it is only used in hairy cases for now - laptop stuff in
particular.
 1.2.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.2.2 15-Nov-1999  fvdl Sync with -current
 1.2.2.1 14-Nov-1999  fvdl file com_pnpbios.c was added on branch fvdl-softdep on 1999-11-15 00:38:10 +0000
 1.3.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.4.10.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.10.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.4.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.6.1 14-Jun-2000  bouyer file com_pnpbios.c was added on branch thorpej_scsipi on 2000-11-20 20:09:36 +0000
 1.5.2.2 15-Nov-2001  lukem add RCSID
 1.5.2.1 15-Nov-2001  lukem file com_pnpbios.c was added on branch sommerfeld_i386mp_1 on 2001-11-15 07:03:36 +0000
 1.8.16.1 12-Feb-2005  yamt sync with head.
 1.8.14.1 29-Apr-2005  kent sync with -current
 1.8.6.1 04-Feb-2005  skrll Sync with HEAD.
 1.9.6.2 17-Mar-2008  yamt sync with head.
 1.9.6.1 30-Dec-2006  yamt sync with head.
 1.10.16.1 15-Jun-2006  gdamore Adapt to new com framework.
 1.10.8.1 11-Aug-2006  yamt sync with head
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.6.2 10-Dec-2006  yamt sync with head.
 1.11.6.1 22-Oct-2006  yamt sync with head
 1.11.4.1 18-Nov-2006  ad Sync with head.
 1.13.52.1 03-Apr-2008  mjf Sync with HEAD.
 1.13.48.1 24-Mar-2008  keiichi sync with head.
 1.13.28.1 23-Mar-2008  matt sync with HEAD
 1.14.18.1 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.15.54.1 10-Jun-2019  christos Sync with HEAD
 1.15.52.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.23 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.22 01-Jul-2011  dyoung branches: 1.22.54; 1.22.56;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.21 22-May-2010  tsutsui Split device_t/softc. Based on patch from cegger@.
ess_pnpbios.c and ess_ofisa.c fixes by me.

Tested on ess_isapnp.c, and no crash with ess_ofisa.c on shark.
 1.20 20-Oct-2009  cegger branches: 1.20.2; 1.20.4;
Use aprint_* when attaching. While here, unwrap some lines.
 1.19 23-Jun-2009  christos PR/41629: Kouji Matsui: Fixed identical ESS1878 on Fujitsu FMV-5100 NC/S by PnPBIOS
 1.18 04-May-2009  cegger struct device * -> device_t, use device_private
 1.17 28-Apr-2008  martin branches: 1.17.10; 1.17.14; 1.17.18;
Remove clause 3 and 4 from TNF licenses
 1.16 04-Apr-2008  cegger branches: 1.16.2; 1.16.4;
use aprint_*_dev and device_xname
OK joerg
 1.15 16-Nov-2006  christos branches: 1.15.52;
__unused removal on arguments; approved by core.
 1.14 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.13 11-Dec-2005  christos branches: 1.13.20; 1.13.22;
merge ktrace-lwp.
 1.12 03-Feb-2005  perry branches: 1.12.6;
de-__P
 1.11 13-Aug-2004  drochner branches: 1.11.4; 1.11.6;
oops - forgot the isapnp attachment when I added joystick support
recently
fixes PR port-i386/26630 by George F. Costanzo
 1.10 23-Oct-2003  mycroft Recognize ESS1879.
 1.9 02-Oct-2002  thorpej branches: 1.9.6;
Tidy up CFATTACH_DECL() formatting.
 1.8 01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 15-Feb-2002  nathanw branches: 1.6.2;
Add a bunch of PNP ID strings that are apparantly for the ESS chips.
Snarfed from a Microsoft document.
 1.5 15-Nov-2001  lukem add RCSID
 1.4 22-Apr-2000  thorpej branches: 1.4.8; 1.4.10; 1.4.12;
Allow pnpbios_getirqnum() to return the share type, as well.
 1.3 04-Mar-2000  nathanw Now that pnpbios_io_unmap() exists, use it.
 1.2 28-Feb-2000  augustss Another ID for ESS. From Dave Huang <khym@bga.com>
 1.1 15-Feb-2000  nathanw Add pnpbios front end for ESS AudioDrive.
 1.4.12.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.12.2 16-Mar-2002  jdolecek Catch up with -current.
 1.4.12.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.10.3 18-Oct-2002  nathanw Catch up to -current.
 1.4.10.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.10.1 08-Jan-2002  nathanw Catch up to -current.
 1.4.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.8.1 22-Apr-2000  bouyer file ess_pnpbios.c was added on branch thorpej_scsipi on 2000-11-20 20:09:36 +0000
 1.6.2.2 15-Feb-2002  nathanw Add a bunch of PNP ID strings that are apparantly for the ESS chips.
Snarfed from a Microsoft document.
 1.6.2.1 15-Feb-2002  nathanw file ess_pnpbios.c was added on branch sommerfeld_i386mp_1 on 2002-02-15 22:06:51 +0000
 1.9.6.5 04-Feb-2005  skrll Sync with HEAD.
 1.9.6.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.6.3 18-Sep-2004  skrll Sync with HEAD.
 1.9.6.2 25-Aug-2004  skrll Sync with HEAD.
 1.9.6.1 03-Aug-2004  skrll Sync with HEAD
 1.11.6.1 12-Feb-2005  yamt sync with head.
 1.11.4.1 29-Apr-2005  kent sync with -current
 1.12.6.1 30-Dec-2006  yamt sync with head.
 1.13.22.2 10-Dec-2006  yamt sync with head.
 1.13.22.1 22-Oct-2006  yamt sync with head
 1.13.20.1 18-Nov-2006  ad Sync with head.
 1.15.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.4.5 11-Aug-2010  yamt sync with head.
 1.16.4.4 11-Mar-2010  yamt sync with head
 1.16.4.3 18-Jul-2009  yamt sync with head.
 1.16.4.2 16-May-2009  yamt sync with head
 1.16.4.1 16-May-2008  yamt sync with head.
 1.16.2.1 18-May-2008  yamt sync with head.
 1.17.18.1 21-Apr-2010  matt sync to netbsd-5
 1.17.14.5 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.17.14.4 24-Oct-2010  jym Sync with HEAD
 1.17.14.3 01-Nov-2009  jym Sync with HEAD.
 1.17.14.2 23-Jul-2009  jym Sync with HEAD.
 1.17.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.17.10.1 18-Oct-2009  sborrill Pull up the following revisions(s) (requested by snj in ticket #1098):
sys/arch/i386/pnpbios/ess_pnpbios.c: revision 1.19

Fix identification of ESS1878 on Fujitsu FMV-5100 NC/S by PnPBIOS. Fixes
PR/41629.
 1.20.4.1 30-May-2010  rmind sync with head
 1.20.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.22.56.2 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.22.56.1 03-May-2019  isaki Remove dev/auconv.[ch].
Now it is handled in dev/audio/audio.c and dev/audio/linear.c.
Remove dev/mulaw.h.
It already have been just a link to dev/audio/mulaw.h in this
branch.
 1.22.54.1 10-Jun-2019  christos Sync with HEAD
 1.19 11-Jul-2016  msaitoh KNF. No functional change.
 1.18 13-Apr-2015  riastradh Omit needless <sys/rnd.h>.
 1.17 02-Feb-2012  tls branches: 1.17.6; 1.17.24;
Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
avoid expensive operations on disabled entropy sources; make the
rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
system events, and skew between clocks, with a sample implementation
for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.16 01-Jul-2011  dyoung branches: 1.16.2; 1.16.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.15 25-Nov-2009  cube Properly fix fdc@pnpbios as shown by Brian Buhrow in PR#42374.

I think it tells a lot about the relevancy of that attachment when it took
20 months for someone to experience the issue and even then, acpi had to be
disabled.
 1.14 28-Apr-2008  martin branches: 1.14.10; 1.14.14; 1.14.18;
Remove clause 3 and 4 from TNF licenses
 1.13 17-Mar-2008  cube branches: 1.13.2; 1.13.4;
Fix fallout from softc split.
 1.12 16-Mar-2008  cube Split device_t and softc for the ... wait for it ... [air quotes] MI
variant of fdc(4)/fd(4). Other cosmetic changes as appropriate.
 1.11 16-Nov-2006  christos branches: 1.11.28; 1.11.48; 1.11.52;
__unused removal on arguments; approved by core.
 1.10 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.9 11-Dec-2005  christos branches: 1.9.20; 1.9.22;
merge ktrace-lwp.
 1.8 25-Sep-2003  mycroft branches: 1.8.16;
Modify the fdcattach() interface again, splitting it into two parts, so that
DRQ allocation is done earlier.
 1.7 25-Sep-2003  mycroft Update for new attach method.
 1.6 02-Oct-2002  thorpej branches: 1.6.6;
Tidy up CFATTACH_DECL() formatting.
 1.5 01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 15-Nov-2001  lukem branches: 1.3.2;
add RCSID
 1.2 17-Dec-2000  jmc branches: 1.2.4; 1.2.6;
Change the attach routine so it handles all the known cases that pnpbios
returns for floppy controllers i/o ports. i.e.

1. 1 range of length 4 (which conveniently "forgets" the ctl i/o port),
2. 2 ranges: 1 of length 4 and the ctl i/o port.
3. 1 range of length 6 which goes to the end of the ctl i/o.

Make this line up with the MI fdc code by mapping in a range of 4 on the
base i/o and then either direct or submapping the ctl i/o. In the one case
where the BIOS lies and says it's not there just map it in anyways. (but note
the fact to the end user).
 1.1 23-Apr-2000  thorpej branches: 1.1.8;
Add PNPBIOS front-end for the PC Floppy Controller driver.
 1.1.8.3 05-Jan-2001  bouyer Sync with HEAD
 1.1.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.8.1 23-Apr-2000  bouyer file fdc_pnpbios.c was added on branch thorpej_scsipi on 2000-11-20 20:09:36 +0000
 1.2.6.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.2.2 15-Nov-2001  lukem add RCSID
 1.3.2.1 15-Nov-2001  lukem file fdc_pnpbios.c was added on branch sommerfeld_i386mp_1 on 2001-11-15 07:03:36 +0000
 1.6.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.1 17-Mar-2008  yamt sync with head.
 1.9.22.2 10-Dec-2006  yamt sync with head.
 1.9.22.1 22-Oct-2006  yamt sync with head
 1.9.20.1 18-Nov-2006  ad Sync with head.
 1.11.52.2 02-Jun-2008  mjf Sync with HEAD.
 1.11.52.1 03-Apr-2008  mjf Sync with HEAD.
 1.11.48.1 24-Mar-2008  keiichi sync with head.
 1.11.28.1 23-Mar-2008  matt sync with HEAD
 1.13.4.2 11-Mar-2010  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.18.1 21-Apr-2010  matt sync to netbsd-5
 1.14.14.2 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.14.14.1 24-Oct-2010  jym Sync with HEAD
 1.14.10.1 01-Dec-2009  snj Pull up following revision(s) (requested by cube in ticket #1161):
sys/arch/i386/pnpbios/fdc_pnpbios.c: revision 1.15
Properly fix fdc@pnpbios as shown by Brian Buhrow in PR#42374.
I think it tells a lot about the relevancy of that attachment when it took
20 months for someone to experience the issue and even then, acpi had to be
disabled.
 1.16.6.1 18-Feb-2012  mrg merge to -current.
 1.16.2.1 17-Apr-2012  yamt sync with head
 1.17.24.2 05-Oct-2016  skrll Sync with HEAD
 1.17.24.1 06-Jun-2015  skrll Sync with HEAD
 1.17.6.2 03-Dec-2017  jdolecek update from HEAD
 1.17.6.1 12-Sep-2012  tls Initial snapshot of work to eliminate 64K MAXPHYS. Basically works for
physio (I/O to raw devices); needs more doing to get it going with the
filesystems, but it shouldn't damage data.

All work's been done on amd64 so far. Not hard to add support to other
ports. If others want to pitch in, one very helpful thing would be to
sort out when and how IDE disks can do 128K or larger transfers, and
adjust the various PCI IDE (or at least ahcisata) drivers and wd.c
accordingly -- it would make testing much easier. Another very helpful
thing would be to implement a smart minphys() for RAIDframe along the
lines detailed in the MAXPHYS-NOTES file.
 1.18 26-Jan-2014  dsl Remove support for 'external' floating point units and the MS-DOS
compatible method of handling floating point exceptions.
Make kernel support for teh fpu non-optional (486SX should still work).
Only 386 cpus support external fpu, and i386 support was removed years ago.
This means that the npx code no longer uses port 0xf0 or interupt 13.
All the "npx at isa" lines go from the configs, arch/i386/isa/npx.c
is now mandatory for all i386 kernels.
I've renamed npxinit() to fpuinit() and npxinit_cpu() to fpuinit_cpu()
to match the very similar amd64 functions.
The fpu of the boot cpu is now initialised by a direct call from
cpu_configure(), this enables FP emulation for a 486SX.
(for amd64 the cr0 values are set in locore.S and similar).
This fixes a long-standing bug in linux_setregs() - which did not
save the fpu regsiters if they were active.
I've test booted a single cpu i386 kernel (using anita).
amd64 builds - none of teh changes should affect it.
The i386 XEN kernels build, but I'm not sure where they set cr0, and
it might have got lost!
 1.17 09-Dec-2006  uwe branches: 1.17.82; 1.17.92; 1.17.98;
Properly def{flag,param} all PNPBIOS* options and consolidate them in
opt_pnpbios.h. Update DEBUG config since PNPBIOSDEBUG_VALUE requires
parameter now.
 1.16 11-Dec-2005  christos branches: 1.16.20; 1.16.22;
merge ktrace-lwp.
 1.15 30-Aug-2004  drochner branches: 1.15.12;
Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
 1.14 31-Jan-2004  jdolecek add dependency on isadma for atppc attachments
add atppc_isadma.c for atppc@isapnp and atppc@ofisa, too
 1.13 28-Jan-2004  jdolecek add PNPBIOS attachment foor atppc(4) driver; compiles, otherwise untested
 1.12 22-Nov-2002  fvdl branches: 1.12.6;
New interrupt code. The basic idea behind it is to hide the differences
in interrupt controllers in struct pic, and try to keep as much
common code as possible. At the lowest (asm) level, this is done
with CPP macros.

The main structure is now struct intrsource, describing an established
interrupt line, of any kind (soft/hard local apic/legacy apic/IO apic).
For quick masking, there may be a maximum of 32 sources per CPU.
Sources can be assigned to any CPU in the MP case, though currently they
all go to the boot CPU.
 1.11 28-Nov-2001  lukem branches: 1.11.2;
- convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
"options FOO=xxx"). options that take a value were converted to
defparam recently.
- minor whitespace & formatting cleanups
 1.10 24-Feb-2001  lukem branches: 1.10.2; 1.10.6;
whitespace police
 1.9 28-Jan-2001  nathanw PNPBIOS joystick attachment.
 1.8 16-Jun-2000  thorpej branches: 1.8.6;
Rearrange the npx driver a little to allow for multiple attachments
and add a pnpbios atttachment for it.
 1.7 23-Apr-2000  thorpej branches: 1.7.4;
Add PNPBIOS front-end for the PC Floppy Controller driver.
 1.6 22-Apr-2000  thorpej Add a pnpbios front-end to the pckbc driver. This is a littke wonky
yet.. the keyboard controller actually has 2 PNPBIOS nodes (one to
represent the controller I/O resources and the kbd port IRQ, and one
for the aux port IRQ). To cope with this, we're attaching two instances
of the driver and forge on ahead once both nodes have been seen.

If someone has a better way, please feel free to step forward.
 1.5 12-Mar-2000  sommerfeld add newline at end of last line.
 1.4 25-Feb-2000  groo Initial import of National Semiconductor LM7[89] Hardware Monitor with isa and
pnpbios attach.

examples:

lm0 at pnpbios0 index?
lm0 at isa? port 0x290


TODO: spinlocks, i2c interface.
 1.3 15-Feb-2000  nathanw Add pnpbios front end for ESS AudioDrive.
 1.2 14-Nov-1999  thorpej branches: 1.2.2; 1.2.4;
Add an "index" locator to the pnpbios `bus'. This allows us to wire down
device instances if there are more than one of a given type in the PnP
BIOS device table.

Add a pnpbios attachment for `lpt'.
 1.1 12-Nov-1999  drochner "pnpbios" pseudo-bus. Reads out device IDs and ressource usage from the
BIOS and attaches devices to it.
While it is potentially able to deal with all the motherboard ISA
devices, it is only used in hairy cases for now - laptop stuff in
particular.
 1.2.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.2.2 15-Nov-1999  fvdl Sync with -current
 1.2.2.1 14-Nov-1999  fvdl file files.pnpbios was added on branch fvdl-softdep on 1999-11-15 00:38:10 +0000
 1.7.4.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.8.6.4 12-Mar-2001  bouyer Sync with HEAD.
 1.8.6.3 11-Feb-2001  bouyer Sync with HEAD.
 1.8.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.8.6.1 16-Jun-2000  bouyer file files.pnpbios was added on branch thorpej_scsipi on 2000-11-20 20:09:36 +0000
 1.10.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.10.2.1 08-Jan-2002  nathanw Catch up to -current.
 1.11.2.2 28-Nov-2001  lukem - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
"options FOO=xxx"). options that take a value were converted to
defparam recently.
- minor whitespace & formatting cleanups
 1.11.2.1 28-Nov-2001  lukem file files.pnpbios was added on branch sommerfeld_i386mp_1 on 2001-11-28 10:21:16 +0000
 1.12.6.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.6.3 18-Sep-2004  skrll Sync with HEAD.
 1.12.6.2 03-Sep-2004  skrll Sync with HEAD
 1.12.6.1 03-Aug-2004  skrll Sync with HEAD
 1.15.12.1 30-Dec-2006  yamt sync with head.
 1.16.22.1 10-Dec-2006  yamt sync with head.
 1.16.20.1 12-Jan-2007  ad Sync with head.
 1.17.98.1 18-May-2014  rmind sync with head
 1.17.92.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.82.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15 26-Nov-2011  tron Add missing semicolon to make this compile.
 1.14 23-Nov-2011  jmcneill Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

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

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

Welcome to 5.99.57.
 1.13 01-Jul-2011  dyoung branches: 1.13.2; 1.13.4;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.12 28-Apr-2008  martin branches: 1.12.12; 1.12.14;
Remove clause 3 and 4 from TNF licenses
 1.11 26-Mar-2008  xtraeme branches: 1.11.2; 1.11.4;
Split device_t/softc for joy(4) and all its attachments. Also
use device_lookup_private() and related cosmetic changes.

Reviewed by cube@.
 1.10 16-Nov-2006  christos branches: 1.10.52;
__unused removal on arguments; approved by core.
 1.9 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.8 11-Dec-2005  christos branches: 1.8.20; 1.8.22;
merge ktrace-lwp.
 1.7 03-Feb-2005  perry branches: 1.7.6;
de-__P
 1.6 02-Oct-2002  thorpej branches: 1.6.6; 1.6.14; 1.6.16;
Tidy up CFATTACH_DECL() formatting.
 1.5 01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 06-Feb-2002  jdolecek branches: 1.3.2;
joyvar.h is now at <dev/ic/joyvar.h>
 1.2 15-Nov-2001  lukem add RCSID
 1.1 28-Jan-2001  nathanw branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10;
PNPBIOS joystick attachment.
 1.1.10.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.10.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.10.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 21-Apr-2001  thorpej Add files to sommerfeld_i386mp_1 branch that have recently
appeared on the trunk.
 1.1.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 28-Jan-2001  bouyer file joy_pnpbios.c was added on branch thorpej_scsipi on 2001-02-11 19:10:57 +0000
 1.3.2.2 06-Feb-2002  jdolecek joyvar.h is now at <dev/ic/joyvar.h>
 1.3.2.1 06-Feb-2002  jdolecek file joy_pnpbios.c was added on branch sommerfeld_i386mp_1 on 2002-02-06 21:32:17 +0000
 1.6.16.1 12-Feb-2005  yamt sync with head.
 1.6.14.1 29-Apr-2005  kent sync with -current
 1.6.6.1 04-Feb-2005  skrll Sync with HEAD.
 1.7.6.1 30-Dec-2006  yamt sync with head.
 1.8.22.2 10-Dec-2006  yamt sync with head.
 1.8.22.1 22-Oct-2006  yamt sync with head
 1.8.20.1 18-Nov-2006  ad Sync with head.
 1.10.52.2 02-Jun-2008  mjf Sync with HEAD.
 1.10.52.1 03-Apr-2008  mjf Sync with HEAD.
 1.11.4.1 16-May-2008  yamt sync with head.
 1.11.2.1 18-May-2008  yamt sync with head.
 1.12.14.1 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.12.12.1 12-Dec-2008  ad Checkpoint work in progress.
 1.13.4.1 19-Nov-2011  jmcneill port ad-audiomp2 branch changes to 5.99.56
todo:
- port ad-audiomp2 pcppi changes
- these drivers need to be fixed:
- emuxki
- gcscaudio
- hdafg
- uaudio
- umidi
- MD audio drivers
 1.13.2.1 17-Apr-2012  yamt sync with head
 1.15 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.14 28-Apr-2008  martin branches: 1.14.14;
Remove clause 3 and 4 from TNF licenses
 1.13 05-Mar-2008  xtraeme branches: 1.13.2; 1.13.4;
Split device_t/softc in the lm(4) driver and its attachments, and
other related cosmetic changes.
 1.12 24-Nov-2006  wiz branches: 1.12.28; 1.12.48; 1.12.52;
s/independant/independent/, from Zafer.
 1.11 26-Dec-2005  perry branches: 1.11.20; 1.11.22;
u_intN_t -> uintN_t
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 03-Feb-2005  perry branches: 1.9.6;
de-__P
 1.8 15-Nov-2002  ad branches: 1.8.6; 1.8.14; 1.8.16;
Changes for SMBus/I2C:

- Move lm_readreg/lm_writereg into the front-ends. Add/use function pointers
in the softc.
- Add a bank select function pointer to the softc and provide a generic
version. WinBond chips accessed over serial bus present three addresses,
two of which are used to access bank 1/2 registers.
- Mark TSENS2/3 sensor data as invalid if the the corresponding bank select
fails.
 1.7 02-Oct-2002  thorpej Tidy up CFATTACH_DECL() formatting.
 1.6 01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 15-Nov-2001  lukem branches: 1.4.2;
add RCSID
 1.3 24-Jun-2000  thorpej branches: 1.3.4; 1.3.6; 1.3.8;
Add a clearing-house pseudo-device for system monitoring devices
such as the LM78 and VT82C686A (and eventually ACPI). Multiple
sensor devices can be hooked registered with `sysmon', and eventually
sysmon will also handle hardware (and software) watchdog timers.

Convert the `lm' and `viaenv' drivers to the new interface.
 1.2 01-Mar-2000  groo branches: 1.2.6;
Remove probe/attach for PNP0C02. There are reserved motherboard regions.
Thanks to Adam Glass for catching this.
 1.1 25-Feb-2000  groo Initial import of National Semiconductor LM7[89] Hardware Monitor with isa and
pnpbios attach.

examples:

lm0 at pnpbios0 index?
lm0 at isa? port 0x290


TODO: spinlocks, i2c interface.
 1.2.6.1 30-Jul-2000  bouyer Pull up (requested by thorpej):
lm_pnpbios.c 1.2->1.3
files 1.374->1.375
nslm7x.c 1.3->1.4
nslm7xvar.h 1.2->1.3
lm_isa.c 1.2->1.3
files.pci 1.96->1.97
viaenv.c 1.2->1.3
sysmon.c 1.1
sysmonvar.h 1.1

Add a clearing-house pseudo-device for system monitoring devices
such as the LM78 and VT82C686A (and eventually ACPI). Multiple
sensor devices can be hooked registered with `sysmon', and eventually
sysmon will also handle hardware (and software) watchdog timers.

Convert the `lm' and `viaenv' drivers to the new interface.
 1.3.8.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.8.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.6.3 11-Dec-2002  thorpej Sync with HEAD.
 1.3.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.3.6.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.4.1 24-Jun-2000  bouyer file lm_pnpbios.c was added on branch thorpej_scsipi on 2000-11-20 20:09:36 +0000
 1.4.2.2 15-Nov-2001  lukem add RCSID
 1.4.2.1 15-Nov-2001  lukem file lm_pnpbios.c was added on branch sommerfeld_i386mp_1 on 2001-11-15 07:03:36 +0000
 1.8.16.1 12-Feb-2005  yamt sync with head.
 1.8.14.1 29-Apr-2005  kent sync with -current
 1.8.6.1 04-Feb-2005  skrll Sync with HEAD.
 1.9.6.3 17-Mar-2008  yamt sync with head.
 1.9.6.2 30-Dec-2006  yamt sync with head.
 1.9.6.1 21-Jun-2006  yamt sync with head.
 1.11.22.1 10-Dec-2006  yamt sync with head.
 1.11.20.1 12-Jan-2007  ad Sync with head.
 1.12.52.2 02-Jun-2008  mjf Sync with HEAD.
 1.12.52.1 03-Apr-2008  mjf Sync with HEAD.
 1.12.48.1 24-Mar-2008  keiichi sync with head.
 1.12.28.1 23-Mar-2008  matt 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 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.13 14-Jul-2016  msaitoh - Use aprint*() more in xxx_attach().
- Add missing aprint_naive("\n").
- Remove extra spaces and tabs.
- KNF.
 1.12 01-Jul-2011  dyoung branches: 1.12.12; 1.12.30;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.11 07-Mar-2008  cube branches: 1.11.18;
Split the softc from the device_t for all lpt(4) variants and attachments
except the ppbus stuff (which doesn't compile) and ulpt(4) which is
unrelated and can be dealt with separately.

As usual, it comes with related cosmetic changes.
 1.10 16-Nov-2006  christos branches: 1.10.28; 1.10.48; 1.10.52;
__unused removal on arguments; approved by core.
 1.9 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.8 11-Dec-2005  christos branches: 1.8.20; 1.8.22;
merge ktrace-lwp.
 1.7 03-Feb-2005  perry branches: 1.7.6;
de-__P
 1.6 02-Oct-2002  thorpej branches: 1.6.6; 1.6.14; 1.6.16;
Tidy up CFATTACH_DECL() formatting.
 1.5 01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 15-Nov-2001  lukem branches: 1.3.2;
add RCSID
 1.2 14-Nov-1999  soren branches: 1.2.2; 1.2.4; 1.2.12; 1.2.14; 1.2.16;
Match ECP devices as well.
 1.1 14-Nov-1999  thorpej Add an "index" locator to the pnpbios `bus'. This allows us to wire down
device instances if there are more than one of a given type in the PnP
BIOS device table.

Add a pnpbios attachment for `lpt'.
 1.2.16.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.16.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.14.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.14.1 08-Jan-2002  nathanw Catch up to -current.
 1.2.12.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.12.1 14-Nov-1999  bouyer file lpt_pnpbios.c was added on branch thorpej_scsipi on 2000-11-20 20:09:36 +0000
 1.2.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.2.2 15-Nov-1999  fvdl Sync with -current
 1.2.2.1 14-Nov-1999  fvdl file lpt_pnpbios.c was added on branch fvdl-softdep on 1999-11-15 00:38:11 +0000
 1.3.2.2 15-Nov-2001  lukem add RCSID
 1.3.2.1 15-Nov-2001  lukem file lpt_pnpbios.c was added on branch sommerfeld_i386mp_1 on 2001-11-15 07:03:36 +0000
 1.6.16.1 12-Feb-2005  yamt sync with head.
 1.6.14.1 29-Apr-2005  kent sync with -current
 1.6.6.1 04-Feb-2005  skrll Sync with HEAD.
 1.7.6.2 17-Mar-2008  yamt sync with head.
 1.7.6.1 30-Dec-2006  yamt sync with head.
 1.8.22.2 10-Dec-2006  yamt sync with head.
 1.8.22.1 22-Oct-2006  yamt sync with head
 1.8.20.1 18-Nov-2006  ad Sync with head.
 1.10.52.1 03-Apr-2008  mjf Sync with HEAD.
 1.10.48.1 24-Mar-2008  keiichi sync with head.
 1.10.28.1 23-Mar-2008  matt sync with HEAD
 1.11.18.1 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.12.30.1 05-Oct-2016  skrll Sync with HEAD
 1.12.12.2 03-Dec-2017  jdolecek update from HEAD
 1.12.12.1 12-Sep-2012  tls Initial snapshot of work to eliminate 64K MAXPHYS. Basically works for
physio (I/O to raw devices); needs more doing to get it going with the
filesystems, but it shouldn't damage data.

All work's been done on amd64 so far. Not hard to add support to other
ports. If others want to pitch in, one very helpful thing would be to
sort out when and how IDE disks can do 128K or larger transfers, and
adjust the various PCI IDE (or at least ahcisata) drivers and wd.c
accordingly -- it would make testing much easier. Another very helpful
thing would be to implement a smart minphys() for RAIDframe along the
lines detailed in the MAXPHYS-NOTES file.
 1.14 26-Jan-2014  dsl Remove support for 'external' floating point units and the MS-DOS
compatible method of handling floating point exceptions.
Make kernel support for teh fpu non-optional (486SX should still work).
Only 386 cpus support external fpu, and i386 support was removed years ago.
This means that the npx code no longer uses port 0xf0 or interupt 13.
All the "npx at isa" lines go from the configs, arch/i386/isa/npx.c
is now mandatory for all i386 kernels.
I've renamed npxinit() to fpuinit() and npxinit_cpu() to fpuinit_cpu()
to match the very similar amd64 functions.
The fpu of the boot cpu is now initialised by a direct call from
cpu_configure(), this enables FP emulation for a 486SX.
(for amd64 the cr0 values are set in locore.S and similar).
This fixes a long-standing bug in linux_setregs() - which did not
save the fpu regsiters if they were active.
I've test booted a single cpu i386 kernel (using anita).
amd64 builds - none of teh changes should affect it.
The i386 XEN kernels build, but I'm not sure where they set cr0, and
it might have got lost!
 1.13 01-Jul-2011  dyoung branches: 1.13.2; 1.13.12; 1.13.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.12 28-Apr-2008  martin branches: 1.12.14;
Remove clause 3 and 4 from TNF licenses
 1.11 04-Mar-2008  cube branches: 1.11.2; 1.11.4;
Split device_t and softc for npx(4).
 1.10 16-Nov-2006  christos branches: 1.10.28; 1.10.48; 1.10.52;
__unused removal on arguments; approved by core.
 1.9 29-Oct-2006  christos fix print formatting.
 1.8 29-Oct-2006  christos handle NPX_CPUID
 1.7 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.6 24-Nov-2002  jmc branches: 1.6.20; 1.6.22; 1.6.52; 1.6.54;
Provide a cast when setting up the interrupt handler (npxintr has a different
signature than the prototype expects)
 1.5 02-Oct-2002  thorpej Tidy up CFATTACH_DECL() formatting.
 1.4 01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 15-Nov-2001  lukem branches: 1.2.2;
add RCSID
 1.1 16-Jun-2000  thorpej branches: 1.1.4; 1.1.8; 1.1.10; 1.1.12;
Rearrange the npx driver a little to allow for multiple attachments
and add a pnpbios atttachment for it.
 1.1.12.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.12.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.10.3 11-Dec-2002  thorpej Sync with HEAD.
 1.1.10.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.1 08-Jan-2002  nathanw Catch up to -current.
 1.1.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.8.1 16-Jun-2000  bouyer file npx_pnpbios.c was added on branch thorpej_scsipi on 2000-11-20 20:09:36 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 16-Jun-2000  minoura file npx_pnpbios.c was added on branch minoura-xpg4dl on 2000-06-22 17:01:06 +0000
 1.2.2.2 15-Nov-2001  lukem add RCSID
 1.2.2.1 15-Nov-2001  lukem file npx_pnpbios.c was added on branch sommerfeld_i386mp_1 on 2001-11-15 07:03:36 +0000
 1.6.54.2 10-Dec-2006  yamt sync with head.
 1.6.54.1 22-Oct-2006  yamt sync with head
 1.6.52.1 18-Nov-2006  ad Sync with head.
 1.6.22.2 17-Mar-2008  yamt sync with head.
 1.6.22.1 30-Dec-2006  yamt sync with head.
 1.6.20.1 30-May-2007  bouyer Pull up following revision(s) (requested by christos in ticket #1580):
sys/arch/i386/pnpbios/npx_pnpbios.c: revision 1.8 - 1.9
sys/arch/i386/acpi/npx_acpi.c: revision 1.14 - 1.15
sys/arch/i386/isa/npx_isa.c: revision 1.13 - 1.14
sys/arch/i386/isa/npx.c: revision 1.114
sys/arch/i386/isa/npxvar.h: revision 1.5
fix print formatting.
handle NPX_CPUID
Make npx work on the AMD Geode LX-800 processor by short-circuiting
the npx detection code. Since exception reporting is broken, check the
CPUID_FPU feature. This is what FreeBSD does.
 1.10.52.2 02-Jun-2008  mjf Sync with HEAD.
 1.10.52.1 03-Apr-2008  mjf Sync with HEAD.
 1.10.48.1 24-Mar-2008  keiichi sync with head.
 1.10.28.1 23-Mar-2008  matt sync with HEAD
 1.11.4.1 16-May-2008  yamt sync with head.
 1.11.2.1 18-May-2008  yamt sync with head.
 1.12.14.1 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.13.16.1 18-May-2014  rmind sync with head
 1.13.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.35 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.34 24-Aug-2020  msaitoh s/ressource/resource/. No functional change.
 1.33 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.32 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.31 22-Jun-2013  matt branches: 1.31.22;
Make sure dynamically allocated channel_queue struct are zero-filled.
 1.30 31-Jul-2012  bouyer branches: 1.30.2;
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 01-Jul-2011  dyoung branches: 1.27.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.26 16-Apr-2008  cegger branches: 1.26.18;
use POSIX integer types
 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 16-Nov-2006  christos branches: 1.24.28; 1.24.48; 1.24.52;
__unused removal on arguments; approved by core.
 1.23 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.22 21-Jan-2006  bouyer branches: 1.22.18; 1.22.20;
Update pciide at pnpbios to work with the last changes to wdc(4), especially
the deferral of drive probe.
Patch tested by James Haggerty, should fix kern/23192.
 1.21 16-Jan-2006  bouyer 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.20 11-Dec-2005  christos branches: 1.20.2;
merge ktrace-lwp.
 1.19 20-Aug-2004  thorpej branches: 1.19.10; 1.19.12; 1.19.20;
Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
 1.18 19-Aug-2004  thorpej - Add and use a CHAN_TO_WDC() macro to get the wdc_softc from an
ata_channel.
- Add and use a CHAN_TO_WDC_REGS() macro to get the wdc_regs from an
ata_channel.
- Add and use a CHAN_TO_PCIIDE() macro to get the pciide_softc from an
ata_channel.
- Add and use a CHAN_TO_PCHAN() macro to get the pciide_channel from an
ata_channel. (This one just hides a cast, and is really just for
consistency with the others.)
 1.17 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.16 13-Aug-2004  thorpej Don't bother with bits that tell of the presence of optional callbacks;
just check the function pointers for NULL.
 1.15 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.14 03-Jan-2004  thorpej More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc
 1.13 03-Jan-2004  thorpej Rename "struct channel_softc" to "struct wdc_channel".
 1.12 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.11 05-Dec-2003  christos Do the song and dance for the new indirect register mappings.
XXX: This driver's attach routine does not free resources on allocation
failure.
 1.10 08-Oct-2003  bouyer Adapt for wdcattach() prototype change.
 1.9 25-Sep-2003  mycroft Hide the use of config_interrupts() in one place.
 1.8 19-Sep-2003  mycroft 1) Use config_interrupts() to attach IDE and ATAPI drives. This eliminates
most polling.
2) Clean up some goofiness in pciide -- get rid of the whole "candisable" path
(it's gratuitous) and simplify the code by calling pciide_map_compat_intr(),
*_set_modes() and wdc_print_modes() from central locations.
3) Add a register writability and register ghost test to eliminate phantom
drives more quickly.
 1.7 02-Oct-2002  thorpej branches: 1.7.6;
Tidy up CFATTACH_DECL() formatting.
 1.6 01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 15-Nov-2001  lukem branches: 1.4.2;
add RCSID
 1.3 01-Apr-2000  soren branches: 1.3.8; 1.3.10; 1.3.12;
Match new prototype of pciide_dma_start in pciide.c.
 1.2 14-Nov-1999  thorpej branches: 1.2.2; 1.2.4;
Add an "index" locator to the pnpbios `bus'. This allows us to wire down
device instances if there are more than one of a given type in the PnP
BIOS device table.

Add a pnpbios attachment for `lpt'.
 1.1 13-Nov-1999  soren Add almost-PCI IDE attachment for the Toshiba Portege 3000 series.
 1.2.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.2.2 15-Nov-1999  fvdl Sync with -current
 1.2.2.1 14-Nov-1999  fvdl file pciide_pnpbios.c was added on branch fvdl-softdep on 1999-11-15 00:38:11 +0000
 1.3.12.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.12.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.10.2 18-Oct-2002  nathanw Catch up to -current.
 1.3.10.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.8.1 01-Apr-2000  bouyer file pciide_pnpbios.c was added on branch thorpej_scsipi on 2000-11-20 20:09:36 +0000
 1.4.2.2 15-Nov-2001  lukem add RCSID
 1.4.2.1 15-Nov-2001  lukem file pciide_pnpbios.c was added on branch sommerfeld_i386mp_1 on 2001-11-15 07:03:36 +0000
 1.7.6.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.6.3 18-Sep-2004  skrll Sync with HEAD.
 1.7.6.2 25-Aug-2004  skrll Sync with HEAD.
 1.7.6.1 03-Aug-2004  skrll Sync with HEAD
 1.19.20.1 27-Jan-2006  tron Pull up following revision(s) (requested by bouyer in ticket #1131):
sys/arch/i386/pnpbios/pciide_pnpbios.c: revision 1.22 via patch
Update pciide at pnpbios to work with the last changes to wdc(4), especially
the deferral of drive probe.
Patch tested by James Haggerty, should fix kern/23192.
 1.19.12.3 24-Mar-2008  yamt sync with head.
 1.19.12.2 30-Dec-2006  yamt sync with head.
 1.19.12.1 21-Jun-2006  yamt sync with head.
 1.19.10.1 27-Jan-2006  tron Pull up following revision(s) (requested by bouyer in ticket #1131):
sys/arch/i386/pnpbios/pciide_pnpbios.c: revision 1.22 via patch
Update pciide at pnpbios to work with the last changes to wdc(4), especially
the deferral of drive probe.
Patch tested by James Haggerty, should fix kern/23192.
 1.20.2.1 01-Feb-2006  yamt sync with head.
 1.22.20.2 10-Dec-2006  yamt sync with head.
 1.22.20.1 22-Oct-2006  yamt sync with head
 1.22.18.1 18-Nov-2006  ad Sync with head.
 1.24.52.2 02-Jun-2008  mjf Sync with HEAD.
 1.24.52.1 03-Apr-2008  mjf Sync with HEAD.
 1.24.48.1 24-Mar-2008  keiichi sync with head.
 1.24.28.1 23-Mar-2008  matt sync with HEAD
 1.26.18.1 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.27.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.27.2.1 30-Oct-2012  yamt sync with head
 1.30.2.3 03-Dec-2017  jdolecek update from HEAD
 1.30.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.30.2.1 12-Sep-2012  tls Initial snapshot of work to eliminate 64K MAXPHYS. Basically works for
physio (I/O to raw devices); needs more doing to get it going with the
filesystems, but it shouldn't damage data.

All work's been done on amd64 so far. Not hard to add support to other
ports. If others want to pitch in, one very helpful thing would be to
sort out when and how IDE disks can do 128K or larger transfers, and
adjust the various PCI IDE (or at least ahcisata) drivers and wd.c
accordingly -- it would make testing much easier. Another very helpful
thing would be to implement a smart minphys() for RAIDframe along the
lines detailed in the MAXPHYS-NOTES file.
 1.31.22.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.31.22.1 24-Apr-2017  jdolecek use ata_queue_alloc() to dynamically allocate ata_queue for ata channel
 1.18 23-Mar-2014  christos remove unused
 1.17 08-Jun-2008  tsutsui branches: 1.17.32; 1.17.42; 1.17.48;
Use device_lookup_private() rather than using cd_devs[] directly to get softc.
 1.16 28-Apr-2008  martin branches: 1.16.2;
Remove clause 3 and 4 from TNF licenses
 1.15 17-Mar-2008  cube branches: 1.15.2; 1.15.4;
Make this compile after device_t/softc split.
 1.14 15-Mar-2008  cube Split device_t and softc for pckbc(4) and its attachments.
 1.13 04-Jan-2008  ad branches: 1.13.2; 1.13.6;
don't need sys/lock.h
 1.12 17-Oct-2007  garbled branches: 1.12.2; 1.12.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.11 09-Jul-2007  ad branches: 1.11.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.10 16-Nov-2006  christos branches: 1.10.8; 1.10.10; 1.10.16;
__unused removal on arguments; approved by core.
 1.9 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.8 28-Dec-2002  matt branches: 1.8.18; 1.8.48; 1.8.50;
Remember the isa_chipset_tag_t and supply to isa_intr_establish.
(thereby removing a XXX in the code).
 1.7 02-Oct-2002  thorpej Tidy up CFATTACH_DECL() formatting.
 1.6 01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 04-Jan-2002  ws branches: 1.4.2;
Make this work with only a keyboard attached to ps2 port.
(Maybe even works with only a mouse attached, but I cannot test this.)
Should fix PR 10306 (& 15093).
 1.3 15-Nov-2001  lukem add RCSID
 1.2 31-Mar-2001  minoura branches: 1.2.4;
Match PNP0320 (Japanese 106-key keyboard A01).
- We could use this information to determine the default keymap (?)
- Match more keyboards? (e.g.strncmp(idstr, "PNP03", 5))
 1.1 22-Apr-2000  thorpej branches: 1.1.8; 1.1.10;
Add a pnpbios front-end to the pckbc driver. This is a littke wonky
yet.. the keyboard controller actually has 2 PNPBIOS nodes (one to
represent the controller I/O resources and the kbd port IRQ, and one
for the aux port IRQ). To cope with this, we're attaching two instances
of the driver and forge on ahead once both nodes have been seen.

If someone has a better way, please feel free to step forward.
 1.1.10.6 29-Dec-2002  thorpej Sync with HEAD.
 1.1.10.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.4 28-Feb-2002  nathanw Catch up to -current.
 1.1.10.3 11-Jan-2002  nathanw More catchup.
 1.1.10.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.10.1 09-Apr-2001  nathanw Catch up with -current.
 1.1.8.3 21-Apr-2001  bouyer Sync with HEAD
 1.1.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.8.1 22-Apr-2000  bouyer file pckbc_pnpbios.c was added on branch thorpej_scsipi on 2000-11-20 20:09:36 +0000
 1.2.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.2 04-Jan-2002  ws Make this work with only a keyboard attached to ps2 port.
(Maybe even works with only a mouse attached, but I cannot test this.)
Should fix PR 10306 (& 15093).
 1.4.2.1 04-Jan-2002  ws file pckbc_pnpbios.c was added on branch sommerfeld_i386mp_1 on 2002-01-04 17:11:56 +0000
 1.8.50.2 10-Dec-2006  yamt sync with head.
 1.8.50.1 22-Oct-2006  yamt sync with head
 1.8.48.1 18-Nov-2006  ad Sync with head.
 1.8.18.4 17-Mar-2008  yamt sync with head.
 1.8.18.3 21-Jan-2008  yamt sync with head
 1.8.18.2 03-Sep-2007  yamt sync with head.
 1.8.18.1 30-Dec-2006  yamt sync with head.
 1.10.16.1 03-Oct-2007  garbled Sync with HEAD
 1.10.10.1 11-Jul-2007  mjf Sync with head.
 1.10.8.1 01-Jul-2007  ad Adapt to callout API change.
 1.11.10.3 23-Mar-2008  matt sync with HEAD
 1.11.10.2 09-Jan-2008  matt sync with HEAD
 1.11.10.1 06-Nov-2007  matt sync with HEAD
 1.12.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.12.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.13.6.3 29-Jun-2008  mjf Sync with HEAD.
 1.13.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.13.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.13.2.1 24-Mar-2008  keiichi sync with head.
 1.15.4.2 04-May-2009  yamt sync with head.
 1.15.4.1 16-May-2008  yamt sync with head.
 1.15.2.2 17-Jun-2008  yamt sync with head.
 1.15.2.1 18-May-2008  yamt sync with head.
 1.16.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.17.48.1 18-May-2014  rmind sync with head
 1.17.42.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.32.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.77 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.76 24-Apr-2021  thorpej branches: 1.76.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.75 24-Aug-2020  msaitoh branches: 1.75.4;
s/ressource/resource/. No functional change.
 1.74 10-Nov-2019  chs in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.73 26-Feb-2017  maya branches: 1.73.14;
catch up with i386 rename of gdt to gdtstore
fixes i386 ALL kernel build (pnpbios is disabled in GENERIC)
 1.72 13-Oct-2013  riz branches: 1.72.6; 1.72.10; 1.72.14;
Catch up to recent changes in config_pending_{incr,decr}().
 1.71 30-Jun-2011  wiz branches: 1.71.2; 1.71.12; 1.71.16;
dependant -> dependent
 1.70 26-Jul-2010  jym Add PAE to ALL kernel, so that most paddr_t format string errors get caught
during compilation.

While here, fix the compilation for ALL.
 1.69 28-Apr-2010  dyoung On x86, change the bus_space_tag_t to a pointer to a struct
bus_space_tag. For now, bus_space_tag's only member is
bst_type, the type of space, which is either X86_BUS_SPACE_IO
or X86_BUS_SPACE_MEM. In the future, new bus_space_tag members
will refer to override-functions installed by a new function,
bus_space_tag_create(9).

Add pointers to constant struct bus_space_tag, x86_bus_space_io and
x86_bus_space_mem. Use them to replace most uses of X86_BUS_SPACE_IO
and X86_BUS_SPACE_MEM.

Add an x86-specific bus_space_is_equal(9) implementation that compares
the two tags' bst_type.
 1.68 07-Nov-2009  cegger branches: 1.68.2; 1.68.4;
Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
 1.67 03-Nov-2009  cegger use proper type for memory protection bits
 1.66 04-May-2009  cegger struct device * -> device_t, use device_private
 1.65 11-Mar-2009  cegger use paddr_t for physical addresses. u_long may not be large enough.
 1.64 11-Jul-2008  cube branches: 1.64.2; 1.64.8;
device_t split fallout [hi joerg!]
 1.63 09-Jul-2008  joerg Constify a global variable. Split device/softc.
 1.62 04-Apr-2008  cegger branches: 1.62.4; 1.62.6; 1.62.8; 1.62.10;
use aprint_*_dev and device_xname
OK joerg
 1.61 17-Oct-2007  garbled branches: 1.61.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.60 26-Sep-2007  ad x86 changes for pcc and LKMs.

- Replace most inline assembly with proper functions. As a side effect
this reduces the size of amd64 GENERIC by about 120kB, and i386 by a
smaller amount. Nearly all of the inlines did something slow, or something
that does not need to be fast.
- Make curcpu() and curlwp functions proper, unless __GNUC__ && _KERNEL.
In that case make them inlines. Makes curlwp LKM and preemption safe.
- Make bus_space and bus_dma more LKM friendly.
- Share a few more files between the ports.
- Other minor changes.
 1.59 09-Jul-2007  ad branches: 1.59.8; 1.59.10; 1.59.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.58 04-Mar-2007  christos branches: 1.58.2; 1.58.4; 1.58.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.57 10-Dec-2006  uwe branches: 1.57.2;
Convert to use aprint_* (except PNPBIOSEVENTS code).
 1.56 09-Dec-2006  uwe Properly def{flag,param} all PNPBIOS* options and consolidate them in
opt_pnpbios.h. Update DEBUG config since PNPBIOSDEBUG_VALUE requires
parameter now.
 1.55 16-Nov-2006  christos __unused removal on arguments; approved by core.
 1.54 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.53 26-Dec-2005  perry branches: 1.53.20; 1.53.22;
u_intN_t -> uintN_t
 1.52 11-Dec-2005  christos merge ktrace-lwp.
 1.51 25-Aug-2005  drochner kill a number of autoconf submatch functions which follow the
standard scheme:
if (<configured> != <wildcard> && <configured> != <real>)
then fail
else
ask device match function

This is handled by config_stdsubmatch() now.
 1.50 25-Aug-2005  drochner replace the "locdesc_t" structure carrying the number of locators
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
 1.49 01-Jun-2005  drochner branches: 1.49.2;
kill the "busname" attach arg for acpi, apm, pnpbios and vesabios,
and pass NULL "print" function pointers to their config_found functions
because they shouldn't be called anyway
 1.48 31-May-2005  drochner as in apm, the "busname" thing is unnecessary
being here, fix constification problems and cleanup variable names
from function prototypes
 1.47 17-May-2005  christos Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
implement, xtoa(), but I think defining the samestring 50 times is a bit
too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...
 1.46 01-Apr-2005  yamt 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.45 03-Feb-2005  perry de-__P, partially ANSIfy
 1.44 17-Sep-2004  itohy branches: 1.44.4; 1.44.6;
Make it work again.
Hi, drochner!
 1.43 13-Sep-2004  drochner autoconf cleanup: turn xxxsubmatch() functions into the locator
passing variants
 1.42 30-Aug-2004  drochner Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
 1.41 04-Jul-2004  mycroft Fix confusion between index numbers in one table and node numbers in another
table, that was causing PNPBIOS to fail on some machines. Should fix PR 18610.
 1.40 25-Nov-2003  jdolecek branches: 1.40.2;
throw in some default switch labels to pnpbios_update_dock_status(), so that
this compiles with PNPBIOSEVENTS option (such as with config DR-EVIL)
fixes kern/23564 by dheeraj reddy
 1.39 02-Nov-2003  jdolecek properly initialize local variable in pnp_debugdump()
 1.38 28-Oct-2003  drochner quell a gcc3 "uninitialized" warning by putting some more dead code
inside "#ifdef PNPBIOSEVENTS"
 1.37 03-May-2003  wiz branches: 1.37.2;
DMA, not dma nor Dma.
 1.36 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.35 26-Feb-2003  fvdl Adapt for i386/x86 change.
 1.34 28-Jan-2003  wiz unknown, not unkown. Noted by mjl.
 1.33 08-Jan-2003  soren URL for devids.txt moved.
 1.32 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.31 28-Dec-2002  matt Move the call to isa_dmainit to mainbus_attach from pnpbios_attach since
ACPI needs to have that done for the exact same reasons as ACPI.
 1.30 02-Oct-2002  thorpej Tidy up CFATTACH_DECL() formatting.
 1.29 01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.28 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.27 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.26 15-Nov-2001  lukem branches: 1.26.2;
add RCSID
 1.25 27-Sep-2001  thorpej Move the code that enumerates the pnpbios device nodes into a
separate function.
 1.24 10-Sep-2001  chris Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.23 07-Jul-2001  perry branches: 1.23.2; 1.23.6;
bzero->memset, bcopy->memcpy
 1.22 24-Apr-2001  thorpej Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.21 17-Dec-2000  jmc branches: 1.21.4;
Add pnpbios_getiosize
 1.20 29-Jun-2000  mrg branches: 1.20.4;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.19 26-Jun-2000  mrg remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.18 28-May-2000  jhawk Add patchable "pnpbiosdebug" global if PNPBIOSDEBUG is compiled in,
and add PNPBIOSDEBUG_VALUE to initialize its value, defaulting to 1.
 1.17 11-May-2000  jhawk branches: 1.17.2;
fix cosmetic brain-oh in last; s/attachonly/matchonly/g
 1.16 11-May-2000  jhawk Address PR#10042: instead of getting the dynamic configuration
all the time (which crashes some vaios), get the static configuration,
and if config_search() finds a node, then do the dynamic configuration.
This seems to work fine on multiple vaios (which seem to crash
in different places...go figure).

Also, bring prototypes in-line with KNF and declare static as appropriate.

"#if 0" out pnpbios_getapmtable() and pnpbios_setnode() as they
are not called.

Fix printf()s to print out dv_xname.

Fix a comment typo.

Use manifest constants (PNP_CF_DEVCONF_DYNAMIC, etc.) in calls to
pnpbios_getnode() instead of hardcoded constants.
 1.15 27-Apr-2000  thorpej - When we get an ABOUT_TO_CHANGE event, send an OK message in response
so that the docking/undocking process can actually complete.
- Track the current docking state, and report the current state when it
changes.
- Make it possible to enable pnpbios verbosity at run-time.
 1.14 26-Apr-2000  thorpej Clean up the docking-event related message, and make it possible to
debug docking events without having to debug the rest of PNPBIOS.
 1.13 22-Apr-2000  thorpej Allow pnpbios_getirqnum() to return the share type, as well.
 1.12 01-Mar-2000  groo Add pnpbios_io_unmap
 1.11 22-Feb-2000  chopps deal with bios that just say end tag with no end dep
add a lot of skeletal work to pnpbios.
option to handle events from pnpbios in a thread (e.g., hot-doc)
add calls for the other pnpbios functions (e.g., send message etc..)
add most defintions from the pnp doc to new reg file
 1.10 20-Feb-2000  soren Add a few links to documentation.
 1.9 16-Jan-2000  drochner catch zeroed ID string (happens for disabled devices)
 1.8 12-Jan-2000  drochner -catch zeroed descriptors and skip nodes with no valid ressources,
needed to deal with disabled nodes
-Parse "fixed io descriptors". Their use in nonsense in principle
because 10-bit decoding is implied. Hope this is not real...
-Tolerate mismatches between node size and actually used space
as long as the used size is smaller than the buffer size. There
is at least one broken BIOS which reports node sizes larger than
the used one, and windows obviously doesn't complain...
 1.7 13-Dec-1999  drochner branches: 1.7.2;
add parsing of the "32bit memory descriptor" tag type
 1.6 30-Nov-1999  drochner add consistency check whether the end mark does appear before the
reported number of nodes
 1.5 19-Nov-1999  matt Not all platform have devices which need isadma. Make the isa_dmainit
call conditional.
 1.4 17-Nov-1999  soren Add newline in debug printf.
 1.3 15-Nov-1999  drochner "idx" is modified by pnpbios_getnode(); use the original value
 1.2 14-Nov-1999  thorpej branches: 1.2.2;
Add an "index" locator to the pnpbios `bus'. This allows us to wire down
device instances if there are more than one of a given type in the PnP
BIOS device table.

Add a pnpbios attachment for `lpt'.
 1.1 12-Nov-1999  drochner "pnpbios" pseudo-bus. Reads out device IDs and ressource usage from the
BIOS and attaches devices to it.
While it is potentially able to deal with all the motherboard ISA
devices, it is only used in hairy cases for now - laptop stuff in
particular.
 1.2.2.2 15-Nov-1999  fvdl Sync with -current
 1.2.2.1 14-Nov-1999  fvdl file pnpbios.c was added on branch fvdl-softdep on 1999-11-15 00:38:11 +0000
 1.7.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.17.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.20.4.3 05-Jan-2001  bouyer Sync with HEAD
 1.20.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.20.4.1 29-Jun-2000  bouyer file pnpbios.c was added on branch thorpej_scsipi on 2000-11-20 20:09:37 +0000
 1.21.4.9 15-Jan-2003  thorpej Sync with HEAD.
 1.21.4.8 03-Jan-2003  thorpej Sync with HEAD.
 1.21.4.7 29-Dec-2002  thorpej Sync with HEAD.
 1.21.4.6 18-Oct-2002  nathanw Catch up to -current.
 1.21.4.5 08-Jan-2002  nathanw Catch up to -current.
 1.21.4.4 08-Oct-2001  nathanw Catch up to -current.
 1.21.4.3 21-Sep-2001  nathanw Catch up to -current.
 1.21.4.2 24-Aug-2001  nathanw Catch up with -current.
 1.21.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.23.6.1 01-Oct-2001  fvdl Catch up with -current.
 1.23.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.23.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.23.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.26.2.2 15-Nov-2001  lukem add RCSID
 1.26.2.1 15-Nov-2001  lukem file pnpbios.c was added on branch sommerfeld_i386mp_1 on 2001-11-15 07:03:36 +0000
 1.37.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.37.2.6 01-Apr-2005  skrll Sync with HEAD.
 1.37.2.5 04-Feb-2005  skrll Sync with HEAD.
 1.37.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.37.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.37.2.2 03-Sep-2004  skrll Sync with HEAD
 1.37.2.1 03-Aug-2004  skrll Sync with HEAD
 1.40.2.1 05-Jul-2004  he Pull up revision 1.41 (requested by mycroft in ticket #601):
Fix confusion between index numbers in one table and
node numbers in another table, that was causing PNPBIOS
to fail on some machines. Fixes PR#18610.
 1.44.6.2 12-Feb-2005  yamt sync with head.
 1.44.6.1 25-Jan-2005  yamt - convert i386 to new apis.
- remove a pmap bootstrap kludge, which is no longer needed.
 1.44.4.1 29-Apr-2005  kent sync with -current
 1.49.2.4 27-Oct-2007  yamt sync with head.
 1.49.2.3 03-Sep-2007  yamt sync with head.
 1.49.2.2 30-Dec-2006  yamt sync with head.
 1.49.2.1 21-Jun-2006  yamt sync with head.
 1.53.22.2 10-Dec-2006  yamt sync with head.
 1.53.22.1 22-Oct-2006  yamt sync with head
 1.53.20.2 12-Jan-2007  ad Sync with head.
 1.53.20.1 18-Nov-2006  ad Sync with head.
 1.57.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.58.10.1 03-Oct-2007  garbled Sync with HEAD
 1.58.4.1 11-Jul-2007  mjf Sync with head.
 1.58.2.2 09-Oct-2007  ad Sync with head.
 1.58.2.1 15-Jul-2007  ad Sync with head.
 1.59.12.1 06-Oct-2007  yamt sync with head.
 1.59.10.1 06-Nov-2007  matt sync with HEAD
 1.59.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.61.16.2 28-Sep-2008  mjf Sync with HEAD.
 1.61.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.62.10.1 19-Oct-2008  haad Sync with HEAD.
 1.62.8.1 18-Jul-2008  simonb Sync with head.
 1.62.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.62.4.4 11-Aug-2010  yamt sync with head.
 1.62.4.3 11-Mar-2010  yamt sync with head
 1.62.4.2 16-May-2009  yamt sync with head
 1.62.4.1 04-May-2009  yamt sync with head.
 1.64.8.4 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.64.8.3 24-Oct-2010  jym Sync with HEAD
 1.64.8.2 01-Nov-2009  jym Sync with HEAD.
 1.64.8.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.64.2.1 28-Apr-2009  skrll Sync with HEAD.
 1.68.4.2 05-Mar-2011  rmind sync with head
 1.68.4.1 30-May-2010  rmind sync with head
 1.68.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.68.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.71.16.1 18-May-2014  rmind sync with head
 1.71.12.3 03-Dec-2017  jdolecek update from HEAD
 1.71.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.71.12.1 12-Sep-2012  tls Initial snapshot of work to eliminate 64K MAXPHYS. Basically works for
physio (I/O to raw devices); needs more doing to get it going with the
filesystems, but it shouldn't damage data.

All work's been done on amd64 so far. Not hard to add support to other
ports. If others want to pitch in, one very helpful thing would be to
sort out when and how IDE disks can do 128K or larger transfers, and
adjust the various PCI IDE (or at least ahcisata) drivers and wd.c
accordingly -- it would make testing much easier. Another very helpful
thing would be to implement a smart minphys() for RAIDframe along the
lines detailed in the MAXPHYS-NOTES file.
 1.71.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.72.14.1 21-Apr-2017  bouyer Sync with HEAD
 1.72.10.1 20-Mar-2017  pgoyette Sync with HEAD
 1.72.6.1 28-Aug-2017  skrll Sync with HEAD
 1.73.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.75.4.4 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.75.4.3 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.75.4.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

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

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.76.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 14-Jul-2018  maxv Drop NENTRY() from the x86 kernels, use ENTRY(). With PMCs (and other hardware
tracing facilities) we have a much better ways of monitoring the CPU activity
than GPROF, without software modification.

Also I think GPROF has never worked, because the 'start' functions of both
i386 and amd64 use ENTRY(), and it would have caused a function call while the
kernel was not yet relocated.
 1.2 11-Dec-2007  lukem branches: 1.2.96; 1.2.98;
Use __KERNEL_RCSID(). For these .S files, the following style was
adopted, a la .C files and <sys/cdefs.h>:
* move <machine/asm.h> to the top
* use __KERNEL_RCSID() immediately after it
 1.1 22-Nov-2002  fvdl branches: 1.1.2; 1.1.24; 1.1.86; 1.1.96; 1.1.98; 1.1.100;
.s -> .S rename
 1.1.100.1 13-Dec-2007  bouyer Sync with HEAD
 1.1.98.1 13-Dec-2007  yamt sync with head.
 1.1.96.1 26-Dec-2007  ad Sync with head.
 1.1.86.1 09-Jan-2008  matt sync with HEAD
 1.1.24.1 21-Jan-2008  yamt sync with head
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 22-Nov-2002  thorpej file pnpbioscall.S was added on branch nathanw_sa on 2002-12-11 06:01:04 +0000
 1.2.98.1 10-Jun-2019  christos Sync with HEAD
 1.2.96.1 28-Jul-2018  pgoyette Sync with HEAD
 1.2 22-Nov-2002  fvdl Renamed to .S
 1.1 12-Nov-1999  drochner branches: 1.1.2; 1.1.4; 1.1.12; 1.1.14;
"pnpbios" pseudo-bus. Reads out device IDs and ressource usage from the
BIOS and attaches devices to it.
While it is potentially able to deal with all the motherboard ISA
devices, it is only used in hairy cases for now - laptop stuff in
particular.
 1.1.14.1 11-Dec-2002  thorpej Sync with HEAD.
 1.1.12.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.12.1 12-Nov-1999  bouyer file pnpbioscall.s was added on branch thorpej_scsipi on 2000-11-20 20:09:37 +0000
 1.1.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.2.2 15-Nov-1999  fvdl Sync with -current
 1.1.2.1 12-Nov-1999  fvdl file pnpbioscall.s was added on branch fvdl-softdep on 1999-11-15 00:38:11 +0000
 1.4 25-Dec-2007  perry Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
 1.3 26-Dec-2005  perry branches: 1.3.50; 1.3.56; 1.3.60; 1.3.64;
u_intN_t -> uintN_t
 1.2 11-May-2000  jhawk branches: 1.2.6; 1.2.8; 1.2.48;
Address PR#10042: instead of getting the dynamic configuration
all the time (which crashes some vaios), get the static configuration,
and if config_search() finds a node, then do the dynamic configuration.
This seems to work fine on multiple vaios (which seem to crash
in different places...go figure).

Also, bring prototypes in-line with KNF and declare static as appropriate.

"#if 0" out pnpbios_getapmtable() and pnpbios_setnode() as they
are not called.

Fix printf()s to print out dv_xname.

Fix a comment typo.

Use manifest constants (PNP_CF_DEVCONF_DYNAMIC, etc.) in calls to
pnpbios_getnode() instead of hardcoded constants.
 1.1 22-Feb-2000  chopps deal with bios that just say end tag with no end dep
add a lot of skeletal work to pnpbios.
option to handle events from pnpbios in a thread (e.g., hot-doc)
add calls for the other pnpbios functions (e.g., send message etc..)
add most defintions from the pnp doc to new reg file
 1.2.48.2 21-Jan-2008  yamt sync with head
 1.2.48.1 21-Jun-2006  yamt sync with head.
 1.2.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.8.1 11-May-2000  bouyer file pnpbiosreg.h was added on branch thorpej_scsipi on 2000-11-20 20:09:37 +0000
 1.2.6.2 11-May-2000  jhawk Address PR#10042: instead of getting the dynamic configuration
all the time (which crashes some vaios), get the static configuration,
and if config_search() finds a node, then do the dynamic configuration.
This seems to work fine on multiple vaios (which seem to crash
in different places...go figure).

Also, bring prototypes in-line with KNF and declare static as appropriate.

"#if 0" out pnpbios_getapmtable() and pnpbios_setnode() as they
are not called.

Fix printf()s to print out dv_xname.

Fix a comment typo.

Use manifest constants (PNP_CF_DEVCONF_DYNAMIC, etc.) in calls to
pnpbios_getnode() instead of hardcoded constants.
 1.2.6.1 11-May-2000  jhawk file pnpbiosreg.h was added on branch sommerfeld_i386mp_1 on 2000-05-11 05:54:50 +0000
 1.3.64.1 02-Jan-2008  bouyer Sync with HEAD
 1.3.60.1 26-Dec-2007  ad Sync with head.
 1.3.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.3.50.1 09-Jan-2008  matt sync with HEAD
 1.12 30-Jun-2011  wiz dependant -> dependent
 1.11 04-May-2009  cegger struct device * -> device_t, use device_private
 1.10 26-Dec-2005  perry branches: 1.10.78; 1.10.92;
u_intN_t -> uintN_t
 1.9 11-Dec-2005  christos merge ktrace-lwp.
 1.8 01-Jun-2005  drochner branches: 1.8.2;
kill the "busname" attach arg for acpi, apm, pnpbios and vesabios,
and pass NULL "print" function pointers to their config_found functions
because they shouldn't be called anyway
 1.7 31-May-2005  drochner as in apm, the "busname" thing is unnecessary
being here, fix constification problems and cleanup variable names
from function prototypes
 1.6 03-Feb-2005  perry de-__P
 1.5 17-Dec-2000  jmc branches: 1.5.2; 1.5.26; 1.5.34; 1.5.36;
Add pnpbios_getiosize
 1.4 22-Apr-2000  thorpej branches: 1.4.8;
Allow pnpbios_getirqnum() to return the share type, as well.
 1.3 01-Mar-2000  groo Add pnpbios_io_unmap
 1.2 14-Nov-1999  thorpej branches: 1.2.2; 1.2.4;
Add an "index" locator to the pnpbios `bus'. This allows us to wire down
device instances if there are more than one of a given type in the PnP
BIOS device table.

Add a pnpbios attachment for `lpt'.
 1.1 12-Nov-1999  drochner "pnpbios" pseudo-bus. Reads out device IDs and ressource usage from the
BIOS and attaches devices to it.
While it is potentially able to deal with all the motherboard ISA
devices, it is only used in hairy cases for now - laptop stuff in
particular.
 1.2.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.2.2 15-Nov-1999  fvdl Sync with -current
 1.2.2.1 14-Nov-1999  fvdl file pnpbiosvar.h was added on branch fvdl-softdep on 1999-11-15 00:38:12 +0000
 1.4.8.3 05-Jan-2001  bouyer Sync with HEAD
 1.4.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.8.1 22-Apr-2000  bouyer file pnpbiosvar.h was added on branch thorpej_scsipi on 2000-11-20 20:09:37 +0000
 1.5.36.1 12-Feb-2005  yamt sync with head.
 1.5.34.1 29-Apr-2005  kent sync with -current
 1.5.26.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.26.1 04-Feb-2005  skrll Sync with HEAD.
 1.5.2.2 17-Dec-2000  jmc Add pnpbios_getiosize
 1.5.2.1 17-Dec-2000  jmc file pnpbiosvar.h was added on branch sommerfeld_i386mp_1 on 2000-12-17 07:59:15 +0000
 1.8.2.1 21-Jun-2006  yamt sync with head.
 1.10.92.3 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.10.92.2 01-Nov-2009  jym Sync with HEAD.
 1.10.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.78.1 16-May-2009  yamt sync with head
 1.18 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.17 11-Jul-2016  msaitoh branches: 1.17.18; 1.17.20;
KNF. No functional change.
 1.16 01-Jul-2011  dyoung branches: 1.16.12; 1.16.30;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.15 17-Mar-2008  cube branches: 1.15.18;
Fix previous (aprint_*_dev usage).
 1.14 17-Mar-2008  dogcow fix blatant errpr [sic], and correct args to sbmatch/aprint_error_dev.
 1.13 15-Mar-2008  cube Split device_t and softc for sb(4) and all its attachments.
 1.12 16-Nov-2006  christos branches: 1.12.6; 1.12.28; 1.12.48; 1.12.52;
__unused removal on arguments; approved by core.
 1.11 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.10 11-Dec-2005  christos branches: 1.10.20; 1.10.22;
merge ktrace-lwp.
 1.9 03-Feb-2005  perry branches: 1.9.6;
de-__P
 1.8 02-Oct-2002  thorpej branches: 1.8.6; 1.8.14; 1.8.16;
Tidy up CFATTACH_DECL() formatting.
 1.7 01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 15-Nov-2001  lukem branches: 1.5.2;
add RCSID
 1.4 31-Mar-2001  minoura branches: 1.4.4;
Match XpressAudio.
 1.3 22-Apr-2000  thorpej branches: 1.3.8; 1.3.10;
Allow pnpbios_getirqnum() to return the share type, as well.
 1.2 14-Nov-1999  thorpej branches: 1.2.2; 1.2.4;
Add an "index" locator to the pnpbios `bus'. This allows us to wire down
device instances if there are more than one of a given type in the PnP
BIOS device table.

Add a pnpbios attachment for `lpt'.
 1.1 12-Nov-1999  drochner "pnpbios" pseudo-bus. Reads out device IDs and ressource usage from the
BIOS and attaches devices to it.
While it is potentially able to deal with all the motherboard ISA
devices, it is only used in hairy cases for now - laptop stuff in
particular.
 1.2.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.2.2 15-Nov-1999  fvdl Sync with -current
 1.2.2.1 14-Nov-1999  fvdl file sb_pnpbios.c was added on branch fvdl-softdep on 1999-11-15 00:38:12 +0000
 1.3.10.3 18-Oct-2002  nathanw Catch up to -current.
 1.3.10.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.10.1 09-Apr-2001  nathanw Catch up with -current.
 1.3.8.3 21-Apr-2001  bouyer Sync with HEAD
 1.3.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.8.1 22-Apr-2000  bouyer file sb_pnpbios.c was added on branch thorpej_scsipi on 2000-11-20 20:09:37 +0000
 1.4.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.2.2 15-Nov-2001  lukem add RCSID
 1.5.2.1 15-Nov-2001  lukem file sb_pnpbios.c was added on branch sommerfeld_i386mp_1 on 2001-11-15 07:03:36 +0000
 1.8.16.1 12-Feb-2005  yamt sync with head.
 1.8.14.1 29-Apr-2005  kent sync with -current
 1.8.6.1 04-Feb-2005  skrll Sync with HEAD.
 1.9.6.3 24-Mar-2008  yamt sync with head.
 1.9.6.2 17-Mar-2008  yamt sync with head.
 1.9.6.1 30-Dec-2006  yamt sync with head.
 1.10.22.2 10-Dec-2006  yamt sync with head.
 1.10.22.1 22-Oct-2006  yamt sync with head
 1.10.20.1 18-Nov-2006  ad Sync with head.
 1.12.52.1 03-Apr-2008  mjf Sync with HEAD.
 1.12.48.1 24-Mar-2008  keiichi sync with head.
 1.12.28.1 23-Mar-2008  matt sync with HEAD
 1.12.6.1 27-Feb-2007  ad Add MP locking for audio drivers.
 1.15.18.1 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.16.30.1 05-Oct-2016  skrll Sync with HEAD
 1.16.12.1 03-Dec-2017  jdolecek update from HEAD
 1.17.20.2 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.17.20.1 03-May-2019  isaki Remove dev/auconv.[ch].
Now it is handled in dev/audio/audio.c and dev/audio/linear.c.
Remove dev/mulaw.h.
It already have been just a link to dev/audio/mulaw.h in this
branch.
 1.17.18.1 10-Jun-2019  christos Sync with HEAD
 1.25 06-Oct-2021  uwe Fix KASSERT triggered when attaching opl at wss@pnpbios

wss has two attributes, "wss" and "audiobus", and this call didn't
specify an iattr for opl to attach to. config_search_internal asserts
that when no iattr is specified, the parent should only have one.
 1.24 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.23 24-Apr-2021  thorpej branches: 1.23.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.22 08-May-2019  isaki branches: 1.22.12;
Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.21 14-Jul-2016  msaitoh branches: 1.21.18; 1.21.20;
- Use aprint*() more in xxx_attach().
- Add missing aprint_naive("\n").
- Remove extra spaces and tabs.
- KNF.
 1.20 01-Jul-2011  dyoung branches: 1.20.12; 1.20.30;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.19 02-Jun-2011  tsutsui Split device_t/softc of all ad1848 variants properly. Compile test only.

Please check all attribute users in all files.* on device_t/softc split.

XXX: not sure if gus(4) needs device_t in ad1848_isa_softc
 1.18 04-May-2009  cegger branches: 1.18.4; 1.18.6; 1.18.10;
struct device * -> device_t, use device_private
 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 04-Apr-2008  cegger branches: 1.16.4; 1.16.12; 1.16.18;
use aprint_*_dev and device_xname
OK joerg
 1.15 16-Nov-2006  christos branches: 1.15.52;
__unused removal on arguments; approved by core.
 1.14 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.13 11-Dec-2005  christos branches: 1.13.20; 1.13.22;
merge ktrace-lwp.
 1.12 03-Feb-2005  perry branches: 1.12.6;
de-__P
 1.11 03-Oct-2002  uwe branches: 1.11.6; 1.11.14; 1.11.16;
If we don't get record drq from pnpbios, set it to play drq.
Otherwise attaching half-duplex device will trigger panic.
NB: ad1848_isa_get_props should probably check for recdrq == -1 as well.
 1.10 02-Oct-2002  thorpej Tidy up CFATTACH_DECL() formatting.
 1.9 01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 15-May-2002  mrg branches: 1.7.4;
complain if we can't get the recording drq at attach time.
 1.6 15-Nov-2001  lukem add RCSID
 1.5 12-Jun-2000  soren branches: 1.5.6; 1.5.8; 1.5.10;
Attach to CS4610 with CS4236 codec in, well, CS4236 compatibility mode.
 1.4 22-Apr-2000  thorpej branches: 1.4.4;
Allow pnpbios_getirqnum() to return the share type, as well.
 1.3 20-Feb-2000  groo Add ability to customize I/O region and DAC offset based on pnpbios idstr.
Add CSC0000 id from Dell Latitude CPi.
 1.2 14-Nov-1999  thorpej branches: 1.2.2; 1.2.4;
Add an "index" locator to the pnpbios `bus'. This allows us to wire down
device instances if there are more than one of a given type in the PnP
BIOS device table.

Add a pnpbios attachment for `lpt'.
 1.1 12-Nov-1999  drochner "pnpbios" pseudo-bus. Reads out device IDs and ressource usage from the
BIOS and attaches devices to it.
While it is potentially able to deal with all the motherboard ISA
devices, it is only used in hairy cases for now - laptop stuff in
particular.
 1.2.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.2.2 15-Nov-1999  fvdl Sync with -current
 1.2.2.1 14-Nov-1999  fvdl file wss_pnpbios.c was added on branch fvdl-softdep on 1999-11-15 00:38:12 +0000
 1.4.4.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.5.10.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.5.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.10.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.5.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.5.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.5.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.6.1 12-Jun-2000  bouyer file wss_pnpbios.c was added on branch thorpej_scsipi on 2000-11-20 20:09:37 +0000
 1.7.4.2 15-May-2002  mrg complain if we can't get the recording drq at attach time.
 1.7.4.1 15-May-2002  mrg file wss_pnpbios.c was added on branch sommerfeld_i386mp_1 on 2002-05-15 18:14:42 +0000
 1.11.16.1 12-Feb-2005  yamt sync with head.
 1.11.14.1 29-Apr-2005  kent sync with -current
 1.11.6.1 04-Feb-2005  skrll Sync with HEAD.
 1.12.6.1 30-Dec-2006  yamt sync with head.
 1.13.22.2 10-Dec-2006  yamt sync with head.
 1.13.22.1 22-Oct-2006  yamt sync with head
 1.13.20.1 18-Nov-2006  ad Sync with head.
 1.15.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.18.3 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.16.18.2 01-Nov-2009  jym Sync with HEAD.
 1.16.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.16.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.16.4.2 16-May-2009  yamt sync with head
 1.16.4.1 04-May-2009  yamt sync with head.
 1.18.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.18.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.18.4.1 12-Jun-2011  rmind sync with head
 1.20.30.1 05-Oct-2016  skrll Sync with HEAD
 1.20.12.1 03-Dec-2017  jdolecek update from HEAD
 1.21.20.1 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.21.18.1 10-Jun-2019  christos Sync with HEAD
 1.22.12.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.23.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.19 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.18 14-Jul-2016  msaitoh branches: 1.18.18; 1.18.20;
- Use aprint*() more in xxx_attach().
- Add missing aprint_naive("\n").
- Remove extra spaces and tabs.
- KNF.
 1.17 01-Jul-2011  dyoung branches: 1.17.12; 1.17.30;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.16 02-Jun-2011  tsutsui Split device_t/softc of all ad1848 variants properly. Compile test only.

Please check all attribute users in all files.* on device_t/softc split.

XXX: not sure if gus(4) needs device_t in ad1848_isa_softc
 1.15 04-May-2009  cegger branches: 1.15.4; 1.15.6; 1.15.10;
struct device * -> device_t, use device_private
 1.14 04-Apr-2008  cegger branches: 1.14.4; 1.14.18;
use aprint_*_dev and device_xname
OK joerg
 1.13 16-Nov-2006  christos branches: 1.13.52;
__unused removal on arguments; approved by core.
 1.12 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.11 11-Dec-2005  christos branches: 1.11.20; 1.11.22;
merge ktrace-lwp.
 1.10 03-Feb-2005  perry branches: 1.10.6;
de-__P
 1.9 02-Oct-2002  thorpej branches: 1.9.6; 1.9.14; 1.9.16;
Tidy up CFATTACH_DECL() formatting.
 1.8 01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 10-Mar-2002  itohy branches: 1.6.4;
Add explicit support of OPL3-SA2 (YMF711).
Not well tested....
 1.5 15-Nov-2001  lukem add RCSID
 1.4 24-Sep-2000  itohy branches: 1.4.2; 1.4.6; 1.4.8;
Support half-duplex mode (use only one DRQ).
Fix PR #10308.
 1.3 22-Apr-2000  thorpej branches: 1.3.6;
Allow pnpbios_getirqnum() to return the share type, as well.
 1.2 14-Nov-1999  thorpej branches: 1.2.2; 1.2.4;
Add an "index" locator to the pnpbios `bus'. This allows us to wire down
device instances if there are more than one of a given type in the PnP
BIOS device table.

Add a pnpbios attachment for `lpt'.
 1.1 12-Nov-1999  drochner "pnpbios" pseudo-bus. Reads out device IDs and ressource usage from the
BIOS and attaches devices to it.
While it is potentially able to deal with all the motherboard ISA
devices, it is only used in hairy cases for now - laptop stuff in
particular.
 1.2.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.2.2 15-Nov-1999  fvdl Sync with -current
 1.2.2.1 14-Nov-1999  fvdl file ym_pnpbios.c was added on branch fvdl-softdep on 1999-11-15 00:38:12 +0000
 1.3.6.2 27-Mar-2002  he Pull up revisions 1.5-1.6 (requested by itohy):
Several changes to wss-compatible audio devices:
o Fix ADPCM playback/recording
o Add explicit support for OPL3-SA2 (YMF711), fixes PR#14819
o Add AD1845 support
o other minor bugfixes and cleanups
 1.3.6.1 26-Sep-2000  itohy Pull up revision 1.4 (requested by itohy, approved by thorpej):
Support half-duplex mode (use only one DRQ).
Fix PR #10308.
 1.4.8.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.4.8.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.4.6.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.6.1 08-Jan-2002  nathanw Catch up to -current.
 1.4.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.2.1 24-Sep-2000  bouyer file ym_pnpbios.c was added on branch thorpej_scsipi on 2000-11-20 20:09:37 +0000
 1.6.4.2 10-Mar-2002  itohy Add explicit support of OPL3-SA2 (YMF711).
Not well tested....
 1.6.4.1 10-Mar-2002  itohy file ym_pnpbios.c was added on branch sommerfeld_i386mp_1 on 2002-03-10 13:57:13 +0000
 1.9.16.1 12-Feb-2005  yamt sync with head.
 1.9.14.1 29-Apr-2005  kent sync with -current
 1.9.6.1 04-Feb-2005  skrll Sync with HEAD.
 1.10.6.1 30-Dec-2006  yamt sync with head.
 1.11.22.2 10-Dec-2006  yamt sync with head.
 1.11.22.1 22-Oct-2006  yamt sync with head
 1.11.20.1 18-Nov-2006  ad Sync with head.
 1.13.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.18.3 27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.14.18.2 01-Nov-2009  jym Sync with HEAD.
 1.14.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.4.1 16-May-2009  yamt sync with head
 1.15.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.15.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.15.4.1 12-Jun-2011  rmind sync with head
 1.17.30.1 05-Oct-2016  skrll Sync with HEAD
 1.17.12.1 03-Dec-2017  jdolecek update from HEAD
 1.18.20.2 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.18.20.1 03-May-2019  isaki Remove dev/auconv.[ch].
Now it is handled in dev/audio/audio.c and dev/audio/linear.c.
Remove dev/mulaw.h.
It already have been just a link to dev/audio/mulaw.h in this
branch.
 1.18.18.1 10-Jun-2019  christos Sync with HEAD

RSS XML Feed