Home | History | Annotate | only in /src/sys/arch/hpcmips/vr
History log of /src/sys/arch/hpcmips/vr
RevisionDateAuthorComments
 1.30 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.29 18-Mar-2009  cegger branches: 1.29.12; 1.29.22;
Ansify function definitions w/o arguments. Generated with sed.
 1.28 15-Dec-2007  perry branches: 1.28.10; 1.28.18; 1.28.24;
__FUNCTION__ -> __func__
 1.27 11-Dec-2005  christos branches: 1.27.50; 1.27.60; 1.27.64;
merge ktrace-lwp.
 1.26 07-Jun-2005  he branches: 1.26.2;
Sprinkle some const around to make these files compile with -Wcast-qual.
 1.25 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.24 12-Dec-2003  jmc Initialize clksp as gcc can't figure out that it gets set before the switch
 1.23 08-Nov-2003  simonb Add "XXX" to the gcc -Wuninitialised warning fix.
 1.22 07-Nov-2003  dsl Initialise spdreg, gcc doesn't stand a chance of tracking its use.
 1.21 23-Oct-2003  he bus_addr_t on MIPS is integral, so use 0 instead of NULL.
 1.20 15-Jul-2003  lukem __KERNEL_RCSID()
 1.19 02-Oct-2002  thorpej branches: 1.19.6;
Use CFATTACH_DECL().
 1.18 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.17 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.16 10-Feb-2002  takemura Added base address table to compile without SINGLE_VRIP_BASE macro.
 1.15 29-Jan-2002  uch clean up debug print and configuration.
 1.14 27-Jan-2002  takemura Added vripif.
 1.13 26-Jan-2002  takemura Straightened vripvar.h
 1.12 16-Sep-2001  uch branches: 1.12.4;
ANSIfy, KNF.
 1.11 07-Sep-2001  sato initial support of vr4131 bcu.
 1.10 17-May-2001  enami branches: 1.10.2; 1.10.4;
Fix fomula to calcurate TClock; TClock = VTClock / tdiv, not PClock / tdiv.
The manual is inconsistient about this.
 1.9 16-May-2001  enami Calc. cpu speed for VR4122.
 1.8 21-Apr-2001  sato add VR4181 BCU register definitions.
add routines for VR4181.
 1.7 18-Apr-2001  sato - support VR4122 vrip register map.
- support VR4122 ICU register map.
- support VR4122 intr levels.
XXX: currently if 'options VR4122' is defined,
XXX: cannot specify 'options VR4121','options VR4111', 'options VR4102'.
XXXX: i have not the VR4122 based hardware.. so no check for VR4122.
 1.6 27-Oct-2000  sato branches: 1.6.2;
probe message use dv_xname.
 1.5 27-Jan-2000  sato - show bus clock freq setting and memory clock freq setting in boot time.
 1.4 16-Dec-1999  shin add CPU pipeline clock calculation function for VR41xx.
display CPU clock at boot time(Ex. NEC VR4121 rev0.0 131.072MHz).
 1.3 16-Dec-1999  sato - cleanup a little..
 1.2 09-Dec-1999  sato - cleanup a little.
- vrbcu_vrip_getcpuid()
- exported prototype move to header.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.8;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.1.1.2.4 23-Apr-2001  bouyer Sync with HEAD.
 1.1.1.1.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.1.1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.10.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.10.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.10.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.10.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.10.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.12.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.12.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.12.4.1 16-Sep-2001  nathanw file bcu_vrip.c was added on branch nathanw_sa on 2002-02-28 04:10:03 +0000
 1.19.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.19.6.1 03-Aug-2004  skrll Sync with HEAD
 1.26.2.1 21-Jan-2008  yamt sync with head
 1.27.64.1 02-Jan-2008  bouyer Sync with HEAD
 1.27.60.1 26-Dec-2007  ad Sync with head.
 1.27.50.1 09-Jan-2008  matt sync with HEAD
 1.28.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.28.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.28.10.1 04-May-2009  yamt sync with head.
 1.29.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.29.12.1 30-Oct-2012  yamt sync with head
 1.9 01-Apr-2003  igy correcting register definition for VR4181
 1.8 05-Sep-2001  sato branches: 1.8.6;
add VR4131 infomation.
 1.7 21-Aug-2001  sato fix vr4181 register offset.
 1.6 21-Apr-2001  sato branches: 1.6.2;
add VR4181 BCU register definitions.
add routines for VR4181.
 1.5 16-Apr-2001  sato fix typo in comment.
 1.4 11-Apr-2001  sato add VR4101 specific BCU registers.
add VR4122 specific BCU registers.
add cpu specific comments.
 1.3 27-Jan-2000  sato branches: 1.3.6;
- show bus clock freq setting and memory clock freq setting in boot time.
 1.2 13-Dec-1999  sato - change some comments.
- vr4102 have not BCUCNT3_REG_W register, so comment it.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.8;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.1.1.2.3 23-Apr-2001  bouyer Sync with HEAD.
 1.1.1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.6.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.6.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.8.6.2 05-Sep-2001  sato add VR4131 infomation.
 1.8.6.1 05-Sep-2001  sato file bcureg.h was added on branch nathanw_sa on 2001-09-05 16:08:47 +0000
 1.7 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.6 11-Dec-2005  christos branches: 1.6.112; 1.6.122;
merge ktrace-lwp.
 1.5 07-Jun-2005  he Sprinkle some const around to make these files compile with -Wcast-qual.
 1.4 16-Sep-2001  uch branches: 1.4.4; 1.4.20;
ANSIfy, KNF.
 1.3 16-Dec-1999  shin branches: 1.3.6; 1.3.8;
add CPU pipeline clock calculation function for VR41xx.
display CPU clock at boot time(Ex. NEC VR4121 rev0.0 131.072MHz).
 1.2 09-Dec-1999  sato - cleanup a little.
- vrbcu_vrip_getcpuid()
- exported prototype move to header.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.8;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.8.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.6.1 01-Oct-2001  fvdl Catch up with -current.
 1.4.20.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.4.2 16-Sep-2001  uch ANSIfy, KNF.
 1.4.4.1 16-Sep-2001  uch file bcuvar.h was added on branch nathanw_sa on 2001-09-16 05:32:21 +0000
 1.6.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.112.1 30-Oct-2012  yamt sync with head
 1.5 30-Apr-2001  takemura Machine independent GPIO interface.
 1.4 18-Apr-2001  sato - support VR4122 vrip register map.
- support VR4122 ICU register map.
- support VR4122 intr levels.
XXX: currently if 'options VR4122' is defined,
XXX: cannot specify 'options VR4121','options VR4111', 'options VR4102'.
XXXX: i have not the VR4122 based hardware.. so no check for VR4122.
 1.3 26-Mar-2001  sato CONFIG_HOOK_GET support for get current port status.
 1.2 10-Feb-2000  sato branches: 1.2.6; 1.2.8;
show edge/level infomation in attach message.
 1.1 23-Dec-1999  takemura New button handler and power controller with configurable hooking mechanism.
 1.2.8.1 09-Apr-2001  nathanw Catch up with -current.
 1.2.6.4 21-Apr-2001  bouyer Sync with HEAD
 1.2.6.3 27-Mar-2001  bouyer Sync with HEAD.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 10-Feb-2000  bouyer file button_vrgiu.c was added on branch thorpej_scsipi on 2000-11-20 20:47:48 +0000
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 01-May-2003  igy branches: 1.1.104; 1.1.106; 1.1.108;
Support for Laser5's L-Card+ Embedded CPU Board
 1.1.108.1 16-May-2008  yamt sync with head.
 1.1.106.1 18-May-2008  yamt sync with head.
 1.1.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.14 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.13 11-Dec-2005  christos branches: 1.13.112; 1.13.122;
merge ktrace-lwp.
 1.12 15-Jul-2003  lukem __KERNEL_RCSID()
 1.11 02-Oct-2002  thorpej branches: 1.11.6;
Use CFATTACH_DECL().
 1.10 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.9 02-Feb-2002  takemura Removed __vrcmu_supply() and __vrgiu_out(), which are need to enable serial
port before auto configuration.

Boot loaders (pbsdboot and hpcboot) are responsible to enable the port because
the kernel can't enable serial port for console any more.
 1.8 29-Jan-2002  uch clean up debug print and configuration.
 1.7 27-Jan-2002  takemura Added vripif.
 1.6 26-Jan-2002  takemura Straightened vripvar.h
 1.5 16-Sep-2001  uch branches: 1.5.4;
ANSIfy, KNF.
 1.4 11-Jun-2001  enami branches: 1.4.2; 1.4.4;
Cosmetic changes.
 1.3 18-Apr-2001  sato use VRIP_CMU_ADDR in vr/vripreg.h
 1.2 07-Sep-2000  sato branches: 1.2.2;
- adapt config_hook(CONFIG_HOOK_PMEVENT,..)
save cmu clock mask register and disable all clock when PWR_SUSPEND event.
restore saved cmu clock mask register when PWR_RESUME event.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.4.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.4.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.4.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.5.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.5.4.1 16-Sep-2001  nathanw file cmu.c was added on branch nathanw_sa on 2002-02-28 04:10:03 +0000
 1.11.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.6.1 03-Aug-2004  skrll Sync with HEAD
 1.13.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.112.1 30-Oct-2012  yamt sync with head
 1.5 01-May-2003  igy Support for Laser5's L-Card+ Embedded CPU Board
 1.4 28-Sep-2001  sato branches: 1.4.4;
add VR4181 clock control.
 1.3 17-May-2001  sato branches: 1.3.2; 1.3.4;
vr4122 releted definition.
 1.2 18-Apr-2001  sato use VRIP_CMU_ADDR in vr/vripreg.h
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.14;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.14.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.1.1.2.1 21-Apr-2001  bouyer Sync with HEAD
 1.3.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.4.2 28-Sep-2001  sato add VR4181 clock control.
 1.4.4.1 28-Sep-2001  sato file cmureg.h was added on branch nathanw_sa on 2001-09-28 10:25:16 +0000
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 02-Feb-2002  takemura branches: 1.4.118; 1.4.120; 1.4.122;
Removed __vrcmu_supply() and __vrgiu_out(), which are need to enable serial
port before auto configuration.

Boot loaders (pbsdboot and hpcboot) are responsible to enable the port because
the kernel can't enable serial port for console any more.
 1.3 27-Jan-2002  takemura Added vripif.
 1.2 16-Sep-2001  uch branches: 1.2.4;
ANSIfy, KNF.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.14; 1.1.1.1.16;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.16.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.1.1.16.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.1.1.14.1 01-Oct-2001  fvdl Catch up with -current.
 1.2.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.1 16-Sep-2001  nathanw file cmuvar.h was added on branch nathanw_sa on 2002-02-28 04:10:03 +0000
 1.4.122.1 16-May-2008  yamt sync with head.
 1.4.120.1 18-May-2008  yamt sync with head.
 1.4.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.24 08-Jul-2022  skrll alredy -> already
 1.23 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.22 27-Oct-2012  chs branches: 1.22.36; 1.22.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.21 29-Aug-2008  tsutsui branches: 1.21.28; 1.21.38;
Fix a fallout of device_t/softc split for com(4) devices.
Per PR port-hpcmips/39426 from Nozomu Ando.
 1.20 14-Mar-2008  cube branches: 1.20.4; 1.20.6; 1.20.10;
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.19 13-Jul-2006  gdamore branches: 1.19.34; 1.19.54; 1.19.58;
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.18 29-Mar-2006  thorpej branches: 1.18.4;
Use device_cfdata().
 1.17 11-Dec-2005  christos branches: 1.17.4; 1.17.6; 1.17.8; 1.17.10; 1.17.12;
merge ktrace-lwp.
 1.16 15-Jul-2003  lukem branches: 1.16.16;
__KERNEL_RCSID()
 1.15 14-Jun-2003  thorpej branches: 1.15.2;
Also pass a type argument to comcnattach() and com_kgdb_attach().
comspeed() (and thus cominit()) may need this information.
 1.14 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.13 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.12 02-Feb-2002  takemura Removed __vrcmu_supply() and __vrgiu_out(), which are need to enable serial
port before auto configuration.

Boot loaders (pbsdboot and hpcboot) are responsible to enable the port because
the kernel can't enable serial port for console any more.
 1.11 27-Jan-2002  takemura Added vripif.
 1.10 28-Sep-2001  sato branches: 1.10.4;
add VR4181 clock control.
 1.9 16-Sep-2001  uch ANSIfy, KNF.
 1.8 30-May-2001  lukem branches: 1.8.2; 1.8.4;
add missing #include "opt_kgdb.h"
 1.7 30-Apr-2001  takemura Machine independent GPIO interface.
 1.6 11-Mar-2001  uch remove unneeded include.
 1.5 27-Oct-2000  sato branches: 1.5.2;
- add VPRINTF().
- show pwctl giu bit for verbose.
 1.4 20-Jul-2000  jeffs kgdb support for the vr hpcmips machines.
From Ethan Solomita (ethan@geocast.com).
 1.3 11-Feb-2000  takemura Add com0's power control ID.
 1.2 23-Dec-1999  takemura New button handler and power controller with configurable hooking mechanism.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.5.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.8.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.8.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.8.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.8.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.10.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.10.4.1 28-Sep-2001  nathanw file com_vrip.c was added on branch nathanw_sa on 2002-02-28 04:10:04 +0000
 1.15.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.16.3 17-Mar-2008  yamt sync with head.
 1.16.16.2 30-Dec-2006  yamt sync with head.
 1.16.16.1 21-Jun-2006  yamt sync with head.
 1.17.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.17.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.17.8.2 11-Aug-2006  yamt sync with head
 1.17.8.1 01-Apr-2006  yamt sync with head.
 1.17.6.1 22-Apr-2006  simonb Sync with head.
 1.17.4.1 09-Sep-2006  rpaulo sync with head
 1.18.4.1 16-Jun-2006  gdamore com(4) attachment hacks. Note that these aren't as clean as they could be,
particularly com_hpcio.c, which has a custom bus_space which could probably
be eliminated. But _I_ don't have an hpcmips to test with. The compile of
MPC303 works, but GENERIC fails due to an error in tx39clock.c, so I'm
_not_ testing it. (But both files at least _compiled_.)
 1.19.58.2 28-Sep-2008  mjf Sync with HEAD.
 1.19.58.1 03-Apr-2008  mjf Sync with HEAD.
 1.19.54.1 24-Mar-2008  keiichi sync with head.
 1.19.34.1 23-Mar-2008  matt sync with HEAD
 1.20.10.1 19-Oct-2008  haad Sync with HEAD.
 1.20.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.20.4.1 04-May-2009  yamt sync with head.
 1.21.38.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.21.28.1 30-Oct-2012  yamt sync with head
 1.22.38.1 10-Jun-2019  christos Sync with HEAD
 1.22.36.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.3 16-Sep-2001  uch branches: 1.3.4;
ANSIfy, KNF.
 1.2 20-Jul-2000  jeffs branches: 1.2.2; 1.2.4;
kgdb support for the vr hpcmips machines.
From Ethan Solomita (ethan@geocast.com).
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.4.2 16-Sep-2001  uch ANSIfy, KNF.
 1.3.4.1 16-Sep-2001  uch file com_vripvar.h was added on branch nathanw_sa on 2001-09-16 05:32:21 +0000
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.2 19-Jan-2001  sato fix typos.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.2.1 11-Feb-2001  bouyer Sync with HEAD.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.15 12-Sep-2023  andvar rename flash_cd to vrflash_cd, since device was renamed to vrflash.

Fixes hpcmips LCARD config linking issue that flash_cd is undefined.
 1.14 11-Sep-2023  andvar hpcmips/vrflash(4): custom DPRINTF definition requires additional brackets
around the arguments.

Fixes FLUSH_DEBUG build.

However the driver fails to link due to missing reference to flash_cd,
my guess because of obsoleted flash device-major.
 1.13 21-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.12 10-Nov-2019  chs branches: 1.12.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.11 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.10 25-Jul-2014  dholland branches: 1.10.26; 1.10.28;
Add d_discard to all struct cdevsw instances I could find.

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

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.8 27-Oct-2012  chs branches: 1.8.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.7 11-Jun-2008  cegger branches: 1.7.30; 1.7.40;
use device_lookup_private to get softc
 1.6 28-Apr-2008  martin branches: 1.6.2; 1.6.4;
Remove clause 3 and 4 from TNF licenses
 1.5 11-Dec-2005  christos branches: 1.5.74; 1.5.76; 1.5.78;
merge ktrace-lwp.
 1.4 29-Dec-2003  igy branches: 1.4.16;
throw error status when erase command timed out
 1.3 29-Dec-2003  igy make sure variables initialized
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 01-May-2003  igy branches: 1.1.2;
Support for Laser5's L-Card+ Embedded CPU Board
 1.1.2.4 24-Jan-2005  skrll Adapt to branch.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.1 21-Jun-2006  yamt sync with head.
 1.5.78.2 04-May-2009  yamt sync with head.
 1.5.78.1 16-May-2008  yamt sync with head.
 1.5.76.2 17-Jun-2008  yamt sync with head.
 1.5.76.1 18-May-2008  yamt sync with head.
 1.5.74.2 29-Jun-2008  mjf Sync with HEAD.
 1.5.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.4.1 18-Jun-2008  simonb Sync with head.
 1.6.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.7.40.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.40.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7.30.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.30.1 30-Oct-2012  yamt sync with head
 1.8.2.1 18-May-2014  rmind sync with head
 1.9.2.1 10-Aug-2014  tls Rebase.
 1.10.28.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10.28.1 10-Jun-2019  christos Sync with HEAD
 1.10.26.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.12.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 01-May-2003  igy branches: 1.1.104; 1.1.106; 1.1.108;
Support for Laser5's L-Card+ Embedded CPU Board
 1.1.108.1 16-May-2008  yamt sync with head.
 1.1.106.1 18-May-2008  yamt sync with head.
 1.1.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.2 28-Apr-2008  martin branches: 1.2.34; 1.2.44;
Remove clause 3 and 4 from TNF licenses
 1.1 01-May-2003  igy branches: 1.1.104; 1.1.106; 1.1.108;
Support for Laser5's L-Card+ Embedded CPU Board
 1.1.108.1 16-May-2008  yamt sync with head.
 1.1.106.1 18-May-2008  yamt sync with head.
 1.1.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.34.1 30-Oct-2012  yamt sync with head
 1.2 30-Apr-2001  takemura Machine independent GPIO interface.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.8 01-Apr-2003  igy add comment for VR4181
 1.7 11-Feb-2002  takemura Added Vr4122 and Vr4131 support to GENERIC configuration.
 1.6 09-Feb-2002  sato change NO_REG_W to ICU_NO_REG_W.
 1.5 27-Sep-2001  sato branches: 1.5.4;
- add VR4181 ICU register map.
- add VR4181 intr levels.
- add VR4131 ICU register map.
- add VR4131 intr levels.
XXX: not yet tested these platform.
 1.4 18-Apr-2001  sato branches: 1.4.2; 1.4.4;
- support VR4122 vrip register map.
- support VR4122 ICU register map.
- support VR4122 intr levels.
XXX: currently if 'options VR4122' is defined,
XXX: cannot specify 'options VR4121','options VR4111', 'options VR4102'.
XXXX: i have not the VR4122 based hardware.. so no check for VR4122.
 1.3 16-Apr-2001  sato add VR4122 specified register definitions.
XXX: vrip.c is not yet supported VR4122.
 1.2 28-Dec-1999  takemura branches: 1.2.6;
VR41xx's PIU (Touch panel I/F unit) suport.
Currently it emulates relative pointing device like mouse, but it should
behave like an absolute pointing device. It needs more works in wsmouse side.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.4.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.4.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.5.4.1 27-Sep-2001  nathanw file icureg.h was added on branch nathanw_sa on 2002-02-28 04:10:04 +0000
 1.10 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.9 11-Dec-2005  christos branches: 1.9.112; 1.9.122;
merge ktrace-lwp.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 02-Oct-2002  thorpej branches: 1.7.6;
Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 27-Jan-2002  takemura Added vripif.
 1.4 16-Sep-2001  uch branches: 1.4.4;
ANSIfy, KNF.
 1.3 18-Apr-2001  sato branches: 1.3.2; 1.3.4;
- support VR4122 vrip register map.
- support VR4122 ICU register map.
- support VR4122 intr levels.
XXX: currently if 'options VR4122' is defined,
XXX: cannot specify 'options VR4121','options VR4111', 'options VR4102'.
XXXX: i have not the VR4122 based hardware.. so no check for VR4122.
 1.2 22-Feb-2001  uch branches: 1.2.2;
hpc common files are moved to dev/hpc.
 1.1 02-Oct-2000  sato branches: 1.1.2;
experimental ite8181 video driver for hpcfb.
- just copy from bivideo.
- erase WindowsCE hardware cursor initialy.
- LCD power management codes exist, but currently disabled.
Because some devices(include ite8181) confuse after LCD power turn on.
WorkPad z50 power unit seem to be very weak
 1.1.2.4 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.2.1 02-Oct-2000  bouyer file ite8181_vrip.c was added on branch thorpej_scsipi on 2000-11-20 20:47:50 +0000
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.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.3.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.4.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.1 16-Sep-2001  nathanw file ite8181_vrip.c was added on branch nathanw_sa on 2002-02-28 04:10:04 +0000
 1.7.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.6.1 03-Aug-2004  skrll Sync with HEAD
 1.9.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.112.1 30-Oct-2012  yamt sync with head
 1.13 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.12 11-Dec-2005  christos branches: 1.12.112; 1.12.122;
merge ktrace-lwp.
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 02-Oct-2002  thorpej branches: 1.10.6;
Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 01-Sep-2002  takemura Fixed again. Rev 1.7 was incomplete and this device did't work for long time.
 1.7 11-May-2002  takemura branches: 1.7.4;
BUGFIX: Xhpc dumps core on SigmarionII.
Attached MQ200 video controller at PCI bus.
 1.6 27-Jan-2002  takemura Added vripif.
 1.5 16-Sep-2001  uch branches: 1.5.4;
ANSIfy, KNF.
 1.4 18-Apr-2001  sato branches: 1.4.2; 1.4.4;
- support VR4122 vrip register map.
- support VR4122 ICU register map.
- support VR4122 intr levels.
XXX: currently if 'options VR4122' is defined,
XXX: cannot specify 'options VR4121','options VR4111', 'options VR4102'.
XXXX: i have not the VR4122 based hardware.. so no check for VR4122.
 1.3 22-Feb-2001  uch branches: 1.3.2;
hpc common files are moved to dev/hpc.
 1.2 02-Oct-2000  sato branches: 1.2.2;
check NBIVIDEO.
 1.1 22-Jul-2000  takemura branches: 1.1.2;
Experimental MQ200 video driver. It's just copy of bivideo plus power
management routine.
 1.1.2.2 06-Aug-2000  takemura Pull up revision 1.1 (new, requested by takemura)

New MQ200 video power management driver.
 1.1.2.1 22-Jul-2000  takemura file mq200_vrip.c was added on branch netbsd-1-5 on 2000-08-06 03:58:23 +0000
 1.2.2.4 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 02-Oct-2000  bouyer file mq200_vrip.c was added on branch thorpej_scsipi on 2000-11-20 20:47:51 +0000
 1.3.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.4.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.4.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.5.4.4 17-Sep-2002  nathanw Catch up to -current.
 1.5.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.5.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.5.4.1 16-Sep-2001  nathanw file mq200_vrip.c was added on branch nathanw_sa on 2002-02-28 04:10:04 +0000
 1.7.4.1 30-Nov-2002  he Pull up revision 1.8 (requested by takemura in ticket #753):
Fix this driver; revision 1.7 was incomplete.
 1.10.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.6.1 03-Aug-2004  skrll Sync with HEAD
 1.12.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.12.112.1 30-Oct-2012  yamt sync with head
 1.2 10-Jan-2000  takemura WSMOUSE_SCALIBCOORDS/WSMOUSE_GCALIBCOORDS support.
 1.1 28-Dec-1999  takemura VR41xx's PIU (Touch panel I/F unit) suport.
Currently it emulates relative pointing device like mouse, but it should
behave like an absolute pointing device. It needs more works in wsmouse side.
 1.8 30-Apr-2001  takemura Machine independent GPIO interface.
 1.7 18-Apr-2001  sato - support VR4122 vrip register map.
- support VR4122 ICU register map.
- support VR4122 intr levels.
XXX: currently if 'options VR4122' is defined,
XXX: cannot specify 'options VR4121','options VR4111', 'options VR4102'.
XXXX: i have not the VR4122 based hardware.. so no check for VR4122.
 1.6 26-Mar-2001  sato CONFIG_HOOK_GET support for get current port status.
 1.5 17-Oct-2000  sato branches: 1.5.2; 1.5.4;
add new keyword "initvalue" on pwctl device.
if "initvalue 0", set the port initialy "off".
if "initvalue 1", set the port initialy "on".
otherwise keep initial value.
 1.4 10-Sep-2000  sato handle CONFIG_HOOK_POWERCONTROL events
- PWR_SUSPEND: save giu bits values and turn "off" the values.
- PWR_RESUME: restore giu bits values.
 1.3 11-Feb-2000  takemura Add com0's power control ID.
 1.2 09-Feb-2000  takemura The pwctl writes ZERO as on if active=0.
 1.1 23-Dec-1999  takemura New button handler and power controller with configurable hooking mechanism.
 1.5.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.5.2.4 21-Apr-2001  bouyer Sync with HEAD
 1.5.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.5.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.2.1 17-Oct-2000  bouyer file pwctl_vrgiu.c was added on branch thorpej_scsipi on 2000-11-20 20:47:51 +0000
 1.37 07-Sep-2025  thorpej Change todr_chip_handle::cookie -> todr_chip_handle::todr_dev, and
make it a device_t. Upcoming functional changes will require the
device_t associated with a TODR device.

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

And with these largely mechanical yet semantically meaningful changes,
thus spake the Oracle: "Welcome to NetBSD 11.99.2."
 1.36 21-Jul-2022  andvar fix typos in comments and log messages, mainly s/intrrupt/interrupt/.
 1.35 11-Jul-2015  kamil Improve spelling: regsiter -> register

This change is non-functional.

Approved by <riastradh>, <pgoyette>
 1.34 20-Nov-2014  christos branches: 1.34.2;
this is supposed to be SECS_PER_DAY.
 1.33 17-Nov-2014  christos PR/49207: Kamil Rytarowski: Add sys/clock.h with generic time macros
(derived from clock_subr.h). Keep clock_subr.h with the kernel structures
and functions to reduce diffs, and have clock.h only include standalone
constants and macros.
 1.32 18-Mar-2011  tsutsui branches: 1.32.14;
Use vaddr_t for pc instead of uint32_t.
 1.31 16-Mar-2011  tsutsui Split device_t/softc. Tested on GXemul.
 1.30 16-Mar-2011  tsutsui Fix device_t/softc confusion.
(currently harmless since they are not split yet)
 1.29 16-Mar-2011  tsutsui KNF and cosmetics.
 1.28 16-Mar-2011  tsutsui Fix signedness issue triggered by 64 bit time_t.
 1.27 10-Mar-2011  tsutsui Set correct struct clockframe .intr value for hardclock(9).
 1.26 12-Dec-2009  tsutsui branches: 1.26.4; 1.26.6;
Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
 1.25 04-Jan-2008  ad branches: 1.25.10;
Need sys/device.h
 1.24 16-Sep-2006  gdamore branches: 1.24.30; 1.24.36; 1.24.44;
Convert hpcmips to TODR and timecounters. Ok jun@.
 1.23 24-Dec-2005  perry branches: 1.23.20;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.22 11-Dec-2005  christos merge ktrace-lwp.
 1.21 07-Jun-2005  he branches: 1.21.2;
Rename local variable 'min' to 'mins' to avoid shadowing warning.
 1.20 15-Jul-2003  lukem __KERNEL_RCSID()
 1.19 06-Jan-2003  wiz branches: 1.19.2;
interrupt with two rs.
 1.18 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.17 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.16 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.15 15-May-2002  uch obsolete intrcnt[].
 1.14 10-Feb-2002  takemura Made rtc.c compilable without SINGLE_VRIP_BASE macro.
 1.13 09-Feb-2002  sato RTC_NO_REG_W unsigned
 1.12 27-Jan-2002  takemura Added vripif.
 1.11 24-Dec-2001  shin fix debug printf() format string.
 1.10 30-Sep-2001  sato branches: 1.10.4;
add VR4181, VR4131 support.
 1.9 19-Sep-2001  uch make this compile again.
 1.8 18-Sep-2001  uch remove dev/dec/clockvar.h from hpcmips source tree.
 1.7 16-Sep-2001  uch ANSIfy, KNF.
 1.6 17-Jul-2001  toshii branches: 1.6.2;
"infomation" -> "information"
 1.5 17-May-2001  enami branches: 1.5.2;
Include opt_vr41xx.h and vrcpudef.h
 1.4 17-Mar-2000  sato branches: 1.4.6;
change about debug print.
 1.3 17-Jan-2000  sato delete unused codes.
 1.2 07-Dec-1999  sato cleanup a little..
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.8;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.5.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.5.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.5.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.2.1 03-Aug-2001  lukem update to -current
 1.6.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.10.4.6 07-Jan-2003  thorpej Sync with HEAD.
 1.10.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.10.4.4 20-Jun-2002  nathanw Catch up to -current.
 1.10.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.10.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.10.4.1 30-Sep-2001  nathanw file rtc.c was added on branch nathanw_sa on 2002-01-08 00:25:05 +0000
 1.19.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.19.2.1 03-Aug-2004  skrll Sync with HEAD
 1.21.2.3 21-Jan-2008  yamt sync with head
 1.21.2.2 30-Dec-2006  yamt sync with head.
 1.21.2.1 21-Jun-2006  yamt sync with head.
 1.23.20.1 18-Nov-2006  ad Sync with head.
 1.24.44.1 08-Jan-2008  bouyer Sync with HEAD
 1.24.36.1 18-Feb-2008  mjf Sync with HEAD.
 1.24.30.1 09-Jan-2008  matt sync with HEAD
 1.25.10.1 11-Mar-2010  yamt sync with head
 1.26.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.26.4.1 21-Apr-2011  rmind sync with head
 1.32.14.1 03-Dec-2017  jdolecek update from HEAD
 1.34.2.1 22-Sep-2015  skrll Sync with HEAD
 1.10 17-Nov-2014  christos PR/49207: Kamil Rytarowski: Add sys/clock.h with generic time macros
(derived from clock_subr.h). Keep clock_subr.h with the kernel structures
and functions to reduce diffs, and have clock.h only include standalone
constants and macros.
 1.9 16-Sep-2006  gdamore branches: 1.9.102;
Convert hpcmips to TODR and timecounters. Ok jun@.
 1.8 10-Feb-2002  sato branches: 1.8.32; 1.8.62;
fix miss changing.
 1.7 09-Feb-2002  sato RTC_NO_REG_W unsigned
 1.6 24-Dec-2001  shin make YBASE and EPOCHYEAR tunable.
 1.5 30-Sep-2001  sato branches: 1.5.4;
add VR4181, VR4131 support.
 1.4 18-Sep-2001  uch remove dev/dec/clockvar.h from hpcmips source tree.
 1.3 17-May-2001  sato branches: 1.3.2; 1.3.4;
vr4122 releted definition.
 1.2 07-Dec-1999  sato branches: 1.2.6;
cleanup a little..
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.8;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.3.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.5.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.4.1 30-Sep-2001  nathanw file rtcreg.h was added on branch nathanw_sa on 2002-01-08 00:25:06 +0000
 1.8.62.1 18-Nov-2006  ad Sync with head.
 1.8.32.1 30-Dec-2006  yamt sync with head.
 1.9.102.1 03-Dec-2017  jdolecek update from HEAD
 1.4 04-Jan-2002  takemura branches: 1.4.2;
Renamed sg2com -> com_hpcio. Now it seems to be working on SigmarionII.
 1.3 02-Jan-2002  takemura BUGFIX: sg2com isn't attached as a console device if it is a console.
 1.2 29-Dec-2001  takemura Commented out the line which install interrupt handler because sg2com
interrupt port is unknown and it doesn't work at all.
 1.1 23-Dec-2001  takemura Added SigmarionII serial port support.
(console onlty, interrupt is not supported)
 1.4.2.1 08-Jan-2002  nathanw Catch up to -current.
 1.2 04-Jan-2002  takemura branches: 1.2.2;
Renamed sg2com -> com_hpcio. Now it seems to be working on SigmarionII.
 1.1 23-Dec-2001  takemura Added SigmarionII serial port support.
(console onlty, interrupt is not supported)
 1.2.2.1 08-Jan-2002  nathanw Catch up to -current.
 1.2 04-Jan-2002  takemura branches: 1.2.2;
Renamed sg2com -> com_hpcio. Now it seems to be working on SigmarionII.
 1.1 23-Dec-2001  takemura Added SigmarionII serial port support.
(console onlty, interrupt is not supported)
 1.2.2.1 08-Jan-2002  nathanw Catch up to -current.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.65 26-Mar-2014  christos - kill sprintf
- fix unused
 1.64 18-Mar-2011  tsutsui branches: 1.64.4; 1.64.14; 1.64.18;
Use vaddr_t for pc instead of uint32_t.
 1.63 16-Mar-2011  tsutsui Set sr_bits[IPL_HIGH] properly, rather than setting sr_bits[IPL_VM] twice.

I wonder if gcc could warn such botch in C99 array or member initializers...
 1.62 16-Mar-2011  tsutsui vr_intr_handler[] takes status for hardclock(9), not ipending.
 1.61 16-Mar-2011  tsutsui Blindly prepare an equivalent function with old _spllower(~MIPS_INT_MASK_0)
that disabled all interrupts except PIU. Compile test only.
 1.60 26-Feb-2011  tsutsui Explicitly include <mips/locore.h> for wbflush().
 1.59 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
(XXX don't know how to deal with use of spllower in sleep/pause code so
hpcmips kernel will fail to compile).
 1.58 20-Dec-2010  matt branches: 1.58.2; 1.58.4;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.57 15-Nov-2010  uebayasi struct cpu_info * deref needs sys/cpu.h.
 1.56 10-Apr-2010  jun workaround for port-hpcmips/42934
"NetBSD/hpcmips can't boot after 5.99.23"
adviced by Naoki Fukaumi on twitter.
 1.55 21-Jan-2010  pooka branches: 1.55.2; 1.55.4;
Move arch-local variable to a better namespace to make build again.
 1.54 19-Aug-2009  jun Fix #41863, Missing "}".
 1.53 18-Mar-2009  cegger bcmp -> memcmp
 1.52 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.51 04-Apr-2008  tsutsui branches: 1.51.4; 1.51.12; 1.51.14; 1.51.18; 1.51.20; 1.51.22;
Account ci_idepth in VR_INTR() and TX_INTR, rather than cpu_intr() in
hpcmips/interrupt.c. The latter one is used only on kernels configured for
multiple CPUs (i.e. kernels which have both options VR41XX and TX39XX).

Closes PR port-hpcmips/38139 from Risto Sainio.
 1.50 04-Jan-2008  ad branches: 1.50.6;
Need sys/device.h
 1.49 03-Dec-2007  ad branches: 1.49.6;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.48 08-Mar-2007  he branches: 1.48.2; 1.48.18; 1.48.20; 1.48.26;
Due to pointer arithmetic, convert local "page" variable from void* to char*.
 1.47 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.46 11-Dec-2005  christos branches: 1.46.26;
merge ktrace-lwp.
 1.45 16-Jan-2005  hamajima branches: 1.45.2; 1.45.10;
Apply patch hpcmips/26158 (requested by darkstar)
This patch solves install/28656.
 1.44 25-Oct-2003  mycroft branches: 1.44.6;
Fix typo.
 1.43 25-Oct-2003  mycroft Token-pasting nits for GCC 3.
 1.42 15-Jul-2003  lukem __KERNEL_RCSID()
 1.41 02-Apr-2003  thorpej branches: 1.41.2;
Use PAGE_SIZE rather than NBPG.
 1.40 24-Nov-2002  shin wipe out all physical memory before hibernate/reset.
otherwise, WinCE will not boot on some machine (ex. IBM z50).
 1.39 11-Feb-2002  takemura branches: 1.39.10;
Added Vr4122 and Vr4131 support to GENERIC configuration.
 1.38 11-Feb-2002  takemura Added vr4122ip.
 1.37 10-Feb-2002  takemura Made vr.c compilable without SINGLE_VRIP_BASE macro.
 1.36 31-Jan-2002  uch clean up header file.
 1.35 04-Jan-2002  takemura Renamed sg2com -> com_hpcio. Now it seems to be working on SigmarionII.
 1.34 02-Jan-2002  uch fix bootstrap stack violation.
 1.33 29-Dec-2001  takemura Added sg2com(SigmarionII sertial).
 1.32 18-Nov-2001  takemura Rewrite bus stuff with method table in the bus tags.
 1.31 23-Sep-2001  uch branches: 1.31.4;
improve interrupt response.
 1.30 17-Sep-2001  uch clean up "mainbus" related code.
 1.29 16-Sep-2001  uch rearrange struct platform@sysconf.h suitable for hpcmips.
overhaul hpcmips/hpcmips/. no actual changes.
 1.28 16-Sep-2001  uch ANSIfy, KNF.
 1.27 15-Sep-2001  uch switch from splvec to ipl_sr_bits.
 1.26 11-Jun-2001  enami branches: 1.26.2; 1.26.4;
make GENERIC compile again.
 1.25 11-Jun-2001  enami - make this file compile even if either hpcfb or vrkiu isn't included.
- introduce new cpp symbol VR_FIND_DRAMLIM not to probe dram beyound this.
for example, MP-C303 hangs hard if memoy beyond 0x03800000 is probed.
 1.24 30-May-2001  lukem add missing #include "opt_kgdb.h"
 1.23 17-May-2001  enami Use VRIP_SIU_ADDR instead of 0x0c000000 for base address of serial console
or kgdb connection.
 1.22 18-Apr-2001  sato - support VR4122 vrip register map.
- support VR4122 ICU register map.
- support VR4122 intr levels.
XXX: currently if 'options VR4122' is defined,
XXX: cannot specify 'options VR4121','options VR4111', 'options VR4102'.
XXXX: i have not the VR4122 based hardware.. so no check for VR4122.
 1.21 12-Apr-2001  thorpej splvec.splimp -> splvec.splvm
 1.20 22-Feb-2001  uch branches: 1.20.2;
hpc common files are moved to dev/hpc.
 1.19 22-Jul-2000  takemura mb_bus_space_init() had been removed accidentally when KGDB was supported.
It's need for initialize system_bus_iot.
 1.18 20-Jul-2000  jeffs kgdb support for the vr hpcmips machines.
From Ethan Solomita (ethan@geocast.com).
 1.17 02-May-2000  uch change hpfcb_cnattach interface to adopt current implementation.
 1.16 11-Apr-2000  uch sync with new mips trap.c
 1.15 12-Mar-2000  takemura New frame buffer driver 'hpcfb' and built in video controller 'bivideo'
 1.14 25-Feb-2000  shin stop memory probing at first memory image.
this is necessary for MC-CS12.
 1.13 21-Feb-2000  shin support non-contiguous memory.
patch from Mycroft <root@ihack.net> and uch@netbsd.org.
tested hardware:
VR4121 IBM WorkPad z50 (48MB, 16MB)
VR4121 NEC Mobile Gear II MC/R730
TX3912 Compaq C-series 810 (20MB), 2010c (20MB, 16MB)
TX3922 Sharp Telios HC-AJ2 (32MB)
 1.12 10-Feb-2000  sato add machine model name to cpu_model.
 1.11 28-Jan-2000  takemura CPU specific idle hook and VR idle routine.
 1.10 16-Dec-1999  shin display CPU clock at boot time(Ex. NEC VR4121 rev0.0 131.072MHz).
 1.9 09-Dec-1999  sato vrbcu related change.
 1.8 04-Dec-1999  takemura You can push power key to reboot when halt in vr_reboot.
 1.7 04-Dec-1999  takemura Unify vr_reset and vr_powerdown.
 1.6 28-Nov-1999  sato PowerOff code. (not yet completely)
'halt -p' availavle.
not yet all power off...
cannot exit poweroff mode. (reset required..)
 1.5 28-Nov-1999  takemura Add new device vrdsu, with which we can hard reset the VR41xx CPU.
Why don't you try shutdown comand with option '-r ?
 1.4 21-Nov-1999  uch add new function vr_fb_init, vr_mem_init.
 1.3 24-Oct-1999  takemura Wsdisplay and wskbd are supported as a console device.
 1.2 16-Oct-1999  shin branches: 1.2.2; 1.2.4;
fix message in vr_device_register()
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.4.1 15-Nov-1999  fvdl Sync with -current
 1.2.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.20.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.26.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.26.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.26.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.26.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.31.4.5 11-Dec-2002  thorpej Sync with HEAD.
 1.31.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.31.4.3 11-Jan-2002  nathanw More catchup.
 1.31.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.31.4.1 23-Sep-2001  nathanw file vr.c was added on branch nathanw_sa on 2002-01-08 00:25:06 +0000
 1.39.10.1 12-Dec-2002  he Pull up revision 1.40 (requested by shin in ticket #1013):
Wipe out all physical memory before hibernate/reset.
Otherwise, WinCE will not boot on some machines (e.g. IBM
z50).
 1.41.2.4 17-Jan-2005  skrll Sync with HEAD.
 1.41.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.41.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.41.2.1 03-Aug-2004  skrll Sync with HEAD
 1.44.6.1 16-Apr-2005  tron Pull up revision 1.45 (requested by hamajima in ticket #1097):
Apply patch hpcmips/26158 (requested by darkstar)
This patch solves install/28656.
 1.45.10.3 21-Jan-2008  yamt sync with head
 1.45.10.2 07-Dec-2007  yamt sync with head
 1.45.10.1 03-Sep-2007  yamt sync with head.
 1.45.2.2 16-Jan-2005  hamajima Apply patch hpcmips/26158 (requested by darkstar)
This patch solves install/28656.
 1.45.2.1 16-Jan-2005  hamajima file vr.c was added on branch kent-audio2 on 2005-01-16 03:21:22 +0000
 1.46.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.48.26.2 18-Feb-2008  mjf Sync with HEAD.
 1.48.26.1 08-Dec-2007  mjf Sync with HEAD.
 1.48.20.1 09-Jan-2008  matt sync with HEAD
 1.48.18.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.48.2.1 03-Dec-2007  ad Sync with HEAD.
 1.49.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.50.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.51.22.2 29-Dec-2010  matt Adapt to the new interrupt framework.
(XXX hpcmips still has calls to _spllower which are not supported.)
 1.51.22.1 05-Feb-2010  matt Change to deal with new method of invoking softints. Remove mips/softintr.c
from config files. Fix SYMTAB_SPACE for WGT62V43
 1.51.20.1 25-Aug-2009  snj Pull up following revision(s) (requested by jun in ticket #918):
sys/arch/hpcmips/vr/vr.c: revision 1.54
Fix #41863, Missing "}".
 1.51.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.51.14.1 25-Aug-2009  snj Pull up following revision(s) (requested by jun in ticket #918):
sys/arch/hpcmips/vr/vr.c: revision 1.54
Fix #41863, Missing "}".
 1.51.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.51.4.4 11-Aug-2010  yamt sync with head.
 1.51.4.3 11-Mar-2010  yamt sync with head
 1.51.4.2 19-Aug-2009  yamt sync with head.
 1.51.4.1 04-May-2009  yamt sync with head.
 1.55.4.3 21-Apr-2011  rmind sync with head
 1.55.4.2 05-Mar-2011  rmind sync with head
 1.55.4.1 30-May-2010  rmind sync with head
 1.55.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.58.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.58.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.64.18.1 18-May-2014  rmind sync with head
 1.64.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.64.4.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4 16-Sep-2001  uch branches: 1.4.4;
ANSIfy, KNF.
 1.3 28-Jan-2000  takemura branches: 1.3.6; 1.3.8;
CPU specific idle hook and VR idle routine.
 1.2 28-Nov-1999  takemura Add definition for VR's special instructions.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.8;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.8.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.6.1 01-Oct-2001  fvdl Catch up with -current.
 1.4.4.2 16-Sep-2001  uch ANSIfy, KNF.
 1.4.4.1 16-Sep-2001  uch file vr.h was added on branch nathanw_sa on 2001-09-16 05:32:22 +0000
 1.9 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.8 04-Jan-2008  ad branches: 1.8.44; 1.8.54;
Need sys/device.h
 1.7 11-Dec-2005  christos branches: 1.7.50; 1.7.56; 1.7.64;
merge ktrace-lwp.
 1.6 15-Jul-2003  lukem branches: 1.6.16;
__KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 11-Feb-2002  takemura branches: 1.3.2; 1.3.8;
Added vr4122ip.
 1.2 11-Feb-2002  takemura Removed vr4102ip_probe to reduce kernel size.
 1.1 11-Feb-2002  takemura Added vr4102ip.
 1.3.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.3.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.3.8.1 11-Feb-2002  jdolecek file vr4102ip.c was added on branch kqueue on 2002-03-16 15:58:00 +0000
 1.3.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.3.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.2.1 11-Feb-2002  nathanw file vr4102ip.c was added on branch nathanw_sa on 2002-02-28 04:10:04 +0000
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.1 21-Jan-2008  yamt sync with head
 1.7.64.1 08-Jan-2008  bouyer Sync with HEAD
 1.7.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.7.50.1 09-Jan-2008  matt sync with HEAD
 1.8.54.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.8.44.1 30-Oct-2012  yamt sync with head
 1.8 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.7 04-Jan-2008  ad branches: 1.7.44; 1.7.54;
Need sys/device.h
 1.6 11-Dec-2005  christos branches: 1.6.50; 1.6.56; 1.6.64;
merge ktrace-lwp.
 1.5 15-Jul-2003  lukem branches: 1.5.16;
__KERNEL_RCSID()
 1.4 02-Oct-2002  thorpej branches: 1.4.6;
Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 11-Feb-2002  takemura branches: 1.2.2; 1.2.8;
Added Vr4122 and Vr4131 support to GENERIC configuration.
 1.1 11-Feb-2002  takemura Added vr4122ip.
 1.2.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.2.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.2.8.1 11-Feb-2002  jdolecek file vr4122ip.c was added on branch kqueue on 2002-03-16 15:58:01 +0000
 1.2.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.2.1 11-Feb-2002  nathanw file vr4122ip.c was added on branch nathanw_sa on 2002-02-28 04:10:05 +0000
 1.4.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.6.1 03-Aug-2004  skrll Sync with HEAD
 1.5.16.1 21-Jan-2008  yamt sync with head
 1.6.64.1 08-Jan-2008  bouyer Sync with HEAD
 1.6.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.6.50.1 09-Jan-2008  matt sync with HEAD
 1.7.54.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7.44.1 30-Oct-2012  yamt sync with head
 1.12 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.11 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.10 25-Jul-2014  dholland branches: 1.10.26; 1.10.28;
Add d_discard to all struct cdevsw instances I could find.

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

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.8 27-Oct-2012  chs branches: 1.8.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.7 06-Jun-2010  dholland branches: 1.7.8; 1.7.18;
Add missing close-parenthesis; reported by Henning Petersen in PR 42526.
(HI CEGGER!)
 1.6 11-Jun-2008  cegger branches: 1.6.16; 1.6.18;
use device_lookup_private to get softc
 1.5 28-Apr-2008  martin branches: 1.5.2; 1.5.4;
Remove clause 3 and 4 from TNF licenses
 1.4 11-Dec-2005  christos branches: 1.4.74; 1.4.76; 1.4.78;
merge ktrace-lwp.
 1.3 29-Dec-2003  igy branches: 1.3.16;
remove unused functions to make compile
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 01-May-2003  igy branches: 1.1.2;
Support for Laser5's L-Card+ Embedded CPU Board
 1.1.2.4 24-Jan-2005  skrll Adapt to branch.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.16.1 21-Jun-2006  yamt sync with head.
 1.4.78.3 11-Aug-2010  yamt sync with head.
 1.4.78.2 04-May-2009  yamt sync with head.
 1.4.78.1 16-May-2008  yamt sync with head.
 1.4.76.2 17-Jun-2008  yamt sync with head.
 1.4.76.1 18-May-2008  yamt sync with head.
 1.4.74.2 29-Jun-2008  mjf Sync with HEAD.
 1.4.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.4.1 18-Jun-2008  simonb Sync with head.
 1.5.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.6.18.1 03-Jul-2010  rmind sync with head
 1.6.16.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.7.18.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7.8.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.8.1 30-Oct-2012  yamt sync with head
 1.8.2.1 18-May-2014  rmind sync with head
 1.9.2.1 10-Aug-2014  tls Rebase.
 1.10.28.1 10-Jun-2019  christos Sync with HEAD
 1.10.26.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 01-May-2003  igy branches: 1.1.104; 1.1.106; 1.1.108;
Support for Laser5's L-Card+ Embedded CPU Board
 1.1.108.1 16-May-2008  yamt sync with head.
 1.1.106.1 18-May-2008  yamt sync with head.
 1.1.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 01-May-2003  igy branches: 1.1.104; 1.1.106; 1.1.108;
Support for Laser5's L-Card+ Embedded CPU Board
 1.1.108.1 16-May-2008  yamt sync with head.
 1.1.106.1 18-May-2008  yamt sync with head.
 1.1.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 06-May-2023  andvar s/regster/register/ in comments and error messages.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 01-May-2003  igy branches: 1.1.104; 1.1.106; 1.1.108;
Support for Laser5's L-Card+ Embedded CPU Board
 1.1.108.1 16-May-2008  yamt sync with head.
 1.1.106.1 18-May-2008  yamt sync with head.
 1.1.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.9 27-Feb-2025  riastradh hpcmips/vr4181giu(4): Fix device_t/softc split straggler.
 1.8 07-Aug-2021  thorpej branches: 1.8.12;
Merge thorpej-cfargs2.
 1.7 24-Apr-2021  thorpej branches: 1.7.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.6 21-Nov-2020  thorpej branches: 1.6.2;
malloc(9) -> kmem(9)
 1.5 10-Nov-2019  chs branches: 1.5.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.4 27-Oct-2012  chs branches: 1.4.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.3 11-Dec-2005  christos branches: 1.3.112; 1.3.122;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 01-May-2003  igy branches: 1.1.2;
Support for Laser5's L-Card+ Embedded CPU Board
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.112.1 30-Oct-2012  yamt sync with head
 1.4.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.6.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.7.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.8.12.1 02-Aug-2025  perseant Sync with HEAD
 1.2 01-May-2003  igy Support for Laser5's L-Card+ Embedded CPU Board
 1.1 09-Feb-2002  sato branches: 1.1.2; 1.1.8;
add vr4181 giu unit register definitions.
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 09-Feb-2002  jdolecek file vr4181giureg.h was added on branch kqueue on 2002-03-16 15:58:01 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 09-Feb-2002  nathanw file vr4181giureg.h was added on branch nathanw_sa on 2002-02-28 04:10:05 +0000
 1.4 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.3 11-Dec-2005  christos branches: 1.3.112; 1.3.122;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 01-May-2003  igy branches: 1.1.2;
Support for Laser5's L-Card+ Embedded CPU Board
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.112.1 30-Oct-2012  yamt sync with head
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 01-May-2003  igy branches: 1.1.104; 1.1.106; 1.1.108;
Support for Laser5's L-Card+ Embedded CPU Board
 1.1.108.1 16-May-2008  yamt sync with head.
 1.1.106.1 18-May-2008  yamt sync with head.
 1.1.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.1 28-Jan-2000  takemura branches: 1.1.6;
CPU specific idle hook and VR idle routine.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 28-Jan-2000  bouyer file vr_asm.h was added on branch thorpej_scsipi on 2000-11-20 20:47:53 +0000
 1.15 18-Feb-2008  tsutsui Remove unnecessary includes.
Many stuff was removed on newlock2 and yamt-idlelwp merges.
 1.14 17-Oct-2007  garbled branches: 1.14.2;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.13 17-May-2007  yamt branches: 1.13.10;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.12 11-May-2007  tsutsui uvm.page_idle_zero now is a bool, not a 32bit value any more.
Pointed out by Matthew Orgass in PR port-hpcmips/36249.
 1.11 09-Feb-2007  ad branches: 1.11.2; 1.11.6; 1.11.8; 1.11.14;
Merge newlock2 to head.
 1.10 24-Mar-2006  tsutsui branches: 1.10.8;
Release sched_lock before enabling interrupts on LOCKDEBUG in vr_idle().
Closes PR port-hpcmips/26427.
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 07-Aug-2003  agc branches: 1.8.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.7 17-Jan-2003  thorpej branches: 1.7.2;
Merge the nathanw_sa branch.
 1.6 20-Aug-2000  thorpej branches: 1.6.2; 1.6.10; 1.6.24;
Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.
 1.5 26-May-2000  thorpej First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

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

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

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

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

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.4 09-May-2000  shin call uvm_pageidlezero() while CPU is idle.
 1.3 11-Apr-2000  nisimura Load delay slot is automagically adjusted at runtime since MIPS II
architecture.
 1.2 28-Mar-2000  nisimura Change 'goto cpu_switch1' to 'goto cpu_switch_queuescan' in vr_idle.S
and make the jump destination global.
 1.1 28-Jan-2000  takemura CPU specific idle hook and VR idle routine.
 1.6.24.1 18-Dec-2002  gmcgarry Remove the scheduler semantics from machine-dependent context switch.
 1.6.10.1 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.6.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.2.1 20-Aug-2000  bouyer file vr_idle.S was added on branch thorpej_scsipi on 2000-11-20 20:47:54 +0000
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.4 27-Feb-2008  yamt sync with head.
 1.8.16.3 03-Sep-2007  yamt sync with head.
 1.8.16.2 26-Feb-2007  yamt sync with head.
 1.8.16.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.9.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.9.8.1 01-Apr-2006  yamt sync with head.
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.10.8.1 30-Jan-2007  ad For now always call sched_unlock_idle/sched_lock_idle. They will be
removed by yamt's cpu_switchto() changes.
 1.11.14.1 22-May-2007  matt Update to HEAD.
 1.11.8.1 11-Jul-2007  mjf Sync with head.
 1.11.6.1 27-May-2007  ad Sync with head.
 1.11.2.2 17-May-2007  yamt sync with head.
 1.11.2.1 19-Apr-2007  ad Compile fixes.
 1.13.10.2 23-Mar-2008  matt sync with HEAD
 1.13.10.1 06-Nov-2007  matt sync with HEAD
 1.14.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.20 13-Jan-2021  skrll Don't advertise AUDIO_PROP_CAPTURE - no capture method is provided

[ 1.0000000] audio0 at vraiu0: missing capture method
 1.19 23-Feb-2020  isaki branches: 1.19.6;
Make start_input/halt_input optional if the driver has no recording,
make start_output/halt_output optional if the driver has no playback.
And remove such never called functions.
 1.18 08-Jun-2019  isaki branches: 1.18.4;
Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.
 1.17 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.16 16-Mar-2019  isaki branches: 1.16.2;
Use C99 style struct initializer to audio_hw_if.
 1.15 27-Oct-2012  chs branches: 1.15.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.14 24-Nov-2011  mrg branches: 1.14.8;
put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.
 1.13 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.12 04-Mar-2007  christos branches: 1.12.78; 1.12.80;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11 11-Dec-2005  christos branches: 1.11.26;
merge ktrace-lwp.
 1.10 15-Jan-2005  kent branches: 1.10.10;
ansify and KNF
 1.9 10-Jan-2005  kent merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

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

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

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

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

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

* all of audio HW drivers follow audio_hw_if and ac97 changes
 1.8 29-Oct-2004  yamt branches: 1.8.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.
 1.7 04-Feb-2004  jmcneill The vraiu(4) hardware doesn't provide any interface for volume control.
Added software volume control functionality in vraiu_volume(), called from
vraiu_start(). Can be changed by the mixerctl 'inputs.dac' -- 0 is muted,
255 is the level that the driver previously outputted (quite loud on the
IBM Workpad Z50), and everything else is a smooth transition between the
two. Thanks to toddpw@ for lending me the hardware to test these changes.
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 03-May-2003  wiz branches: 1.5.2;
DMA, not dma nor Dma.
 1.4 06-Apr-2003  wiz Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.
 1.3 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 23-Mar-2002  hamajima branches: 1.1.2; 1.1.8;
add VR4121 Audio Interface Unit
 1.1.8.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 23-Mar-2002  jdolecek file vraiu.c was added on branch kqueue on 2002-06-23 17:36:56 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 23-Mar-2002  nathanw file vraiu.c was added on branch nathanw_sa on 2002-04-01 07:40:28 +0000
 1.5.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.5.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.2.2 09-Jan-2005  kent audio_hw_if change
* make open() and close() optional
* add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()
 1.8.2.1 03-Jan-2005  kent adopt the filter pipeline framework
 1.10.10.1 03-Sep-2007  yamt sync with head.
 1.11.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.12.80.2 22-Nov-2011  jmcneill get rid of unused 'powerstate' callback in audio_hw_if
 1.12.80.1 20-Nov-2011  jmcneill adapt to audiomp api changes
 1.12.78.2 30-Oct-2012  yamt sync with head
 1.12.78.1 17-Apr-2012  yamt sync with head
 1.14.8.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.15.38.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.15.38.1 10-Jun-2019  christos Sync with HEAD
 1.16.2.3 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.16.2.2 04-May-2019  isaki Remove sc_status flag. Such flag that indicates whether the device
is opened is handled in the upper layer now. And it also fixes that
was not able to call commit_setting() before open() since netbsd-8.
 1.16.2.1 21-Apr-2019  isaki Adapt to audio2.
 1.18.4.1 29-Feb-2020  ad Sync with head.
 1.19.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 23-Mar-2002  hamajima branches: 1.1.2; 1.1.8;
add VR4121 Audio Interface Unit
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 23-Mar-2002  jdolecek file vraiureg.h was added on branch kqueue on 2002-06-23 17:36:56 +0000
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 23-Mar-2002  nathanw file vraiureg.h was added on branch nathanw_sa on 2002-04-01 07:40:29 +0000
 1.19 07-Aug-2023  mrg fix mis-matched function prototype and definitions.

found by GCC 12.
 1.18 06-May-2023  andvar s/regster/register/ in comments and error messages.
 1.17 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.16 24-Apr-2021  thorpej branches: 1.16.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.15 21-Nov-2020  thorpej branches: 1.15.2;
malloc(9) -> kmem(9)
 1.14 10-Nov-2019  chs branches: 1.14.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.13 27-Oct-2012  chs branches: 1.13.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.12 15-Dec-2007  perry branches: 1.12.44; 1.12.54;
__FUNCTION__ -> __func__
 1.11 29-Mar-2006  thorpej branches: 1.11.38; 1.11.48; 1.11.52;
Use device_cfdata().
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.6; 1.10.8; 1.10.10; 1.10.12;
merge ktrace-lwp.
 1.9 25-Oct-2003  mycroft branches: 1.9.16;
Token-pasting nits for GCC 3.
 1.8 23-Oct-2003  he Correct a few more instances where NULL was used in an integral context.
 1.7 26-Sep-2003  simonb Can't use __FUNCTION__ with string concatenation in gcc331.
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 27-Jan-2002  takemura Added vripif.
 1.2 09-May-2001  shin branches: 1.2.2; 1.2.4; 1.2.10;
don't define TAILQ_EMPTY here. TAILQ_EMPTY is defined in <sys/queue.h>.
 1.1 06-May-2001  takemura Vrc4172 GPIO support. This device is currently configured on PenCentra 130.
 1.2.10.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.10.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.10.1 09-May-2001  nathanw file vrc4172gpio.c was added on branch nathanw_sa on 2002-02-28 04:10:05 +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 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.9.16.2 21-Jan-2008  yamt sync with head
 1.9.16.1 21-Jun-2006  yamt sync with head.
 1.10.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.10.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.10.8.1 01-Apr-2006  yamt sync with head.
 1.10.6.1 22-Apr-2006  simonb Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.52.1 02-Jan-2008  bouyer Sync with HEAD
 1.11.48.1 26-Dec-2007  ad Sync with head.
 1.11.38.1 09-Jan-2008  matt sync with HEAD
 1.12.54.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.12.44.1 30-Oct-2012  yamt sync with head
 1.13.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.14.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.15.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.16.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 06-May-2001  takemura branches: 1.2.8;
Vrc4172 GPIO support. This device is currently configured on PenCentra 130.
 1.1 11-Nov-2000  sato branches: 1.1.2; 1.1.4;
- vrc4172 address map definisions.
- vrc4172 gpio/ucy/pcs/pmu/pwm register definitions.
- vrc4172 pwm driver (not yet completely)
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 11-Nov-2000  bouyer file vrc4172gpioreg.h was added on branch thorpej_scsipi on 2000-11-22 16:00:13 +0000
 1.2.8.2 06-May-2001  takemura Vrc4172 GPIO support. This device is currently configured on PenCentra 130.
 1.2.8.1 06-May-2001  takemura file vrc4172gpioreg.h was added on branch nathanw_sa on 2001-05-06 14:25:17 +0000
 1.2 13-Apr-2001  itojun branches: 1.2.8;
$NetBSD$ tag cleanup
 1.1 11-Nov-2000  sato branches: 1.1.2; 1.1.4;
- vrc4172 address map definisions.
- vrc4172 gpio/ucy/pcs/pmu/pwm register definitions.
- vrc4172 pwm driver (not yet completely)
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 11-Nov-2000  bouyer file vrc4172icureg.h was added on branch thorpej_scsipi on 2000-11-22 16:00:13 +0000
 1.2.8.2 13-Apr-2001  itojun $NetBSD$ tag cleanup
 1.2.8.1 13-Apr-2001  itojun file vrc4172icureg.h was added on branch nathanw_sa on 2001-04-13 08:11:45 +0000
 1.20 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.19 24-Apr-2021  thorpej branches: 1.19.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.18 02-Oct-2015  msaitoh branches: 1.18.32;
PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.17 29-Mar-2014  christos branches: 1.17.6;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.16 27-Oct-2012  chs branches: 1.16.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.15 24-Aug-2011  dyoung branches: 1.15.2; 1.15.12;
Add to pci_bus_devorder() an argument that tells the number of slots
available in the devs array. Change the type of the devs array from
char to uint8_t. Treat the return value of pci_bus_devorder() as the
number of slots that it filled.

Don't use the __PCI_BUS_DEVORDER #definition to configure the kernel
but let the linker do it. Make pci_bus_devorder() available on all
architectures by adding a default implementation that will DTRT on
all architectures but hpcmips, the only architecture to #define
__PCI_BUS_DEVORDER. On hpcmips, adapt the implementation to the new
calling convention.

XXX I can compile an hpcmips GENERIC kernel, but I don't have a
XXX hpcmips box to test it on.
 1.14 17-May-2011  dyoung PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name. Correct that.

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

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

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
 1.13 11-Dec-2005  christos branches: 1.13.100; 1.13.106;
merge ktrace-lwp.
 1.12 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.11 27-Dec-2003  shin Add MobilePro 880 (MC/R730A), MC/R730 support for USB/"pci".
Addresses PR/23654.
 1.10 15-Jul-2003  lukem __KERNEL_RCSID()
 1.9 15-Jun-2003  fvdl branches: 1.9.2;
Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
 1.8 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.7 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 16-May-2002  thorpej branches: 1.5.2; 1.5.4; 1.5.6;
* Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses. For busses behind a bridge, it points to
a persistent copy of the bridge's pcitag_t. This can be very useful
for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
uses OFW device nodes to enumerate the bus. When a PCI bus that is
behind a bridge is attached, pci_attach_hook() allocates a new PCI
chipset tag for the new bus and sets it's "curnode" to the OFW node
of the bridge. This is used as a starting point when enumerating
that bus. Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
 1.4 11-May-2002  takemura Enabeled OHCI USB controller on MobilePro 800.
 1.3 03-May-2002  takemura Enable USB support for MC-R700.
 1.2 14-Apr-2002  takemura Added bus probing to avoid bus error.
 1.1 22-Mar-2002  takemura branches: 1.1.2;
Added Vrc4172 USB OHCI for Pencentra 130.
 1.1.2.6 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.4 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 22-Mar-2002  nathanw file vrc4172pci.c was added on branch nathanw_sa on 2002-04-01 07:40:29 +0000
 1.5.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.5.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.6.1 16-May-2002  jdolecek file vrc4172pci.c was added on branch kqueue on 2002-06-23 17:36:56 +0000
 1.5.4.1 12-Mar-2004  jmc Pullup rev 1.11 (requested by shin in ticket #1587)

Add MobilePro 880 (MC/R730A), MC/R730 support for USB/pci.
 1.5.2.2 16-May-2002  thorpej * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses. For busses behind a bridge, it points to
a persistent copy of the bridge's pcitag_t. This can be very useful
for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
uses OFW device nodes to enumerate the bus. When a PCI bus that is
behind a bridge is attached, pci_attach_hook() allocates a new PCI
chipset tag for the new bus and sets it's "curnode" to the OFW node
of the bridge. This is used as a starting point when enumerating
that bus. Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
 1.5.2.1 16-May-2002  thorpej file vrc4172pci.c was added on branch gehenna-devsw on 2002-05-16 01:01:37 +0000
 1.9.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.2 03-Sep-2004  skrll Sync with HEAD
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.100.1 31-May-2011  rmind sync with head
 1.15.12.3 03-Dec-2017  jdolecek update from HEAD
 1.15.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.15.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.15.2.1 30-Oct-2012  yamt sync with head
 1.16.2.1 18-May-2014  rmind sync with head
 1.17.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.18.32.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.19.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 22-Mar-2002  takemura branches: 1.1.2; 1.1.8;
Added Vrc4172 USB OHCI for Pencentra 130.
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 22-Mar-2002  jdolecek file vrc4172pcireg.h was added on branch kqueue on 2002-06-23 17:36:56 +0000
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 22-Mar-2002  nathanw file vrc4172pcireg.h was added on branch nathanw_sa on 2002-04-01 07:40:29 +0000
 1.2 08-Apr-2022  andvar fix various typos, mainly in comments, but also log messages, docs, game text.
 1.1 11-Nov-2000  sato branches: 1.1.2;
- vrc4172 address map definisions.
- vrc4172 gpio/ucy/pcs/pmu/pwm register definitions.
- vrc4172 pwm driver (not yet completely)
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 11-Nov-2000  bouyer file vrc4172pcsreg.h was added on branch thorpej_scsipi on 2000-11-22 16:00:13 +0000
 1.2 13-Apr-2001  itojun branches: 1.2.8;
$NetBSD$ tag cleanup
 1.1 11-Nov-2000  sato branches: 1.1.2; 1.1.4;
- vrc4172 address map definisions.
- vrc4172 gpio/ucy/pcs/pmu/pwm register definitions.
- vrc4172 pwm driver (not yet completely)
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 11-Nov-2000  bouyer file vrc4172pmureg.h was added on branch thorpej_scsipi on 2000-11-22 16:00:13 +0000
 1.2.8.2 13-Apr-2001  itojun $NetBSD$ tag cleanup
 1.2.8.1 13-Apr-2001  itojun file vrc4172pmureg.h was added on branch nathanw_sa on 2001-04-13 08:11:45 +0000
 1.22 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.21 12-Feb-2012  matt branches: 1.21.6;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.20 11-Dec-2005  christos branches: 1.20.112; 1.20.116;
merge ktrace-lwp.
 1.19 27-Dec-2003  shin Add MC/R700A, MC/R730, and MC/R730A vrc4172pwm flags.
Addresses PR/23653.
 1.18 15-Jul-2003  lukem __KERNEL_RCSID()
 1.17 02-Oct-2002  thorpej branches: 1.17.6;
Use CFATTACH_DECL().
 1.16 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.15 27-Jan-2002  takemura branches: 1.15.10;
Added vripif.
 1.14 24-Sep-2001  takemura branches: 1.14.4;
Renamed platid_search() to platid_search_data() and added new platid_search().
Platid_name() was re-implemented using platid_search().
 1.13 16-Sep-2001  uch ANSIfy, KNF.
 1.12 13-Apr-2001  itojun branches: 1.12.2; 1.12.4;
s/$Id$/$NetBSD$/
 1.11 24-Mar-2001  sato add MobilePro770(MC/R520A) parameters.
 1.10 12-Mar-2001  sato * vrc4172pwm_get_light() return the value masked by VRC2_PWM_LCDEN_MASK.
* when resume from suepend, restore saved value instead of always on.
 1.9 06-Mar-2001  sato add sigmarion parameter.
 1.8 27-Feb-2001  sato branches: 1.8.2;
* update copyright year.
* some machines(MC-R700 etc) have pre-vrc4172 asic.
they don's work as vrc4172 specification, so skip some probe sequence.
- add platid related parameter.
- add VRC4172PWM_BROKEN_PROBE code.
* add MC-R700,700A parameters (tested on MC-R700).
* add contrast parameters.(but no one use yet).
* turn some message in probing to VPRINTF().
* enlarge VRC2_PWM_N_BRIGHTNESS.
 1.7 26-Feb-2001  sato DPRINTF/VPRINTF change.
 1.6 16-Feb-2001  sato * vrc4172pwm_light(): workaround when brightness is max.
if light turn off, brightness must be minimum.
* more DPRINTF().
 1.5 15-Feb-2001  sato * add MC/R430/530/530A parameters in vrc4172pwm_platid_param_table.
* fix typo in cf_loc access.
* add some DPRINTF()s.
* fix default value if no params in vrc4172pwm_platid_param_table.
 1.4 29-Dec-2000  sato - use struct platid_date instead of struct vrc4172pwm_platid_param.
- delete struct vrc4172pwm_platid_param.

XXX: vrc4172pwm driver currenty not functional yet.
 1.3 29-Dec-2000  sato * vrc4172pwm driver
- add missing functions
- make compilabe.
 1.2 11-Nov-2000  sato branches: 1.2.2;
update vrc4172 pwm unit codes.(but not yet completly)
 1.1 11-Nov-2000  sato - vrc4172 address map definisions.
- vrc4172 gpio/ucy/pcs/pmu/pwm register definitions.
- vrc4172 pwm driver (not yet completely)
 1.2.2.6 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.5 27-Mar-2001  bouyer Sync with HEAD.
 1.2.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.2.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.2.2.1 11-Nov-2000  bouyer file vrc4172pwm.c was added on branch thorpej_scsipi on 2000-11-22 16:00:14 +0000
 1.8.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.8.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.12.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.12.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.12.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.12.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.14.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.14.4.1 24-Sep-2001  nathanw file vrc4172pwm.c was added on branch nathanw_sa on 2002-02-28 04:10:05 +0000
 1.15.10.1 12-Mar-2004  jmc Pullup rev 1.19 (requested by shin in ticket #1586)

Add MC/R700A, MC/R730, and MC/R730A vrc4172pwm flags.
 1.17.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.6.1 03-Aug-2004  skrll Sync with HEAD
 1.20.116.1 18-Feb-2012  mrg merge to -current.
 1.20.112.2 30-Oct-2012  yamt sync with head
 1.20.112.1 17-Apr-2012  yamt sync with head
 1.21.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4 13-Apr-2001  itojun branches: 1.4.8;
$NetBSD$ tag cleanup
 1.3 13-Apr-2001  itojun s/$Id$/$NetBSD$/
 1.2 29-Dec-2000  sato branches: 1.2.2;
* vrc4172pwm driver
- add missing functions
- make compilabe.
 1.1 11-Nov-2000  sato branches: 1.1.2;
- vrc4172 address map definisions.
- vrc4172 gpio/ucy/pcs/pmu/pwm register definitions.
- vrc4172 pwm driver (not yet completely)
 1.1.2.4 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 11-Nov-2000  bouyer file vrc4172pwmreg.h was added on branch thorpej_scsipi on 2000-11-22 16:00:14 +0000
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.8.2 13-Apr-2001  itojun $NetBSD$ tag cleanup
 1.4.8.1 13-Apr-2001  itojun file vrc4172pwmreg.h was added on branch nathanw_sa on 2001-04-13 08:11:45 +0000
 1.9 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.8 13-Apr-2001  itojun branches: 1.8.8; 1.8.164; 1.8.174;
s/$Id$/$NetBSD$/
 1.7 24-Mar-2001  sato change backlihght parameter value type to int8_t.
 1.6 12-Mar-2001  sato * vrc4172pwm_get_light() return the value masked by VRC2_PWM_LCDEN_MASK.
* when resume from suepend, restore saved value instead of always on.
 1.5 27-Feb-2001  sato branches: 1.5.2;
* update copyright year.
* some machines(MC-R700 etc) have pre-vrc4172 asic.
they don's work as vrc4172 specification, so skip some probe sequence.
- add platid related parameter.
- add VRC4172PWM_BROKEN_PROBE code.
* add MC-R700,700A parameters (tested on MC-R700).
* add contrast parameters.(but no one use yet).
* turn some message in probing to VPRINTF().
* enlarge VRC2_PWM_N_BRIGHTNESS.
 1.4 29-Dec-2000  sato - use struct platid_date instead of struct vrc4172pwm_platid_param.
- delete struct vrc4172pwm_platid_param.

XXX: vrc4172pwm driver currenty not functional yet.
 1.3 29-Dec-2000  sato * vrc4172pwm driver
- add missing functions
- make compilabe.
 1.2 11-Nov-2000  sato branches: 1.2.2;
update vrc4172 pwm unit codes.(but not yet completly)
 1.1 11-Nov-2000  sato - vrc4172 address map definisions.
- vrc4172 gpio/ucy/pcs/pmu/pwm register definitions.
- vrc4172 pwm driver (not yet completely)
 1.2.2.6 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.5 27-Mar-2001  bouyer Sync with HEAD.
 1.2.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.2.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.2.2.1 11-Nov-2000  bouyer file vrc4172pwmvar.h was added on branch thorpej_scsipi on 2000-11-22 16:00:14 +0000
 1.5.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.5.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.8.174.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.8.164.1 30-Oct-2012  yamt sync with head
 1.8.8.2 13-Apr-2001  itojun s/$Id$/$NetBSD$/
 1.8.8.1 13-Apr-2001  itojun file vrc4172pwmvar.h was added on branch nathanw_sa on 2001-04-13 08:09:09 +0000
 1.6 08-Apr-2022  andvar fix various typos, mainly in comments, but also log messages, docs, game text.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 04-Jan-2004  wiz Spell controller with two ls. Inspired by miod@openbsd.
 1.3 13-Apr-2001  itojun branches: 1.3.8; 1.3.24;
$NetBSD$ tag cleanup
 1.2 20-Dec-2000  sato branches: 1.2.2;
fix ICU address typos.
 1.1 11-Nov-2000  sato branches: 1.1.2;
- vrc4172 address map definisions.
- vrc4172 gpio/ucy/pcs/pmu/pwm register definitions.
- vrc4172 pwm driver (not yet completely)
 1.1.2.4 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 11-Nov-2000  bouyer file vrc4172reg.h was added on branch thorpej_scsipi on 2000-11-22 16:00:14 +0000
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.24.1 03-Aug-2004  skrll Sync with HEAD
 1.3.8.2 13-Apr-2001  itojun $NetBSD$ tag cleanup
 1.3.8.1 13-Apr-2001  itojun file vrc4172reg.h was added on branch nathanw_sa on 2001-04-13 08:11:45 +0000
 1.27 21-Jul-2022  andvar fix typos in comments and log messages, mainly s/intrrupt/interrupt/.
 1.26 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.25 24-Apr-2021  thorpej branches: 1.25.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.24 31-Mar-2017  msaitoh branches: 1.24.28;
Remove extra 0x. This bug was added when replacing bitmask_snprintf(9) with
snprintb(3) (in between NetBSD 5 and 6). Old bitmask_snprint(9) didn't add
0x" automatically for hexadecimal value, so old code used it with "0x%s".
 1.23 29-Mar-2014  christos branches: 1.23.6; 1.23.10; 1.23.14;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.22 27-Oct-2012  chs branches: 1.22.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.21 05-Apr-2009  dholland branches: 1.21.12; 1.21.22;
Fix broken build from missing comma. (HI CHRISTOS!!)
 1.20 16-Dec-2008  christos branches: 1.20.2;
replace bitmask_snprintf(9) with snprintb(3)
 1.19 11-Dec-2005  christos branches: 1.19.74; 1.19.78; 1.19.86;
merge ktrace-lwp.
 1.18 26-Aug-2005  drochner s/locdesc_t/int/g
 1.17 30-Jun-2005  drochner branches: 1.17.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.16 07-Jun-2005  he Sprinkle some const around to make these files compile with -Wcast-qual.
 1.15 24-Apr-2004  kleink Update for new pci_devinfo(9) signature.
 1.14 15-Jul-2003  lukem __KERNEL_RCSID()
 1.13 24-Mar-2003  imp branches: 1.13.2;
It appears that we now need locators.h. Other files in this directory
have it, and adding it makes this compile. If this is not the right
way to fix this problem, please let me know the right way...
 1.12 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.11 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.10 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.9 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.8 10-Mar-2002  takemura Attached vrpiu at vrc4173bcu.
 1.7 10-Mar-2002  takemura Attached vrkiu at vrc4173bcu.
 1.6 13-Jan-2002  takemura Fixed vrpciu with config_hook PCI interrupt handling.
 1.5 06-Jan-2002  takemura Set interrupt mask on Vrc4173 ICU.
 1.4 05-Jan-2002  takemura DoCoMo SigmationII support (Experimental)
You must turn on HPCMIPS_L1CACHE_DISABLE option.
 1.3 22-Oct-2001  takemura branches: 1.3.4;
Remove junk line, which I inserted in last commit.
 1.2 21-Oct-2001  takemura - Added auto detection for BCU device no.
- Added clock mask unit register definition.
- Reset child devices and set clock mask.
 1.1 13-Jun-2001  enami branches: 1.1.2; 1.1.4;
Add minimal support for vr4122/vrc4173 pci.
 1.1.4.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.4.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.4.6 03-Jan-2003  thorpej Sync with HEAD.
 1.3.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.3.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.2 11-Jan-2002  nathanw More catchup.
 1.3.4.1 22-Oct-2001  nathanw file vrc4173bcu.c was added on branch nathanw_sa on 2002-01-11 23:38:26 +0000
 1.13.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.13.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.2.1 21-Jun-2006  yamt sync with head.
 1.19.86.2 28-Apr-2009  skrll Sync with HEAD.
 1.19.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.19.78.1 04-May-2009  yamt sync with head.
 1.19.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.20.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.21.22.3 03-Dec-2017  jdolecek update from HEAD
 1.21.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.21.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.21.12.1 30-Oct-2012  yamt sync with head
 1.22.2.1 18-May-2014  rmind sync with head
 1.23.14.1 21-Apr-2017  bouyer Sync with HEAD
 1.23.10.1 26-Apr-2017  pgoyette Sync with HEAD
 1.23.6.1 28-Aug-2017  skrll Sync with HEAD
 1.24.28.7 05-Apr-2021  thorpej Decorate the problematic config_probe() calls (non-boolean return value)
with XXX.
 1.24.28.6 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.24.28.5 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.24.28.4 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.24.28.3 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.24.28.2 20-Mar-2021  thorpej Don't pass the autoconfig print routine as the aux pointer to the
indirect search routine. That argument slot is meant for "attach
args" structures, not function pointers. Besides, no one actually
used it anyway.
 1.24.28.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.25.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 13-Jan-2002  takemura Fixed vrpciu with config_hook PCI interrupt handling.
 1.3 05-Jan-2002  takemura DoCoMo SigmationII support (Experimental)
You must turn on HPCMIPS_L1CACHE_DISABLE option.
 1.2 21-Oct-2001  takemura branches: 1.2.4;
- Added auto detection for BCU device no.
- Added clock mask unit register definition.
- Reset child devices and set clock mask.
 1.1 13-Jun-2001  enami branches: 1.1.2; 1.1.4;
Add minimal support for vr4122/vrc4173 pci.
 1.1.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.2 11-Jan-2002  nathanw More catchup.
 1.2.4.1 21-Oct-2001  nathanw file vrc4173bcuvar.h was added on branch nathanw_sa on 2002-01-11 23:38:26 +0000
 1.2 26-Oct-2001  enami branches: 1.2.2; 1.2.4;
Fix size of iospace; it's not 2 but 4, since two 16bit wide registers at
offset 0 and 2.
 1.1 21-Oct-2001  takemura branches: 1.1.2;
- Added auto detection for BCU device no.
- Added clock mask unit register definition.
- Reset child devices and set clock mask.
 1.1.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.2.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.1 26-Oct-2001  thorpej file vrc4173cmureg.h was added on branch kqueue on 2002-01-10 19:44:13 +0000
 1.2.2.2 26-Oct-2001  enami Fix size of iospace; it's not 2 but 4, since two 16bit wide registers at
offset 0 and 2.
 1.2.2.1 26-Oct-2001  enami file vrc4173cmureg.h was added on branch nathanw_sa on 2001-10-26 04:22:26 +0000
 1.1 13-Jun-2001  enami branches: 1.1.2; 1.1.10;
Add minimal support for vr4122/vrc4173 pci.
 1.1.10.2 13-Jun-2001  enami Add minimal support for vr4122/vrc4173 pci.
 1.1.10.1 13-Jun-2001  enami file vrc4173icureg.h was added on branch nathanw_sa on 2001-06-13 07:32:49 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.5 24-Feb-2025  andvar s/architecure/architecture/ and few other typos in comments.
 1.4 10-Feb-2002  sato branches: 1.4.242;
fix ONLY_4122_4131
 1.3 07-Sep-2001  sato branches: 1.3.4;
add VR4131 releated definisions and change.
 1.2 17-Apr-2001  sato branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8;
fix SINGLE_VRIP_BASE condition.
 1.1 17-Apr-2001  sato - definition for vr cpu identify.
- definition for vr cpu group identify.
 1.2.8.1 01-Oct-2001  fvdl Catch up with -current.
 1.2.6.2 16-Mar-2002  jdolecek Catch up with -current.
 1.2.6.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 17-Apr-2001  bouyer file vrcpudef.h was added on branch thorpej_scsipi on 2001-04-21 17:53:47 +0000
 1.3.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.1 07-Sep-2001  nathanw file vrcpudef.h was added on branch nathanw_sa on 2002-02-28 04:10:05 +0000
 1.4.242.1 02-Aug-2025  perseant Sync with HEAD
 1.8 11-Jun-2015  matt Add struct pmap_limits and pm_{min,max}addr from uvm/pmap/map.h and use it to
store avail_start, avail_end, virtual_start, and virtual_end.
Remove iospace and let emips just bump pmap_limits.virtual_start to get the
VA space it needs.
pmap_segtab.c is almost identical to uvm/pmap/pmap_segtab.c now. It won't
be long until we switch to the uvm/pmap one.
 1.7 27-Oct-2012  chs branches: 1.7.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.6 20-Feb-2011  matt branches: 1.6.4; 1.6.14;
Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
(XXX don't know how to deal with use of spllower in sleep/pause code so
hpcmips kernel will fail to compile).
 1.5 11-Dec-2005  christos branches: 1.5.96; 1.5.100; 1.5.106; 1.5.108;
merge ktrace-lwp.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 02-Oct-2002  thorpej branches: 1.3.6;
Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 11-Feb-2002  takemura branches: 1.1.2; 1.1.8;
Added DMA Address unit and DMA Control unit. (not tested)
 1.1.8.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 11-Feb-2002  jdolecek file vrdcu.c was added on branch kqueue on 2002-03-16 15:58:01 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 11-Feb-2002  nathanw file vrdcu.c was added on branch nathanw_sa on 2002-02-28 04:10:05 +0000
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.5.108.1 05-Mar-2011  bouyer Sync with HEAD
 1.5.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.5.100.1 05-Mar-2011  rmind sync with head
 1.5.96.1 14-Jan-2010  matt more avail_end/avail_start changes
 1.6.14.2 03-Dec-2017  jdolecek update from HEAD
 1.6.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.4.1 30-Oct-2012  yamt sync with head
 1.7.14.1 22-Sep-2015  skrll Sync with HEAD
 1.1 11-Feb-2002  takemura branches: 1.1.2; 1.1.8;
Added DMA Address unit and DMA Control unit. (not tested)
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 11-Feb-2002  jdolecek file vrdcuvar.h was added on branch kqueue on 2002-03-16 15:58:01 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 11-Feb-2002  nathanw file vrdcuvar.h was added on branch nathanw_sa on 2002-02-28 04:10:05 +0000
 1.7 09-Jun-2015  matt #include <sys/cpu.h> and/or <mips/cpuregs.h> + other include fixes
 1.6 27-Oct-2012  chs branches: 1.6.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.5 11-Dec-2005  christos branches: 1.5.112; 1.5.122;
merge ktrace-lwp.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 02-Oct-2002  thorpej branches: 1.3.6;
Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 11-Feb-2002  takemura branches: 1.1.2; 1.1.8;
Added DMA Address unit and DMA Control unit. (not tested)
 1.1.8.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 11-Feb-2002  jdolecek file vrdmaau.c was added on branch kqueue on 2002-03-16 15:58:01 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 11-Feb-2002  nathanw file vrdmaau.c was added on branch nathanw_sa on 2002-02-28 04:10:05 +0000
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.5.122.2 03-Dec-2017  jdolecek update from HEAD
 1.5.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.112.1 30-Oct-2012  yamt sync with head
 1.6.14.1 22-Sep-2015  skrll Sync with HEAD
 1.1 11-Feb-2002  takemura branches: 1.1.2; 1.1.8;
Added DMA Address unit and DMA Control unit. (not tested)
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 11-Feb-2002  jdolecek file vrdmaauvar.h was added on branch kqueue on 2002-03-16 15:58:01 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 11-Feb-2002  nathanw file vrdmaauvar.h was added on branch nathanw_sa on 2002-02-28 04:10:06 +0000
 1.14 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.13 24-Apr-2021  thorpej branches: 1.13.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.12 27-Oct-2012  chs branches: 1.12.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.11 14-Mar-2009  dsl branches: 1.11.12; 1.11.22;
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.10 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.9 04-Mar-2007  christos branches: 1.9.44; 1.9.52; 1.9.58;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.8 12-Nov-2006  plunky branches: 1.8.4;
Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.7 11-Dec-2005  christos branches: 1.7.20; 1.7.22;
merge ktrace-lwp.
 1.6 04-Dec-2003  keihan branches: 1.6.16;
netbsd.org -> NetBSD.org

All "netbsd.org" is now gone from src/sys/arch.
 1.5 23-Oct-2003  he Correct a few more instances where NULL was used in an integral context.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 02-Oct-2002  thorpej branches: 1.3.6;
Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 30-May-2002  greg branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Initial addition of TrackPoint support on the IBM WorkPad z50's DSIU port.
 1.1.8.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 30-May-2002  jdolecek file vrdsiu_mouse.c was added on branch kqueue on 2002-06-23 17:36:56 +0000
 1.1.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 30-May-2002  nathanw file vrdsiu_mouse.c was added on branch nathanw_sa on 2002-06-20 03:38:55 +0000
 1.1.4.2 30-May-2002  tv Pull up revision 1.1 (requested by greg in ticket #77):
Initial addition of TrackPoint support on the IBM WorkPad z50's DSIU port.
 1.1.4.1 30-May-2002  tv file vrdsiu_mouse.c was added on branch netbsd-1-6 on 2002-05-30 18:38:30 +0000
 1.1.2.2 30-May-2002  gehenna Catch up with -current.
 1.1.2.1 30-May-2002  gehenna file vrdsiu_mouse.c was added on branch gehenna-devsw on 2002-05-30 15:33:17 +0000
 1.3.6.4 24-Jan-2005  skrll Adapt to branch.
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.3 03-Sep-2007  yamt sync with head.
 1.6.16.2 30-Dec-2006  yamt sync with head.
 1.6.16.1 21-Jun-2006  yamt sync with head.
 1.7.22.1 10-Dec-2006  yamt sync with head.
 1.7.20.1 18-Nov-2006  ad Sync with head.
 1.8.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.9.58.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.52.1 28-Apr-2009  skrll Sync with HEAD.
 1.9.44.1 04-May-2009  yamt sync with head.
 1.11.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.11.12.1 30-Oct-2012  yamt sync with head
 1.12.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.13.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 30-May-2002  greg branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Initial addition of TrackPoint support on the IBM WorkPad z50's DSIU port.
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 30-May-2002  jdolecek file vrdsiureg.h was added on branch kqueue on 2002-06-23 17:36:56 +0000
 1.1.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 30-May-2002  nathanw file vrdsiureg.h was added on branch nathanw_sa on 2002-06-20 03:38:55 +0000
 1.1.4.2 30-May-2002  tv Pull up revision 1.1 (requested by greg in ticket #77):
Initial addition of TrackPoint support on the IBM WorkPad z50's DSIU port.
 1.1.4.1 30-May-2002  tv file vrdsiureg.h was added on branch netbsd-1-6 on 2002-05-30 18:38:39 +0000
 1.1.2.2 30-May-2002  gehenna Catch up with -current.
 1.1.2.1 30-May-2002  gehenna file vrdsiureg.h was added on branch gehenna-devsw on 2002-05-30 15:33:18 +0000
 1.12 09-Jun-2015  matt #include <sys/cpu.h> and/or <mips/cpuregs.h> + other include fixes
 1.11 27-Oct-2012  chs branches: 1.11.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.10 18-Mar-2009  cegger branches: 1.10.12; 1.10.22;
Ansify function definitions w/o arguments. Generated with sed.
 1.9 11-Dec-2005  christos branches: 1.9.78; 1.9.86; 1.9.92;
merge ktrace-lwp.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 24-Nov-2002  shin branches: 1.7.6;
wipe out all physical memory before hibernate/reset.
otherwise, WinCE will not boot on some machine (ex. IBM z50).
 1.6 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Jan-2002  takemura branches: 1.4.10;
Added vripif.
 1.3 16-Sep-2001  uch branches: 1.3.4;
ANSIfy, KNF.
 1.2 14-Dec-1999  sato branches: 1.2.2; 1.2.8; 1.2.10; 1.2.12;
- initialize vrdsu_softc sc_iot member in vrdsuattach().
 1.1 28-Nov-1999  takemura Add new device vrdsu, with which we can hard reset the VR41xx CPU.
Why don't you try shutdown comand with option '-r ?
 1.2.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.2.12.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.12.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.10.1 01-Oct-2001  fvdl Catch up with -current.
 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 14-Dec-1999  bouyer file vrdsu.c was added on branch thorpej_scsipi on 2000-11-20 20:47:55 +0000
 1.2.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.4.4 11-Dec-2002  thorpej Sync with HEAD.
 1.3.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.3.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.1 16-Sep-2001  nathanw file vrdsu.c was added on branch nathanw_sa on 2002-02-28 04:10:06 +0000
 1.4.10.1 12-Dec-2002  he Pull up revision 1.7 (requested by shin in ticket #1013):
Wipe out all physical memory before hibernate/reset.
Otherwise, WinCE will not boot on some machines (e.g. IBM
z50).
 1.7.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.6.1 03-Aug-2004  skrll Sync with HEAD
 1.9.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.9.78.1 04-May-2009  yamt sync with head.
 1.10.22.2 03-Dec-2017  jdolecek update from HEAD
 1.10.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.10.12.1 30-Oct-2012  yamt sync with head
 1.11.14.1 22-Sep-2015  skrll Sync with HEAD
 1.2 16-Sep-2001  uch branches: 1.2.4;
ANSIfy, KNF.
 1.1 28-Nov-1999  takemura branches: 1.1.2; 1.1.8; 1.1.10; 1.1.12;
Add new device vrdsu, with which we can hard reset the VR41xx CPU.
Why don't you try shutdown comand with option '-r ?
 1.1.12.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.10.1 01-Oct-2001  fvdl Catch up with -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 28-Nov-1999  bouyer file vrdsuvar.h was added on branch thorpej_scsipi on 2000-11-20 20:47:55 +0000
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.4.2 16-Sep-2001  uch ANSIfy, KNF.
 1.2.4.1 16-Sep-2001  uch file vrdsuvar.h was added on branch nathanw_sa on 2001-09-16 05:32:22 +0000
 1.11 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.10 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.9 14-Sep-2009  tsutsui branches: 1.9.12; 1.9.22;
Use device_private(), proper types or variables for device_t and softc.
(not yet split though)

No crash on gxemul emulating hpcmips mobilepro.
 1.8 14-Sep-2009  tsutsui u_intNN_t -> uintNN_t
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 11-Dec-2005  christos branches: 1.6.74; 1.6.76; 1.6.78;
merge ktrace-lwp.
 1.5 20-Sep-2004  drochner another pointless ISACF_IRQ_DEFAULT - that's just
a -1
 1.4 11-Aug-2004  mycroft And the settype pointer.
 1.3 02-Sep-2003  mycroft Don't clear PCIC_INTR_ENABLE here, either -- not appropriate.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 01-May-2003  igy branches: 1.1.2;
Support for Laser5's L-Card+ Embedded CPU Board
 1.1.2.5 24-Sep-2004  skrll Sync with HEAD.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 12-Aug-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.78.2 16-Sep-2009  yamt sync with head
 1.6.78.1 16-May-2008  yamt sync with head.
 1.6.76.1 18-May-2008  yamt sync with head.
 1.6.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.12.1 30-Oct-2012  yamt sync with head
 1.48 06-May-2023  andvar s/regster/register/ in comments and error messages.
 1.47 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.46 22-May-2021  thorpej branches: 1.46.4;
Be explicit about our interface attributes.
 1.45 24-Apr-2021  thorpej branches: 1.45.2; 1.45.4;
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.44 21-Nov-2020  thorpej branches: 1.44.2;
malloc(9) -> kmem(9)
 1.43 10-Nov-2019  chs branches: 1.43.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.42 27-Oct-2012  chs branches: 1.42.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.41 18-Mar-2009  cegger branches: 1.41.12; 1.41.22;
Ansify function definitions w/o arguments. Generated with sed.
 1.40 11-Dec-2005  christos branches: 1.40.78; 1.40.86; 1.40.92;
merge ktrace-lwp.
 1.39 15-Jul-2003  lukem __KERNEL_RCSID()
 1.38 02-Oct-2002  thorpej branches: 1.38.6;
Use CFATTACH_DECL().
 1.37 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.36 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.35 03-May-2002  takemura Fixed debug print.
 1.34 10-Feb-2002  takemura Made vrgiu.c combilable without SINGLE_VRIP_BASE macro.
 1.33 09-Feb-2002  sato access GIUIOSEL_REG and GIUINTEN_REG
only if these registers are not GIU_NO_REG_W.
 1.32 02-Feb-2002  takemura Removed __vrcmu_supply() and __vrgiu_out(), which are need to enable serial
port before auto configuration.

Boot loaders (pbsdboot and hpcboot) are responsible to enable the port because
the kernel can't enable serial port for console any more.
 1.31 29-Jan-2002  uch clean up debug print and configuration.
 1.30 27-Jan-2002  takemura Added vripif.
 1.29 26-Jan-2002  takemura Straightened vripvar.h
 1.28 29-Dec-2001  takemura Added debugging output indicating details of interrupt register setting.
 1.27 16-Dec-2001  takemura BUGFIX: it gets bus error on Vr4122 and Vr4131 attempting to access
pull-up/pull-down registers if you turn on verbose output.
And moved softc structure definition from vrgiuvar.h to vrgiu.c, which was
needless in other parts of kernel.
 1.26 16-Sep-2001  uch branches: 1.26.4;
ANSIfy, KNF.
 1.25 07-Sep-2001  sato VR4131 have same restriction as VR4122.
 1.24 18-May-2001  enami branches: 1.24.2; 1.24.4;
Don't touch GIU{USE,TERM}UPDN_REG_W if ONLY_VR4122 is defined.
XXX ... for now. better way is needed.
 1.23 09-May-2001  shin don't define TAILQ_EMPTY here. TAILQ_EMPTY is defined in <sys/queue.h>.
 1.22 06-May-2001  takemura Vrc4172 GPIO support. This device is currently configured on PenCentra 130.
 1.21 01-May-2001  takemura Fix 'busname' to attach nodes correctly.
 1.20 30-Apr-2001  takemura Machine independent GPIO interface.
 1.19 21-Apr-2001  sato dump io setting: DPRINTF->VPRINTF
 1.18 18-Apr-2001  sato - support VR4122 vrip register map.
- support VR4122 ICU register map.
- support VR4122 intr levels.
XXX: currently if 'options VR4122' is defined,
XXX: cannot specify 'options VR4121','options VR4111', 'options VR4102'.
XXXX: i have not the VR4122 based hardware.. so no check for VR4122.
 1.17 27-Dec-2000  sato branches: 1.17.2;
-rewite codes by using new CONFIG_HOOK_SET and CONFIG_HOOK_EVENT.
 1.16 03-Oct-2000  sato flash led when intrrupt.
 1.15 25-Sep-2000  sato #include <sys/reboot.h> would probably suffice for those.
 1.14 25-Sep-2000  sato - add debug/verbose functions.
 1.13 25-Sep-2000  sato - can compile these files.
#include <sys/boot_flag.h>
 1.12 24-Sep-2000  jdolecek add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
 1.11 20-Jul-2000  deberg don't define TAILQ_FOREACH, it's in sys/queue.h now.
 1.10 03-Apr-2000  sato branches: 1.10.4;
- hpcmips_verbose
- pbsdboot -v option
- WIN I/O setting
- vrisa IRQ GPIO mapping
- memory banks.
 1.9 14-Mar-2000  sato change about debug print.
CVS
 1.8 11-Mar-2000  shin fix typo.
 1.7 10-Mar-2000  sato fix print message when #undef VRGIUDEBUG and change a little.
 1.6 22-Feb-2000  sato delete warning.
 1.5 27-Jan-2000  sato - fix using uninitialized argument of bitdisp64().
 1.4 23-Dec-1999  takemura New button handler and power controller with configurable hooking mechanism.
 1.3 04-Dec-1999  takemura Print input/output/interrupt settings.
 1.2 07-Nov-1999  uch Clear interrupt status before dispatch handler.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.8;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.1.1.4.1 15-Nov-1999  fvdl Sync with -current
 1.1.1.1.2.4 23-Apr-2001  bouyer Sync with HEAD.
 1.1.1.1.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.1.1.1.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.10.4.1 09-May-2001  he Pull up revisions 1.11, 1.23 (via patch, requested by shin):
Remove local queue macro definitions, they're in <sys/queue.h>
now.
 1.17.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.24.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.24.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.24.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.24.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.24.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.24.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.24.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.26.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.26.4.4 20-Jun-2002  nathanw Catch up to -current.
 1.26.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.26.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.26.4.1 16-Sep-2001  nathanw file vrgiu.c was added on branch nathanw_sa on 2002-01-08 00:25:07 +0000
 1.38.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.38.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.38.6.1 03-Aug-2004  skrll Sync with HEAD
 1.40.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.40.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.40.78.1 04-May-2009  yamt sync with head.
 1.41.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.41.12.1 30-Oct-2012  yamt sync with head
 1.42.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.43.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.44.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.45.4.1 31-May-2021  cjep sync with head
 1.45.2.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.46.4.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 09-Feb-2002  sato access GIUIOSEL_REG and GIUINTEN_REG
only if these registers are not GIU_NO_REG_W.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.16; 1.1.1.1.20;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.20.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.1.1.16.1 16-Mar-2002  jdolecek Catch up with -current.
 1.6 02-Feb-2002  takemura Removed __vrcmu_supply() and __vrgiu_out(), which are need to enable serial
port before auto configuration.

Boot loaders (pbsdboot and hpcboot) are responsible to enable the port because
the kernel can't enable serial port for console any more.
 1.5 16-Dec-2001  takemura BUGFIX: it gets bus error on Vr4122 and Vr4131 attempting to access
pull-up/pull-down registers if you turn on verbose output.
And moved softc structure definition from vrgiuvar.h to vrgiu.c, which was
needless in other parts of kernel.
 1.4 16-Sep-2001  uch branches: 1.4.4;
ANSIfy, KNF.
 1.3 30-Apr-2001  takemura branches: 1.3.2; 1.3.4;
Machine independent GPIO interface.
 1.2 23-Dec-1999  takemura branches: 1.2.6;
New button handler and power controller with configurable hooking mechanism.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.4.1 16-Sep-2001  nathanw file vrgiuvar.h was added on branch nathanw_sa on 2002-01-08 00:25:07 +0000
 1.39 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.38 24-Apr-2021  thorpej branches: 1.38.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.37 27-Oct-2012  chs branches: 1.37.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.36 18-Mar-2011  tsutsui branches: 1.36.4; 1.36.14;
Use vaddr_t for pc instead of uint32_t.
 1.35 16-Mar-2011  tsutsui Avoid possible future device_t/softc confusion.
 1.34 18-Mar-2009  cegger branches: 1.34.4; 1.34.6;
Ansify function definitions w/o arguments. Generated with sed.
 1.33 15-Dec-2007  perry branches: 1.33.10; 1.33.18; 1.33.24;
__FUNCTION__ -> __func__
 1.32 11-Dec-2005  christos branches: 1.32.50; 1.32.60; 1.32.64;
merge ktrace-lwp.
 1.31 26-Aug-2005  drochner s/locdesc_t/int/g
 1.30 30-Jun-2005  drochner branches: 1.30.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.29 15-Jul-2003  lukem __KERNEL_RCSID()
 1.28 01-Jan-2003  thorpej branches: 1.28.2;
Use aprint_normal() for cfprint routines.
 1.27 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.26 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.25 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.24 27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.23 22-Mar-2002  takemura Added Vrc4172 USB OHCI for Pencentra 130.
 1.22 10-Mar-2002  takemura Attached vrpiu at vrc4173bcu.
 1.21 10-Mar-2002  takemura Attached vrkiu at vrc4173bcu.
 1.20 11-Feb-2002  takemura Removed vr4102ip_probe to reduce kernel size.
 1.19 11-Feb-2002  takemura Added vr4102ip.
 1.18 11-Feb-2002  takemura Tweaked register access without register offset macro.
 1.17 11-Feb-2002  takemura Added DMA Address unit and DMA Control unit. (not tested)
 1.16 29-Jan-2002  uch clean up debug print and configuration.
 1.15 27-Jan-2002  takemura Added vripif.
 1.14 26-Jan-2002  takemura Straightened vripvar.h
 1.13 02-Jan-2002  uch VR41XX/TX3922 common kernel.
 1.12 16-Sep-2001  uch branches: 1.12.4;
ANSIfy, KNF.
 1.11 11-Jun-2001  enami branches: 1.11.2; 1.11.4;
Cosmetic changes; lineup some struct members.
 1.10 30-Apr-2001  takemura Machine independent GPIO interface.
 1.9 18-Apr-2001  sato - support VR4122 vrip register map.
- support VR4122 ICU register map.
- support VR4122 intr levels.
XXX: currently if 'options VR4122' is defined,
XXX: cannot specify 'options VR4121','options VR4111', 'options VR4102'.
XXXX: i have not the VR4122 based hardware.. so no check for VR4122.
 1.8 18-Apr-2001  sato missing includes in last commit (rev1.6->1.7).
 1.7 18-Apr-2001  sato check platid if 'options VR41XX' and 'options TX39XX' are both defined.
XXX: currently this case is missconfiguration and not compilable.
XXX: because all codes are not supported this case yet.
 1.6 10-Mar-2000  sato branches: 1.6.6;
change about VRIPDEBUG. no action changes.
 1.5 05-Mar-2000  takemura Change bus_addr_t and bus_size_t from u_int32_t to u_long.
Add -Werror option to kernel Makefile.
 1.4 28-Dec-1999  takemura VR41xx's PIU (Touch panel I/F unit) suport.
Currently it emulates relative pointing device like mouse, but it should
behave like an absolute pointing device. It needs more works in wsmouse side.
 1.3 23-Dec-1999  takemura New button handler and power controller with configurable hooking mechanism.
 1.2 04-Dec-1999  takemura You can push power key to reboot when halt in vr_reboot.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.8;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.11.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.11.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.11.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.11.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.4.6 03-Jan-2003  thorpej Sync with HEAD.
 1.12.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.12.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.12.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.12.4.2 11-Jan-2002  nathanw More catchup.
 1.12.4.1 16-Sep-2001  nathanw file vrip.c was added on branch nathanw_sa on 2002-01-11 23:38:26 +0000
 1.28.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.28.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.28.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.28.2.1 03-Aug-2004  skrll Sync with HEAD
 1.30.2.2 21-Jan-2008  yamt sync with head
 1.30.2.1 21-Jun-2006  yamt sync with head.
 1.32.64.1 02-Jan-2008  bouyer Sync with HEAD
 1.32.60.1 26-Dec-2007  ad Sync with head.
 1.32.50.1 09-Jan-2008  matt sync with HEAD
 1.33.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.33.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.33.10.1 04-May-2009  yamt sync with head.
 1.34.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.34.4.1 21-Apr-2011  rmind sync with head
 1.36.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.36.4.1 30-Oct-2012  yamt sync with head
 1.37.52.7 05-Apr-2021  thorpej Decorate the problematic config_probe() calls (non-boolean return value)
with XXX.
 1.37.52.6 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.37.52.5 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.37.52.4 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.37.52.3 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.37.52.2 20-Mar-2021  thorpej Don't pass the autoconfig print routine as the aux pointer to the
indirect search routine. That argument slot is meant for "attach
args" structures, not function pointers. Besides, no one actually
used it anyway.
 1.37.52.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.38.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 16-Mar-2011  tsutsui branches: 1.1.2; 1.1.6;
Blindly prepare an equivalent function with old _spllower(~MIPS_INT_MASK_0)
that disabled all interrupts except PIU. Compile test only.
 1.1.6.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.1 16-Mar-2011  jruoho file vrip_spl.S was added on branch jruoho-x86intr on 2011-06-06 09:05:45 +0000
 1.1.2.2 21-Apr-2011  rmind sync with head
 1.1.2.1 16-Mar-2011  rmind file vrip_spl.S was added on branch rmind-uvmplock on 2011-04-21 01:41:04 +0000
 1.4 01-May-2003  igy Support for Laser5's L-Card+ Embedded CPU Board
 1.3 10-Mar-2002  takemura Attached vrkiu at vrc4173bcu.
 1.2 11-Feb-2002  takemura branches: 1.2.2; 1.2.4;
Added DMA Address unit and DMA Control unit. (not tested)
 1.1 27-Jan-2002  takemura Added vripif.
 1.2.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.1 11-Feb-2002  nathanw file vripif.h was added on branch nathanw_sa on 2002-02-28 04:10:07 +0000
 1.2.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.1 11-Feb-2002  jdolecek file vripif.h was added on branch kqueue on 2002-02-11 20:08:14 +0000
 1.8 01-Apr-2003  igy correcting register definition for VR4181
 1.7 11-Feb-2002  takemura Added Vr4122 and Vr4131 support to GENERIC configuration.
 1.6 30-Sep-2001  sato branches: 1.6.4;
swap value of VR4181_SIU_ADDR and VR4181_SIU1_ADDR.
fix typo.
 1.5 28-Sep-2001  sato VRGROUP_4122 -> VRGROUP_4122_4131
 1.4 04-Aug-2001  sato branches: 1.4.2;
fix VR4122 some unit address.
 1.3 21-Apr-2001  sato branches: 1.3.2;
add VR4181 vrip register maps.
add VR4181 vrip intr levels.
 1.2 18-Apr-2001  sato - support VR4122 vrip register map.
- support VR4122 ICU register map.
- support VR4122 intr levels.
XXX: currently if 'options VR4122' is defined,
XXX: cannot specify 'options VR4121','options VR4111', 'options VR4102'.
XXXX: i have not the VR4122 based hardware.. so no check for VR4122.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.14;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.14.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.1.1.2.2 23-Apr-2001  bouyer Sync with HEAD.
 1.1.1.1.2.1 21-Apr-2001  bouyer Sync with HEAD
 1.3.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.3.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.4.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.6.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.6.4.1 30-Sep-2001  nathanw file vripreg.h was added on branch nathanw_sa on 2002-02-28 04:10:07 +0000
 1.5 01-May-2003  igy Support for Laser5's L-Card+ Embedded CPU Board
 1.4 16-May-2002  wiz Comment out token after #endif.
 1.3 10-Mar-2002  takemura branches: 1.3.4;
Attached vrkiu at vrc4173bcu.
 1.2 11-Feb-2002  takemura branches: 1.2.2; 1.2.4;
Added DMA Address unit and DMA Control unit. (not tested)
 1.1 27-Jan-2002  takemura Added vripif.
 1.2.4.4 20-Jun-2002  nathanw Catch up to -current.
 1.2.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.1 11-Feb-2002  nathanw file vripunit.h was added on branch nathanw_sa on 2002-02-28 04:10:07 +0000
 1.2.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.1 11-Feb-2002  jdolecek file vripunit.h was added on branch kqueue on 2002-02-11 20:08:14 +0000
 1.3.4.1 30-May-2002  gehenna Catch up with -current.
 1.13 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.12 16-Mar-2011  tsutsui branches: 1.12.4; 1.12.14;
Blindly prepare an equivalent function with old _spllower(~MIPS_INT_MASK_0)
that disabled all interrupts except PIU. Compile test only.
 1.11 11-Dec-2005  christos branches: 1.11.100; 1.11.106;
merge ktrace-lwp.
 1.10 07-Jun-2005  he Sprinkle some const around to make these files compile with -Wcast-qual.
 1.9 11-Feb-2002  takemura branches: 1.9.16;
Removed vr4102ip_probe to reduce kernel size.
 1.8 11-Feb-2002  takemura Tweaked register access without register offset macro.
 1.7 27-Jan-2002  takemura Added vripif.
 1.6 26-Jan-2002  takemura Straightened vripvar.h
 1.5 16-Sep-2001  uch branches: 1.5.4;
ANSIfy, KNF.
 1.4 06-May-2001  takemura branches: 1.4.2; 1.4.4;
Vrc4172 GPIO support. This device is currently configured on PenCentra 130.
 1.3 30-Apr-2001  takemura Machine independent GPIO interface.
 1.2 04-Dec-1999  takemura branches: 1.2.6;
You can push power key to reboot when halt in vr_reboot.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.8;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.4.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.4.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.4.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.5.4.1 16-Sep-2001  nathanw file vripvar.h was added on branch nathanw_sa on 2002-02-28 04:10:07 +0000
 1.9.16.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.11.100.1 21-Apr-2011  rmind sync with head
 1.12.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.12.4.1 30-Oct-2012  yamt sync with head
 1.42 03-Feb-2025  andvar fix various typos in comments.
 1.41 07-Aug-2021  thorpej branches: 1.41.12;
Merge thorpej-cfargs2.
 1.40 24-Apr-2021  thorpej branches: 1.40.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.39 27-Oct-2012  chs branches: 1.39.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.38 18-Mar-2009  cegger branches: 1.38.12; 1.38.22;
Ansify function definitions w/o arguments. Generated with sed.
 1.37 11-Dec-2005  christos branches: 1.37.78; 1.37.86; 1.37.92;
merge ktrace-lwp.
 1.36 13-Mar-2004  bjh21 Remove needless includes of <dev/pckbc/wskbdmap_mfii.h>.
 1.35 23-Oct-2003  he Correct a few more instances where NULL was used in an integral context.
 1.34 15-Jul-2003  lukem __KERNEL_RCSID()
 1.33 02-Oct-2002  thorpej branches: 1.33.6;
Use CFATTACH_DECL().
 1.32 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.31 10-Mar-2002  takemura Attached vrkiu at vrc4173bcu.
 1.30 27-Jan-2002  takemura Added vripif.
 1.29 16-Sep-2001  uch branches: 1.29.4;
ANSIfy, KNF.
 1.28 11-Jun-2001  enami branches: 1.28.2; 1.28.4;
make GENERIC compile again.
 1.27 11-Jun-2001  enami Move some struct definition into header file.
 1.26 22-Feb-2001  uch branches: 1.26.2;
hpc common files are moved to dev/hpc.
 1.25 21-Sep-2000  takemura skbd -> hpckbd. hpckbd supports vrkiu as well as m38813c and tc5165.
 1.24 05-Aug-2000  shin detect and eliminate phantom keys.
 1.23 22-Jul-2000  takemura vrkiu_getc() will call over and over. but we want to see 'not implemented'
only once.
 1.22 03-Jun-2000  takemura branches: 1.22.2;
Add platid, VADEM CLIO C-1000 and C1050.
Note: CLIO C-1000 is identical with SHARP Tripad PV6000.
 1.21 04-May-2000  takemura branches: 1.21.2;
Raw keyboard mode support. I'd tested this on MC/R530.
I don't sure if skbd work or not.
 1.20 04-May-2000  shin fix scancode -> keycode mappings:

MC-CS arrow keys
PV-6000 semicolon and apostrophe
 1.19 31-Mar-2000  jun add Mobile Pro 700
 1.18 13-Mar-2000  sato HPC/PsPC keyboard types.
 1.17 11-Mar-2000  shin fix PV-6000/C-1000 keycode mapping.
 1.16 25-Feb-2000  mycroft Fix an obscure bug:
If we enter DDB from the keyboard, kc_scandata[] wasn't updated before the
debugger was entered, and the first call to cngetc() would see the ESC and
stack another DDB entry on top. This was... poor.
 1.15 18-Feb-2000  mycroft Make the z50 tab key work.
 1.14 06-Feb-2000  dbj choose first keymap that matches.
Otherwise, the NEC MobilePro 770 chooses the wrong one.
This is consistent with keymap searching order from before revision 1.12,
although I haven't investigated why choosing the last match instead of the first
causes the MobilePro 770 to lose
 1.13 28-Jan-2000  takemura Delete unused lines.
 1.12 22-Jan-2000  takemura Fix a problem which is reported in PR port-hpcmips/9207.
Vrkiu_cngetc() had returned WSCONS_EVENT_ALL_KEYS_UP if there are no event to
report. Modification keys like shift-key had been canceled by that event.
 1.11 17-Jan-2000  shin move keymap initialization into vrkiu_init().
 1.10 11-Dec-1999  castor Replace unused keys with IGN instead of UNK for NEC MobilePro 750c,
to match usage of other systems.
Also, modify ALT keys to return AltL keysym so debugger key sequence
will work.
 1.9 09-Dec-1999  jun MobilePro750c keyboard mapping table contributed by "Castor Fu" <castor@geocast.com>
 1.8 09-Dec-1999  jun add mobilepro750c_keytrans
 1.7 29-Nov-1999  shin fix Fujitsu INTERTOP CX300 keymap.
 1.6 22-Nov-1999  shin forgot to change 'VRKIU_LAYOUT' to 'PCKBD_LAYOUT'.
 1.5 21-Nov-1999  shin add scan code mapping for

IBM WorkPad z50
NEC MobilePro 770, 800
Sharp Tripad PV6000 / Vadem Clio
NEC MC-CS series
Fujitsu Intertop CX300

change keyboard layout according to model(default).
add options PCKBD_LAYOUT to override default.
 1.4 05-Nov-1999  takemura branches: 1.4.2;
Clear interrupt register before check keys.
 1.3 03-Nov-1999  enami make sure to sync mask bit and array index.
 1.2 24-Oct-1999  takemura Wsdisplay and wskbd are supported as a console device.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.6;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.1.1.4.1 15-Nov-1999  fvdl Sync with -current
 1.1.1.1.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.2.2 05-Nov-1999  takemura Clear interrupt register before check keys.
 1.4.2.1 05-Nov-1999  takemura file vrkiu.c was added on branch comdex-fall-1999 on 1999-11-05 04:28:15 +0000
 1.21.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.22.2.2 10-Aug-2000  shin pull up revision 1.24 (Approved by releng-1-5):

detect and eliminate phantom keys.
 1.22.2.1 06-Aug-2000  takemura Pull up revision 1.23 (requested by takemura)

vrkiu_getc() will call over and over. but we want to see 'not implemented'
only once.
 1.26.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.28.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.28.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.28.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.28.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.28.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.29.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.29.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.29.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.29.4.1 16-Sep-2001  nathanw file vrkiu.c was added on branch nathanw_sa on 2002-02-28 04:10:07 +0000
 1.33.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.33.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.33.6.1 03-Aug-2004  skrll Sync with HEAD
 1.37.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.37.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.37.78.1 04-May-2009  yamt sync with head.
 1.38.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.38.12.1 30-Oct-2012  yamt sync with head
 1.39.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.40.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.41.12.1 02-Aug-2025  perseant Sync with HEAD
 1.2 21-Sep-2000  takemura skbd -> hpckbd. hpckbd supports vrkiu as well as m38813c and tc5165.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.4 16-Sep-2001  uch branches: 1.4.4; 1.4.160; 1.4.170;
ANSIfy, KNF.
 1.3 11-Jun-2001  enami branches: 1.3.2; 1.3.4;
Move some struct definition into header file.
 1.2 24-Oct-1999  takemura branches: 1.2.8;
Wsdisplay and wskbd are supported as a console device.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.6;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.1.1.4.1 15-Nov-1999  fvdl Sync with -current
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.8.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.170.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.160.1 30-Oct-2012  yamt sync with head
 1.4.4.2 16-Sep-2001  uch ANSIfy, KNF.
 1.4.4.1 16-Sep-2001  uch file vrkiuvar.h was added on branch nathanw_sa on 2001-09-16 05:32:22 +0000
 1.9 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.8 11-Dec-2005  christos branches: 1.8.112; 1.8.122;
merge ktrace-lwp.
 1.7 15-Jul-2003  lukem __KERNEL_RCSID()
 1.6 02-Oct-2002  thorpej branches: 1.6.6;
Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Jan-2002  takemura Added vripif.
 1.3 16-Sep-2001  uch branches: 1.3.4;
ANSIfy, KNF.
 1.2 27-Dec-2000  sato branches: 1.2.2; 1.2.4;
- rewite codes by using new CONFIG_HOOK_SET and CONFIG_HOOK_EVENT.
 1.1 03-Oct-2000  sato branches: 1.1.2;
vr41xx LED unit driver.
 1.1.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.1.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.2.1 03-Oct-2000  bouyer file vrled.c was added on branch thorpej_scsipi on 2000-11-20 20:48:03 +0000
 1.2.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.3.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.1 16-Sep-2001  nathanw file vrled.c was added on branch nathanw_sa on 2002-02-28 04:10:07 +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.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.8.112.1 30-Oct-2012  yamt sync with head
 1.4 07-Jan-2025  andvar Fix typos in the word 'Control' in comments.
 1.3 11-Jun-2001  enami branches: 1.3.8; 1.3.250;
Comment about start address of LED unit in vr4122.
 1.2 03-Oct-2000  sato branches: 1.2.2; 1.2.4;
vr41xx LED unit driver.
 1.1 08-Dec-1999  sato branches: 1.1.2;
Vr41xx LED control register definitions.
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 03-Oct-2000  bouyer file vrledreg.h was added on branch thorpej_scsipi on 2000-11-20 20:48:04 +0000
 1.3.250.1 02-Aug-2025  perseant Sync with HEAD
 1.3.8.2 11-Jun-2001  enami Comment about start address of LED unit in vr4122.
 1.3.8.1 11-Jun-2001  enami file vrledreg.h was added on branch nathanw_sa on 2001-06-11 10:04:28 +0000
 1.3 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.2 16-Sep-2001  uch branches: 1.2.4; 1.2.160; 1.2.170;
ANSIfy, KNF.
 1.1 03-Oct-2000  sato branches: 1.1.2; 1.1.4; 1.1.6;
vr41xx LED unit driver.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.2.1 03-Oct-2000  bouyer file vrledvar.h was added on branch thorpej_scsipi on 2000-11-20 20:48:05 +0000
 1.2.170.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.160.1 30-Oct-2012  yamt sync with head
 1.2.4.2 16-Sep-2001  uch ANSIfy, KNF.
 1.2.4.1 16-Sep-2001  uch file vrledvar.h was added on branch nathanw_sa on 2001-09-16 05:32:22 +0000
 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 02-Oct-2015  msaitoh branches: 1.22.32;
PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.21 31-Mar-2014  christos branches: 1.21.6;
adjust to new pci_intr_string signature
 1.20 27-Oct-2012  chs branches: 1.20.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.19 24-Aug-2011  dyoung branches: 1.19.2; 1.19.12;
Add to pci_bus_devorder() an argument that tells the number of slots
available in the devs array. Change the type of the devs array from
char to uint8_t. Treat the return value of pci_bus_devorder() as the
number of slots that it filled.

Don't use the __PCI_BUS_DEVORDER #definition to configure the kernel
but let the linker do it. Make pci_bus_devorder() available on all
architectures by adding a default implementation that will DTRT on
all architectures but hpcmips, the only architecture to #define
__PCI_BUS_DEVORDER. On hpcmips, adapt the implementation to the new
calling convention.

XXX I can compile an hpcmips GENERIC kernel, but I don't have a
XXX hpcmips box to test it on.
 1.18 17-May-2011  dyoung PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name. Correct that.

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

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

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
 1.17 11-Dec-2005  christos branches: 1.17.100; 1.17.106;
merge ktrace-lwp.
 1.16 12-Dec-2004  abs Fix comments regarding configration bounaries
 1.15 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.14 15-Jul-2003  lukem __KERNEL_RCSID()
 1.13 15-Jun-2003  fvdl branches: 1.13.2;
Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
 1.12 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.11 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.10 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.9 16-May-2002  thorpej branches: 1.9.2;
* Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses. For busses behind a bridge, it points to
a persistent copy of the bridge's pcitag_t. This can be very useful
for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
uses OFW device nodes to enumerate the bus. When a PCI bus that is
behind a bridge is attached, pci_attach_hook() allocates a new PCI
chipset tag for the new bus and sets it's "curnode" to the OFW node
of the bridge. This is used as a starting point when enumerating
that bus. Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
 1.8 14-Apr-2002  takemura Print bad address in interrupt handler.
 1.7 24-Feb-2002  takemura Make it compilable even if PCI wasn't configured.
 1.6 27-Jan-2002  takemura Added vripif.
 1.5 18-Jan-2002  shin add support for LASER5 L-Router.
 1.4 13-Jan-2002  takemura Fixed vrpciu with config_hook PCI interrupt handling.
 1.3 05-Jan-2002  takemura DoCoMo SigmationII support (Experimental)
You must turn on HPCMIPS_L1CACHE_DISABLE option.
 1.2 22-Nov-2001  takemura Fixed bus stuff to compile vrpciu.c (VR4131 CPU).
 1.1 13-Jun-2001  enami branches: 1.1.2; 1.1.4; 1.1.10;
Add minimal support for vr4122/vrc4173 pci.
 1.1.10.8 03-Jan-2003  thorpej Sync with HEAD.
 1.1.10.7 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.6 20-Jun-2002  nathanw Catch up to -current.
 1.1.10.5 17-Apr-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 13-Jun-2001  nathanw file vrpciu.c was added on branch nathanw_sa on 2002-01-08 00:25:07 +0000
 1.1.4.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.4.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.4.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.2.2 16-May-2002  thorpej * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses. For busses behind a bridge, it points to
a persistent copy of the bridge's pcitag_t. This can be very useful
for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
uses OFW device nodes to enumerate the bus. When a PCI bus that is
behind a bridge is attached, pci_attach_hook() allocates a new PCI
chipset tag for the new bus and sets it's "curnode" to the OFW node
of the bridge. This is used as a starting point when enumerating
that bus. Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
 1.9.2.1 16-May-2002  thorpej file vrpciu.c was added on branch gehenna-devsw on 2002-05-16 01:01:37 +0000
 1.13.2.5 18-Dec-2004  skrll Sync with HEAD.
 1.13.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.13.2.2 03-Sep-2004  skrll Sync with HEAD
 1.13.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.17.100.1 31-May-2011  rmind sync with head
 1.19.12.3 03-Dec-2017  jdolecek update from HEAD
 1.19.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.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.19.2.1 30-Oct-2012  yamt sync with head
 1.20.2.1 18-May-2014  rmind sync with head
 1.21.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.22.32.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.23.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 13-Jun-2001  enami branches: 1.1.2; 1.1.10;
Add minimal support for vr4122/vrc4173 pci.
 1.1.10.2 13-Jun-2001  enami Add minimal support for vr4122/vrc4173 pci.
 1.1.10.1 13-Jun-2001  enami file vrpciureg.h was added on branch nathanw_sa on 2001-06-13 07:32:49 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.46 28-Jun-2025  andvar s/contant/constant/ in comment.
 1.45 05-Jul-2024  andvar fix various typos in comments and log messages, mainly s/hight/high/
s/hight/height/ and removing double m in time(ing).
 1.44 07-Aug-2021  thorpej branches: 1.44.12;
Merge thorpej-cfargs2.
 1.43 24-Apr-2021  thorpej branches: 1.43.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.42 27-Oct-2012  chs branches: 1.42.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.41 17-Oct-2007  garbled branches: 1.41.54; 1.41.64;
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.40 09-Jul-2007  ad branches: 1.40.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.39 04-Mar-2007  christos branches: 1.39.2; 1.39.4; 1.39.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.38 12-Nov-2006  plunky branches: 1.38.4;
Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.37 24-Sep-2006  jmcneill Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
 1.36 26-May-2006  blymn branches: 1.36.6; 1.36.8;
Clean up bogus whitespace
 1.35 11-Dec-2005  christos branches: 1.35.4; 1.35.6; 1.35.8; 1.35.14;
merge ktrace-lwp.
 1.34 07-Jun-2005  he branches: 1.34.2;
Add use of __UNCONST() to an invocation of tpcalib_ioctl(), as that
function may both read and write it's argument. Here it is only
reading from the data argument under WSMOUSEIO_SCALIBCOORDS, so it
is actually fine, but type protection can't express this.
 1.33 28-May-2004  tsarna Refactor tpcalib and hpc* ports to make tpcalib MI, as discussed on tech-kern.
 1.32 27-Dec-2003  shin Add MobilePro 880 (MC/R730A) to stylus calibration table.
Addresses PR/23652.
 1.31 26-Dec-2003  shin suppress false alarm from gcc -Wuninitialized.
 1.30 23-Oct-2003  he Correct a few more instances where NULL was used in an integral context.
 1.29 15-Jul-2003  lukem __KERNEL_RCSID()
 1.28 05-Jan-2003  takemura branches: 1.28.2;
Fixed threshold value for Vrc4173 PIU.
 1.27 03-Jan-2003  takemura Added new ioctl command, WSMOUSEIO_GETID to tell touch panel identifier
for tpctl(8).
 1.26 15-Dec-2002  takemura Added Vrc4173PIU. (touch panel interface unit on Vrc4173)
 1.25 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.24 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.23 17-Mar-2002  atatat branches: 1.23.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.22 10-Mar-2002  takemura Attached vrpiu at vrc4173bcu.
 1.21 10-Mar-2002  takemura Attached vrkiu at vrc4173bcu.
 1.20 02-Feb-2002  takemura Removed __vrcmu_supply() and __vrgiu_out(), which are need to enable serial
port before auto configuration.

Boot loaders (pbsdboot and hpcboot) are responsible to enable the port because
the kernel can't enable serial port for console any more.
 1.19 31-Jan-2002  uch clean up header file.
 1.18 27-Jan-2002  takemura Added vripif.
 1.17 28-Sep-2001  sato branches: 1.17.4;
add VR4181 clock control.
 1.16 24-Sep-2001  takemura Renamed platid_search() to platid_search_data() and added new platid_search().
Platid_name() was re-implemented using platid_search().
 1.15 16-Sep-2001  uch ANSIfy, KNF.
 1.14 19-Jul-2001  sato branches: 1.14.2;
adhoc battery event creation for some vr machines.
XXX: temporary
 1.13 14-Jun-2001  sato branches: 1.13.2;
fix 'mask clock to PIU'
 1.12 10-Jun-2001  sato add MC-R700, 730 touch panel parameter
 1.11 22-Feb-2001  uch branches: 1.11.2;
hpc common files are moved to dev/hpc.
 1.10 21-Jan-2001  takemura Fix bugs of VR touch panel driver,
- status stay in touching while pen don't realy touch.
- cursor often jumps to center of screen.
But it seems that 'stay in touching' still occurs at rare intervals.
 1.9 20-Jan-2001  takemura Fix indent, which were too deep.
 1.8 08-Jan-2001  takemura Implement WSMOUSEIO_SRES to control A/D port scan interval.
 1.7 27-Dec-2000  sato - rewrite codes using new CONFIG_HOOK_SET.
 1.6 02-Dec-2000  sato - polling battery voltage value from A/D port.
currently polling only.
if verbose mode, kernel print A/D raw value every polling.
 1.5 13-Jun-2000  matt branches: 1.5.4;
Add a table of calibrations. The MCR_500 one (640x240) makes the MCR_700A
(800x600) almost unusable. Now the 700A has it's own.
 1.4 04-May-2000  takemura branches: 1.4.2;
Mouse move event should be made before mouse bown event. Without that,
you may got a mouse down event in strange plase.
 1.3 10-Jan-2000  takemura WSMOUSE_SCALIBCOORDS/WSMOUSE_GCALIBCOORDS support.
 1.2 08-Jan-2000  takemura Absolute pointing device support.
- Wsmouse_input() get new argument 'flag', which indicates whether x/y/z are
relative or absolute.
- Wsmouse get new io controls, WSMOUSEIO_SCALIBCOORDS and
WSMOUSEIO_GCALIBCOORDS.
 1.1 28-Dec-1999  takemura VR41xx's PIU (Touch panel I/F unit) suport.
Currently it emulates relative pointing device like mouse, but it should
behave like an absolute pointing device. It needs more works in wsmouse side.
 1.4.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.5.4.7 12-Mar-2001  bouyer Sync with HEAD.
 1.5.4.6 11-Feb-2001  bouyer Sync with HEAD.
 1.5.4.5 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.5.4.4 05-Jan-2001  bouyer Sync with HEAD
 1.5.4.3 08-Dec-2000  bouyer Sync with HEAD.
 1.5.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.5.4.1 13-Jun-2000  bouyer file vrpiu.c was added on branch thorpej_scsipi on 2000-11-20 20:48:05 +0000
 1.11.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.13.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.13.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.13.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.13.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.13.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.13.2.1 03-Aug-2001  lukem update to -current
 1.14.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.17.4.6 07-Jan-2003  thorpej Sync with HEAD.
 1.17.4.5 19-Dec-2002  thorpej Sync with HEAD.
 1.17.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.17.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.17.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.17.4.1 28-Sep-2001  nathanw file vrpiu.c was added on branch nathanw_sa on 2002-02-28 04:10:07 +0000
 1.23.6.1 12-Mar-2004  jmc Pullup rev 1.32 (requested by shin in ticket #1585)

Add MobilePro 880 (MC/R730A) to stylus calibration table.
 1.28.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.28.2.4 24-Jan-2005  skrll Adapt to branch.
 1.28.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.28.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.28.2.1 03-Aug-2004  skrll Sync with HEAD
 1.34.2.3 03-Sep-2007  yamt sync with head.
 1.34.2.2 30-Dec-2006  yamt sync with head.
 1.34.2.1 21-Jun-2006  yamt sync with head.
 1.35.14.1 19-Jun-2006  chap Sync with head.
 1.35.8.1 26-Jun-2006  yamt sync with head.
 1.35.6.1 01-Jun-2006  kardel Sync with head.
 1.35.4.1 09-Sep-2006  rpaulo sync with head
 1.36.8.2 10-Dec-2006  yamt sync with head.
 1.36.8.1 22-Oct-2006  yamt sync with head
 1.36.6.1 18-Nov-2006  ad Sync with head.
 1.38.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.39.10.1 03-Oct-2007  garbled Sync with HEAD
 1.39.4.1 11-Jul-2007  mjf Sync with head.
 1.39.2.1 15-Jul-2007  ad Sync with head.
 1.40.10.1 06-Nov-2007  matt sync with HEAD
 1.41.64.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.41.54.1 30-Oct-2012  yamt sync with head
 1.42.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.43.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.44.12.1 02-Aug-2025  perseant Sync with HEAD
 1.4 15-Dec-2002  takemura Added Vrc4173PIU. (touch panel interface unit on Vrc4173)
 1.3 10-Mar-2002  takemura Attached vrpiu at vrc4173bcu.
 1.2 27-Oct-2000  sato branches: 1.2.2; 1.2.6; 1.2.10;
- A/D converter port macro: PIUAB(n)
 1.1 28-Dec-1999  takemura VR41xx's PIU (Touch panel I/F unit) suport.
Currently it emulates relative pointing device like mouse, but it should
behave like an absolute pointing device. It needs more works in wsmouse side.
 1.2.10.2 19-Dec-2002  thorpej Sync with HEAD.
 1.2.10.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.3 22-Nov-2000  bouyer Sync with HEAD.
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 27-Oct-2000  bouyer file vrpiureg.h was added on branch thorpej_scsipi on 2000-11-20 20:48:06 +0000
 1.12 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.11 15-Dec-2002  takemura branches: 1.11.146; 1.11.156;
Added Vrc4173PIU. (touch panel interface unit on Vrc4173)
 1.10 10-Mar-2002  takemura Attached vrpiu at vrc4173bcu.
 1.9 02-Feb-2002  takemura Removed __vrcmu_supply() and __vrgiu_out(), which are need to enable serial
port before auto configuration.

Boot loaders (pbsdboot and hpcboot) are responsible to enable the port because
the kernel can't enable serial port for console any more.
 1.8 27-Jan-2002  takemura Added vripif.
 1.7 22-Jul-2001  sato branches: 1.7.6;
adhoc battery event creation for some vr machines.
XXX: temporary
this file is needed with vrpiu.c rev1.14
 1.6 21-Jan-2001  takemura branches: 1.6.4;
Fix bugs of VR touch panel driver,
- status stay in touching while pen don't realy touch.
- cursor often jumps to center of screen.
But it seems that 'stay in touching' still occurs at rare intervals.
 1.5 08-Jan-2001  takemura Implement WSMOUSEIO_SRES to control A/D port scan interval.
 1.4 02-Dec-2000  sato - polling battery voltage value from A/D port.
currently polling only.
if verbose mode, kernel print A/D raw value every polling.
 1.3 10-Jan-2000  takemura branches: 1.3.6;
WSMOUSE_SCALIBCOORDS/WSMOUSE_GCALIBCOORDS support.
 1.2 08-Jan-2000  takemura Absolute pointing device support.
- Wsmouse_input() get new argument 'flag', which indicates whether x/y/z are
relative or absolute.
- Wsmouse get new io controls, WSMOUSEIO_SCALIBCOORDS and
WSMOUSEIO_GCALIBCOORDS.
 1.1 28-Dec-1999  takemura VR41xx's PIU (Touch panel I/F unit) suport.
Currently it emulates relative pointing device like mouse, but it should
behave like an absolute pointing device. It needs more works in wsmouse side.
 1.3.6.5 11-Feb-2001  bouyer Sync with HEAD.
 1.3.6.4 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.3.6.3 08-Dec-2000  bouyer Sync with HEAD.
 1.3.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.3.6.1 10-Jan-2000  bouyer file vrpiuvar.h was added on branch thorpej_scsipi on 2000-11-20 20:48:06 +0000
 1.6.4.3 16-Mar-2002  jdolecek Catch up with -current.
 1.6.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.4.1 03-Aug-2001  lukem update to -current
 1.7.6.4 19-Dec-2002  thorpej Sync with HEAD.
 1.7.6.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.7.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.7.6.1 22-Jul-2001  nathanw file vrpiuvar.h was added on branch nathanw_sa on 2002-02-28 04:10:08 +0000
 1.11.156.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.11.146.1 30-Oct-2012  yamt sync with head
 1.21 21-Jul-2022  andvar fix typos in comments and log messages, mainly s/intrrupt/interrupt/.
 1.20 26-Mar-2014  christos - kill sprintf
- fix unused
 1.19 27-Oct-2012  chs branches: 1.19.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.18 11-Dec-2005  christos branches: 1.18.112; 1.18.122;
merge ktrace-lwp.
 1.17 15-Jul-2003  lukem __KERNEL_RCSID()
 1.16 02-Oct-2002  thorpej branches: 1.16.6;
Use CFATTACH_DECL().
 1.15 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.14 29-Jan-2002  uch clean up debug print and configuration.
 1.13 27-Jan-2002  takemura Added vripif.
 1.12 26-Jan-2002  takemura Straightened vripvar.h
 1.11 16-Sep-2001  uch branches: 1.11.4;
ANSIfy, KNF.
 1.10 13-Jun-2001  sato branches: 1.10.2; 1.10.4;
register VRIP_INTR_BAT handler to vrip_intr_establish().
 1.9 25-Sep-2000  sato branches: 1.9.2;
- when PMUINT_BATT or PMUINT_BATTINTR interrupts occured,
send CONFIG_HOOK_PMEVENT_SUSPENDREQ event.
 1.8 02-Jul-2000  takemura Experimental APM compatible power management.
 1.7 03-Apr-2000  sato branches: 1.7.4;
push power button, send POWERCONTROL_LCD event.
 1.6 14-Mar-2000  sato - toggle CONFIG_HOOK_BUTTONEVENT_POWER event.
- change about debug print.
 1.5 27-Jan-2000  sato - modify debug stuff.
default all disable.
 1.4 23-Dec-1999  takemura New button handler and power controller with configurable hooking mechanism.
 1.3 16-Dec-1999  sato - dump some pmu registers at attach.
 1.2 08-Dec-1999  sato - clear all intr status and show old status when attached.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.8;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.4.1 06-Aug-2000  takemura Pull up revision 1.8 (requested by takemura)

New power management function.
 1.9.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.10.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.10.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.10.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.10.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.11.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.11.4.1 16-Sep-2001  nathanw file vrpmu.c was added on branch nathanw_sa on 2002-02-28 04:10:08 +0000
 1.16.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.6.1 03-Aug-2004  skrll Sync with HEAD
 1.18.122.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.112.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.18.112.1 30-Oct-2012  yamt sync with head
 1.19.2.1 18-May-2014  rmind sync with head
 1.4 11-Jun-2001  enami branches: 1.4.8;
- add comment about start address of PMU in vr4122.
- wrap long line.
- add regsiter offset found in PMU of vr4122.
 1.3 13-Dec-1999  sato branches: 1.3.6;
- Vr4102 does not have PMUWAIT_REG_W register, so comment it.
- Vr4121 only have PMUDIV_REG_W register, so comment it.
 1.2 08-Dec-1999  sato - PMUINT_ALL, PMUINT2_ALL.
- some registers.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.2; 1.1.1.1.8;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.1.1.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.8.2 11-Jun-2001  enami - add comment about start address of PMU in vr4122.
- wrap long line.
- add regsiter offset found in PMU of vr4122.
 1.4.8.1 11-Jun-2001  enami file vrpmureg.h was added on branch nathanw_sa on 2001-06-11 06:02:22 +0000
 1.2 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.1 16-Sep-1999  takemura branches: 1.1.1;
Initial revision
 1.1.1.1 16-Sep-1999  takemura branches: 1.1.1.1.176; 1.1.1.1.186;
Import NetBSD/hpcmips source files from hpcmips repository.
file list:
sys/arch/hpcmips/
distrib/hpcmips/
etc/etc.hpcmips/
lib/libc/arch/mips/fplib/
lib/libc/arch/mips/fplib/Makefile.inc
lib/libc/arch/mips/fplib/environment.h
lib/libc/arch/mips/fplib/fplib_glue.c
lib/libc/arch/mips/fplib/fplib_libc.c
lib/libc/arch/mips/fplib/hpcmips-gcc.h
lib/libc/arch/mips/fplib/softfloat-macros.h
lib/libc/arch/mips/fplib/softfloat-specialize.h
lib/libc/arch/mips/fplib/softfloat.c
lib/libc/arch/mips/fplib/softfloat.h
lib/libc/arch/mips/gen/ieee.h
lib/libc/arch/mips/gen/sf_fabs.c
lib/libc/arch/mips/gen/sf_flt_rounds.c
lib/libc/arch/mips/gen/sf_fpgetmask.c
lib/libc/arch/mips/gen/sf_fpgetround.c
lib/libc/arch/mips/gen/sf_fpgetsticky.c
lib/libc/arch/mips/gen/sf_fpsetmask.c
lib/libc/arch/mips/gen/sf_fpsetround.c
lib/libc/arch/mips/gen/sf_fpsetsticky.c
lib/libc/arch/mips/gen/sf_isinf.c
lib/libc/arch/mips/gen/sf_ldexp.c
lib/libc/arch/mips/gen/sf_modf.c
 1.1.1.1.186.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.1.1.176.1 30-Oct-2012  yamt sync with head

RSS XML Feed