Home | History | Annotate | only in /src/sys/arch/sgimips/dev
History log of /src/sys/arch/sgimips/dev
RevisionDateAuthorComments
 1.1 25-Nov-2008  he branches: 1.1.4; 1.1.6; 1.1.8; 1.1.12; 1.1.14;
Don't be lazy and let one directory's Makefile install an include
file from another directory, as that only causes problems with
mtree later on when encountering the /.. path component. Instead,
descend into dev/ and use the Makefile there to install dev/crmfbreg.h
in the appropriate directory.
 1.1.14.2 04-May-2009  yamt sync with head.
 1.1.14.1 25-Nov-2008  yamt file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:11:49 +0000
 1.1.12.2 26-Feb-2009  snj Pull up following revision(s) (requested by macallan in ticket #523):
sys/arch/sgimips/Makefile: revision 1.7
sys/arch/sgimips/dev/Makefile: revision 1.1
sys/arch/sgimips/include/Makefile: revision 1.19
Don't be lazy and let one directory's Makefile install an include
file from another directory, as that only causes problems with
mtree later on when encountering the /.. path component. Instead,
descend into dev/ and use the Makefile there to install dev/crmfbreg.h
in the appropriate directory.
 1.1.12.1 25-Nov-2008  snj file Makefile was added on branch netbsd-5 on 2009-02-26 07:31:58 +0000
 1.1.8.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.8.1 25-Nov-2008  skrll file Makefile was added on branch nick-hppapmap on 2009-01-19 13:16:42 +0000
 1.1.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.6.1 25-Nov-2008  mjf file Makefile was added on branch mjf-devfs2 on 2009-01-17 13:28:28 +0000
 1.1.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.1.4.1 25-Nov-2008  haad file Makefile was added on branch haad-dm on 2008-12-13 01:13:25 +0000
 1.12 18-Jan-2004  sekiya Following the example of the hpc/, gio/, and ioc/ directories, move the
mace devices to their own mace/ directory. Alter conf/files.sgimips to
reflect this change in a sane manner (i.e., pull in dev/files.dev and
mace/files.mace when appropriate).

At the same time, allow crime_intr_establish() to fall through to
mace_intr_establish(). mace devices now call cpu_intr_establish().
 1.11 17-Nov-2003  keihan www.netbsd.org -> www.NetBSD.org
 1.10 05-Oct-2003  tsutsui Apply a bunch of patches written by Christopher SEKIYA
(with several cosmetic changes by me) which fixes O2 (IP32) support.

Now my R5000 O2 works fine in multiuser with on-board AIC7880 SCSIs
and several PCI network cards (but only on serial console yet).
L2 cache on R5000/Rm5200 is still disabled for now, but it will be
fixed later, hopefully.

See recent discussion on port-sgimips for details.
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 06-Jan-2003  rafal branches: 1.8.2;
Improve the interrupt code somewhat by having callers of xxx_intr_establish
pass in an interrupt handle (which is currently to the CRIME interrupt the
device is attached to) so the interrupt handlers know which device was the
one looking for attention.

While here, fix up PCI interrupt routing for both the on-board devices and
the PCI slots -- even though there is only one PCI slot in the chasis, the
hardware can accomodate up to three and provides an interrupt mapping for
all the PCI interrupt pins for both the internal SCSI & PCI slot and the
two "extra" slots.
 1.7 03-Jan-2003  rafal Checkpoint of O2 work by Chris Sekiya and myself. This is the sgimips bit;
still needs some arch/mips support code before it will fully work.
 1.6 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.5 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 13-Mar-2002  simonb Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.2 08-Oct-2001  pooka branches: 1.2.4;
read dbaud from ARCS and use that for com rate, not hardcoded 38400
 1.1 14-Jun-2000  soren branches: 1.1.4; 1.1.6; 1.1.8; 1.1.10;
A start at O2 support..
 1.1.10.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.10.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.10.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.8.1 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 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 14-Jun-2000  bouyer file com_mace.c was added on branch thorpej_scsipi on 2000-11-20 20:23:41 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 14-Jun-2000  minoura file com_mace.c was added on branch minoura-xpg4dl on 2000-06-22 17:02:57 +0000
 1.2.4.4 07-Jan-2003  thorpej Sync with HEAD.
 1.2.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.1 08-Oct-2001  nathanw file com_mace.c was added on branch nathanw_sa on 2002-04-01 07:42:17 +0000
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.39 26-Apr-2021  mrg if ddb is enabled set cpu_reset_address to crime_reboot.
'mach reset' works from ddb now.
 1.38 18-Feb-2015  macallan branches: 1.38.34;
switch sgimips to common bus_dma and bus_space in arch/mips/
Tested on O2 and Indy.
Things that are compile-tested only for lack of hardware:
- GIO ethernet cards with PCI bridges
- IP2x hardware not found on Indy
- IP1x
 1.37 17-May-2014  mrg branches: 1.37.4;
split crime_bus_reset() into crime_{cpu,mem}_reset() and only reset
the cpu or the memory upon either error, not both.

seems to make my O2 slightly less likely to hang, and matches what
the linux crime driver does.
 1.36 18-Aug-2011  macallan branches: 1.36.12; 1.36.16; 1.36.26;
device_t-ify
 1.35 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.34 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
Deal with arcbios calls being O32 and kernels being N32/N64.
Need to save/restore T8 across arcbios calls.
 1.33 08-Aug-2008  tsutsui branches: 1.33.12; 1.33.16; 1.33.22; 1.33.24;
Misc cosmetics:
- some KNF and ANSIfy
- use uintNN_t types
- remove a redundant declaration
- use __func__ to print a function name
- use PRIu64 to print uint64_t
- wrap long lines
 1.32 07-Aug-2008  tsutsui In crime_attach(), call crime_watchdog_disable() rather than
writing zero to the CRIME registers implicitly.
 1.31 07-Aug-2008  tsutsui Fix a typo so that the crimedog is actually shut up.
 1.30 03-Aug-2008  tsutsui - replace some mysterious magic numbers in CPU clock measurement code
with some more meaningful expressions
- compare counter values in 100ms rather than 2ms
- check CPU_MIPS_DOUBLE_COUNT in mips_cpu_flags explicitly
 1.29 26-May-2008  tsutsui branches: 1.29.4;
Remove all initialization of obsolete ci_divisor_recip in
mips struct cpu_info and related macroes.
The member was prepared for a hack in MD microtime(9) implementation
but it has been superseded by MI timecounter(9).
 1.28 09-Jan-2008  wiz branches: 1.28.6; 1.28.8; 1.28.10; 1.28.12;
Fix typo in macro name and comments.
 1.27 17-Oct-2007  garbled branches: 1.27.2; 1.27.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.26 26-Sep-2007  macallan add crime_reboot()
 1.25 17-May-2007  yamt branches: 1.25.8; 1.25.10; 1.25.12;
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.24 16-Apr-2007  jmcneill branches: 1.24.2;
Fix crime_intr so intr handlers registers w/ crime_intr_establish actually
get called. "seems more right to me" mrg@
 1.23 15-Apr-2007  jmcneill Disable the CRIME watchdog for now; looks like we can't keep up with it
under load. With this patch, my O2 is finally running stable.
 1.22 10-Dec-2005  tsutsui branches: 1.22.26; 1.22.30; 1.22.32;
Reset and disable watchdog explicitly in crime_attach().
 1.21 18-Oct-2005  tsutsui TAB/space cleanup.
 1.20 03-Jun-2005  martin branches: 1.20.2;
Avoid shadow warnings
 1.19 06-Sep-2004  sekiya Use the mace interrupt handler for PCI interrupts.

From KIYOHARA Takashi
 1.18 18-Jan-2004  sekiya Following the example of the hpc/, gio/, and ioc/ directories, move the
mace devices to their own mace/ directory. Alter conf/files.sgimips to
reflect this change in a sane manner (i.e., pull in dev/files.dev and
mace/files.mace when appropriate).

At the same time, allow crime_intr_establish() to fall through to
mace_intr_establish(). mace devices now call cpu_intr_establish().
 1.17 18-Jan-2004  sekiya Finish moving code between ip2x.c and ip3x.c to imc.c and crime.c.
 1.16 13-Jan-2004  sekiya Assign memory controller-dependent watchdog reset functions to
platform.watchdog_reset.
 1.15 12-Jan-2004  sekiya CRIME revision 1.1 has a bug that affects PIO operations to/from the MACE.
The recommended workaround is a 5-10ms delay before and after accesses.
Therefore, move the affected bus_space_* operations from bus.h to bus.c
and special-case MACE accesses.

CRIME accesses are not affected, so introduce SGIMIPS_BUS_SPACE_CRIME and
use it as the CRIME tag.

My ip32 seems a little bit happier with this change, and my ip22 didn't
notice the change.
 1.14 17-Nov-2003  keihan www.netbsd.org -> www.NetBSD.org
 1.13 05-Oct-2003  tsutsui Apply a bunch of patches written by Christopher SEKIYA
(with several cosmetic changes by me) which fixes O2 (IP32) support.

Now my R5000 O2 works fine in multiuser with on-board AIC7880 SCSIs
and several PCI network cards (but only on serial console yet).
L2 cache on R5000/Rm5200 is still disabled for now, but it will be
fixed later, hopefully.

See recent discussion on port-sgimips for details.
 1.12 15-Jul-2003  lukem __KERNEL_RCSID()
 1.11 10-Jan-2003  rafal branches: 1.11.2;
Simplify CRIME rev. calculation (we don't appear to need the low nibble).
 1.10 06-Jan-2003  rafal Improve the interrupt code somewhat by having callers of xxx_intr_establish
pass in an interrupt handle (which is currently to the CRIME interrupt the
device is attached to) so the interrupt handlers know which device was the
one looking for attention.

While here, fix up PCI interrupt routing for both the on-board devices and
the PCI slots -- even though there is only one PCI slot in the chasis, the
hardware can accomodate up to three and provides an interrupt mapping for
all the PCI interrupt pins for both the internal SCSI & PCI slot and the
two "extra" slots.
 1.9 03-Jan-2003  rafal Checkpoint of O2 work by Chris Sekiya and myself. This is the sgimips bit;
still needs some arch/mips support code before it will fully work.
 1.8 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.7 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 13-Mar-2002  simonb Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.4 08-Jul-2001  thorpej branches: 1.4.2; 1.4.8;
- Use the identifier strings that are fetched by the MI ARC BIOS
code.
- Garbage-collect some non-useful stuff from the mainbus_attach_args.
 1.3 11-May-2001  thorpej Get the major number of the CRIME properly.

From Rafal K. Boni.
 1.2 29-Jun-2000  soren branches: 1.2.2; 1.2.4;
Move a few things from ip32.c.
 1.1 14-Jun-2000  soren branches: 1.1.4;
A start at O2 support..
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 14-Jun-2000  minoura file crime.c was added on branch minoura-xpg4dl on 2000-06-22 17:02:58 +0000
 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 29-Jun-2000  bouyer file crime.c was added on branch thorpej_scsipi on 2000-11-20 20:23:41 +0000
 1.4.8.5 15-Jan-2003  thorpej Sync with HEAD.
 1.4.8.4 07-Jan-2003  thorpej Sync with HEAD.
 1.4.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.8.1 08-Jul-2001  nathanw file crime.c was added on branch nathanw_sa on 2002-04-01 07:42:17 +0000
 1.4.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.11.2.5 11-Dec-2005  christos Sync with head.
 1.11.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.20.2.4 21-Jan-2008  yamt sync with head
 1.20.2.3 27-Oct-2007  yamt sync with head.
 1.20.2.2 03-Sep-2007  yamt sync with head.
 1.20.2.1 21-Jun-2006  yamt sync with head.
 1.22.32.1 11-Jul-2007  mjf Sync with head.
 1.22.30.2 09-Oct-2007  ad Sync with head.
 1.22.30.1 27-May-2007  ad Sync with head.
 1.22.26.3 07-May-2007  yamt sync with head.
 1.22.26.2 19-Apr-2007  ad Compile fixes.
 1.22.26.1 15-Apr-2007  yamt sync with head.
 1.24.2.2 03-Oct-2007  garbled Sync with HEAD
 1.24.2.1 22-May-2007  matt Update to HEAD.
 1.25.12.1 06-Oct-2007  yamt sync with head.
 1.25.10.2 23-Mar-2008  matt sync with HEAD
 1.25.10.1 06-Nov-2007  matt sync with HEAD
 1.25.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.27.8.1 10-Jan-2008  bouyer Sync with HEAD
 1.27.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.28.12.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.28.12.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.28.10.1 04-May-2009  yamt sync with head.
 1.28.8.1 04-Jun-2008  yamt sync with head
 1.28.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.28.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.29.4.1 19-Oct-2008  haad Sync with HEAD.
 1.33.24.1 05-Mar-2011  bouyer Sync with HEAD
 1.33.22.1 06-Jun-2011  jruoho Sync with HEAD.
 1.33.16.1 05-Mar-2011  rmind sync with head
 1.33.12.2 29-Dec-2010  matt Adapt sgimips to the interrupt framework.
 1.33.12.1 20-Jan-2010  matt Adjust things to the new world order.
 1.36.26.1 10-Aug-2014  tls Rebase.
 1.36.16.1 18-May-2014  rmind sync with head
 1.36.12.2 03-Dec-2017  jdolecek update from HEAD
 1.36.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.37.4.1 06-Apr-2015  skrll Sync with HEAD
 1.38.34.1 13-May-2021  thorpej Sync with HEAD.
 1.11 10-Nov-2021  msaitoh s/endianess/endianness/
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 17-Nov-2003  keihan www.netbsd.org -> www.NetBSD.org
 1.8 05-Oct-2003  tsutsui Apply a bunch of patches written by Christopher SEKIYA
(with several cosmetic changes by me) which fixes O2 (IP32) support.

Now my R5000 O2 works fine in multiuser with on-board AIC7880 SCSIs
and several PCI network cards (but only on serial console yet).
L2 cache on R5000/Rm5200 is still disabled for now, but it will be
fixed later, hopefully.

See recent discussion on port-sgimips for details.
 1.7 04-Oct-2003  tsutsui TAB/space cleanup.
 1.6 10-Jan-2003  rafal branches: 1.6.2;
Simplify CRIME rev. calculation (we don't appear to need the low nibble).
 1.5 28-Dec-2002  pooka add timer calibration

from Chris Sekiya
 1.4 23-Dec-2002  pooka CRIME register definitions

from Chris Sekiya
 1.3 13-Mar-2002  simonb Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.2 18-Nov-2000  soren branches: 1.2.2; 1.2.6; 1.2.10;
Some CRIME definitions.
 1.1 14-Jun-2000  soren branches: 1.1.4;
A start at O2 support..
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 14-Jun-2000  minoura file crimereg.h was added on branch minoura-xpg4dl on 2000-06-22 17:02:58 +0000
 1.2.10.3 15-Jan-2003  thorpej Sync with HEAD.
 1.2.10.2 29-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 18-Nov-2000  bouyer file crimereg.h was added on branch thorpej_scsipi on 2000-11-20 20:23:41 +0000
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9 18-Aug-2011  macallan device_t-ify
 1.8 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.7 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.6 26-Sep-2007  macallan add crime_reboot()
 1.5 11-Dec-2005  christos branches: 1.5.30; 1.5.38; 1.5.48; 1.5.50; 1.5.52;
merge ktrace-lwp.
 1.4 06-Sep-2004  sekiya branches: 1.4.12;
Use the mace interrupt handler for PCI interrupts.

From KIYOHARA Takashi
 1.3 18-Jan-2004  sekiya branches: 1.3.4;
Finish moving code between ip2x.c and ip3x.c to imc.c and crime.c.
 1.2 17-Nov-2003  keihan www.netbsd.org -> www.NetBSD.org
 1.1 05-Oct-2003  tsutsui Apply a bunch of patches written by Christopher SEKIYA
(with several cosmetic changes by me) which fixes O2 (IP32) support.

Now my R5000 O2 works fine in multiuser with on-board AIC7880 SCSIs
and several PCI network cards (but only on serial console yet).
L2 cache on R5000/Rm5200 is still disabled for now, but it will be
fixed later, hopefully.

See recent discussion on port-sgimips for details.
 1.3.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.3.4.2 03-Aug-2004  skrll Sync with HEAD
 1.3.4.1 18-Jan-2004  skrll file crimevar.h was added on branch ktrace-lwp on 2004-08-03 10:40:00 +0000
 1.4.12.1 27-Oct-2007  yamt sync with head.
 1.5.52.1 06-Oct-2007  yamt sync with head.
 1.5.50.1 06-Nov-2007  matt sync with HEAD
 1.5.48.1 02-Oct-2007  joerg Sync with HEAD.
 1.5.38.1 03-Oct-2007  garbled Sync with HEAD
 1.5.30.1 09-Oct-2007  ad Sync with head.
 1.50 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.49 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.48 24-Apr-2021  thorpej branches: 1.48.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.47 27-Dec-2019  msaitoh branches: 1.47.10;
s/suport/support/
 1.46 22-Dec-2019  thorpej Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.45 17-Mar-2018  jmcneill branches: 1.45.2;
Add support for overriding the video mode by setting an ARCS environment
variable.

If the "crmfb_mode" environment variable is set, treat it as a mode
string in the form WIDTHxHEIGHT[@REFRESH] and generate monitor timings
using the VESA GTF formula. If set, this overrides the EDID preferred
mode.
 1.44 19-May-2017  macallan branches: 1.44.2; 1.44.8;
enable font loading / screen resizing
 1.43 14-Feb-2016  dholland Remove extra stray break missed by Christos when committing PR 50783.
 1.42 08-Feb-2016  christos PR/50783: David Binderman: Indent switch properly, add missing break.
 1.41 23-Sep-2015  macallan no need to set RI_CLEAR - we do our own clearing and rasops assumes a linear
framebuffer anyway. Now we can get away with leaving ri_bits at NULL where it
belongs on this hardware.
 1.40 18-Feb-2015  macallan switch sgimips to common bus_dma and bus_space in arch/mips/
Tested on O2 and Indy.
Things that are compile-tested only for lack of hardware:
- GIO ethernet cards with PCI bridges
- IP2x hardware not found on Indy
- IP1x
 1.39 20-Jan-2015  macallan - remove scratch area, it's been unused since we're drawing characters by
hardware
- don't sync the rendering engine unless we have to, watch FIFO levels
instead
- support anti-aliased fonts and let the drawing engine do all the work
 1.38 02-Sep-2014  macallan branches: 1.38.2;
support ioctl() WSDISPLAYIO_SVIDEO, _GVIDEO and _GET_EDID
now xf86-video-crime can actually turn the monitor off
 1.37 16-Dec-2013  mrg - remove unused variables
- use (void) when we don't care about the return value
 1.36 11-Jan-2012  macallan branches: 1.36.6; 1.36.10;
use rasops_init(0,0)
 1.35 01-Jul-2011  dyoung branches: 1.35.2; 1.35.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.34 17-May-2011  macallan add support for running the console in more than 8 bit
Now modes like 1680x1050 work. The hardware requires a stride of a multiple
of 32 bytes, with 1680 this requires 16bit colour.
 1.33 13-Apr-2011  plunky use PRIx64 for printing 64-bit values
 1.32 07-Apr-2011  macallan add mode setting support
If we find a monitor via DDC we switch to its preferred mode if it reports one,
otherwise stick with whatever the firmware set up.
 1.31 04-Apr-2011  macallan remove some old debug code
 1.30 31-Mar-2011  macallan add DDC2 support. Not too useful yet.
 1.29 30-Mar-2011  macallan device_t-ify, use aprint_*_dev() where appropriate
 1.28 01-Mar-2011  macallan use hardware to draw characters, while there use vcons_replay_msgbuf()
 1.27 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
Deal with arcbios calls being O32 and kernels being N32/N64.
Need to save/restore T8 across arcbios calls.
 1.26 30-Jul-2008  tsutsui branches: 1.26.16; 1.26.22; 1.26.24;
Add a BUS_DMASYNC_PREWRITE call against tile's DMA address descriptors.
Fixes mangled screen on recent kernels.
Tested on my R5K IP32 and on R10K IP32 by Jorge Acereda Macia on port-sgimips.
 1.25 08-May-2008  jmcneill branches: 1.25.2; 1.25.4;
Use 2-clause license.
 1.24 18-Mar-2008  jmcneill branches: 1.24.2; 1.24.4; 1.24.6;
Remove debug printf: ``so we need 10 x 8 tiles -> 00500000''
 1.23 15-Mar-2008  jmcneill Swap red and blue for 8bpp paletted mode.
 1.22 02-Mar-2008  macallan allow userland to map all video memory, not just the visible part
 1.21 01-Mar-2008  macallan allocate a linear buffer, don't smoke crack when setting up the engine's TLBs
 1.20 18-Feb-2008  macallan branches: 1.20.2; 1.20.6;
correct accidentially committed garbage (what the hell... )
 1.19 18-Feb-2008  macallan correct typo
 1.18 18-Feb-2008  macallan avoid unnecessary writes to the MTE's direction registers
 1.17 17-Feb-2008  macallan use MTE for rectangle filling as well
TODO: figure out why the MTE freaks out when used for character drawing
 1.16 17-Feb-2008  macallan adjust some register names, also use MTE for scrolling down
 1.15 17-Feb-2008  macallan use the memory transfer engine for scrolling when possible
currently that's only for scrolling upwards but the speedup should be very
noticeable
TODO: use MTE for erase rasops, figure out how to control the MTEs direction
 1.14 10-Feb-2008  macallan bunch of minor fixes:
- use default colour when clearing the screen on attach
- sprinkle some break; so we no longer panic in 32bit colour
- allow userland to mmap() engine registers but not TLBs
- get rid of a delay() in crmfb_wait_idle()
- use aprint_*()
 1.13 06-Feb-2008  macallan get rid of some leftover debugging cruft
 1.12 05-Feb-2008  macallan update (c) sections
 1.11 05-Feb-2008  macallan add hardware acceleration for scrolling and clearing.
The framebuffer is now run in tiled mode so we can use the rendering engine
which means X is broken for now.
This needs more testing.
 1.10 02-Feb-2008  sekiya Allow sync-on-green to be controlled by ARCS environment variable "SyncOnGreen".

Set to anything starting with the letter 'n' to disable sync-on-green, set to
anything else or leave undefined to keep default behavior.
 1.9 02-Dec-2007  jmcneill CRMFB_VT_VCMAP and CRMFB_VT_HCMAP register definitions were transposed.
From jsing@openbsd in private mail.
 1.8 17-Oct-2007  garbled branches: 1.8.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.7 26-Jul-2007  macallan branches: 1.7.4; 1.7.6; 1.7.8;
- move register definitions to crmfbreg.h
- identify as WSDISPLAY_TYPE_CRIME
- always claim we're 32bit
- switch to 32bit colour in WSDISPLAYIO_MODE_MAPPED, switch back to 8bit
in WSDISPLAYIO_MODE_EMUL
- restore palette, turn off the cursor when switching back to console mode
- add a few delay()s, hopefully that will deal with occasional messed up
video timings *fingers crossed*
 1.6 15-Jul-2007  macallan branches: 1.6.2; 1.6.4;
add hardware cursor support
 1.5 15-Apr-2007  jmcneill branches: 1.5.2; 1.5.4; 1.5.6;
We don't support WSDISPLAYIO_[SG]VIDEO, so don't try to hide it.
 1.4 14-Apr-2007  martin branches: 1.4.2;
Avoid crashing if booting via serial console
 1.3 13-Apr-2007  jmcneill Add shadow framebuffer support; scrolling the screen still isn't great,
but it's noticeably better now than it was before.
 1.2 12-Apr-2007  jmcneill Don't claim to be the console if we're supposed to be using a serial
console. While we're here, save a few MB of RAM by properly calculating
the framebuffer size based on the selected video mode.
 1.1 12-Apr-2007  jmcneill Add crmfb, a framebuffer console driver for the onboard O2 video (SGI-CRM)
 1.4.2.3 07-May-2007  yamt sync with head.
 1.4.2.2 15-Apr-2007  yamt sync with head.
 1.4.2.1 14-Apr-2007  yamt file crmfb.c was added on branch yamt-idlelwp on 2007-04-15 16:02:54 +0000
 1.5.6.2 11-Jul-2007  mjf Sync with head.
 1.5.6.1 15-Apr-2007  mjf file crmfb.c was added on branch mjf-ufs-trans on 2007-07-11 20:01:40 +0000
 1.5.4.4 03-Dec-2007  ad Sync with HEAD.
 1.5.4.3 20-Aug-2007  ad Sync with HEAD.
 1.5.4.2 09-Jun-2007  ad Sync with head.
 1.5.4.1 15-Apr-2007  ad file crmfb.c was added on branch vmlocking on 2007-06-09 21:37:00 +0000
 1.5.2.1 03-Oct-2007  garbled Sync with HEAD
 1.6.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.6.2.1 07-Aug-2007  matt Sync with HEAD.
 1.7.8.8 24-Mar-2008  yamt sync with head.
 1.7.8.7 17-Mar-2008  yamt sync with head.
 1.7.8.6 27-Feb-2008  yamt sync with head.
 1.7.8.5 11-Feb-2008  yamt sync with head.
 1.7.8.4 04-Feb-2008  yamt sync with head.
 1.7.8.3 07-Dec-2007  yamt sync with head
 1.7.8.2 03-Sep-2007  yamt sync with head.
 1.7.8.1 26-Jul-2007  yamt file crmfb.c was added on branch yamt-lazymbuf on 2007-09-03 14:29:14 +0000
 1.7.6.3 23-Mar-2008  matt sync with HEAD
 1.7.6.2 09-Jan-2008  matt sync with HEAD
 1.7.6.1 06-Nov-2007  matt sync with HEAD
 1.7.4.1 03-Dec-2007  joerg Sync with HEAD.
 1.8.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.8.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.20.6.3 28-Sep-2008  mjf Sync with HEAD.
 1.20.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.20.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.20.2.1 24-Mar-2008  keiichi sync with head.
 1.24.6.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.24.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.24.4.2 04-May-2009  yamt sync with head.
 1.24.4.1 16-May-2008  yamt sync with head.
 1.24.2.1 18-May-2008  yamt sync with head.
 1.25.4.1 19-Oct-2008  haad Sync with HEAD.
 1.25.2.1 31-Jul-2008  simonb Sync with head.
 1.26.24.1 05-Mar-2011  bouyer Sync with HEAD
 1.26.22.1 06-Jun-2011  jruoho Sync with HEAD.
 1.26.16.3 31-May-2011  rmind sync with head
 1.26.16.2 21-Apr-2011  rmind sync with head
 1.26.16.1 05-Mar-2011  rmind sync with head
 1.35.6.1 18-Feb-2012  mrg merge to -current.
 1.35.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.35.2.1 17-Apr-2012  yamt sync with head
 1.36.10.1 18-May-2014  rmind sync with head
 1.36.6.2 03-Dec-2017  jdolecek update from HEAD
 1.36.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.38.2.4 28-Aug-2017  skrll Sync with HEAD
 1.38.2.3 19-Mar-2016  skrll Sync with HEAD
 1.38.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.38.2.1 06-Apr-2015  skrll Sync with HEAD
 1.44.8.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.44.2.1 18-Mar-2018  martin Pull up following revision(s) (requested by jmcneill in ticket #642):
sys/arch/sgimips/dev/crmfb.c: revision 1.45
Add support for overriding the video mode by setting an ARCS environment
variable.
If the "crmfb_mode" environment variable is set, treat it as a mode
string in the form WIDTHxHEIGHT[@REFRESH] and generate monitor timings
using the VESA GTF formula. If set, this overrides the EDID preferred
mode.
 1.45.2.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.47.10.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.48.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.16 20-Jan-2015  macallan - remove scratch area, it's been unused since we're drawing characters by
hardware
- don't sync the rendering engine unless we have to, watch FIFO levels
instead
- support anti-aliased fonts and let the drawing engine do all the work
 1.15 17-May-2011  macallan branches: 1.15.14; 1.15.32;
add some constants, clarify some hw limitations
 1.14 07-Apr-2011  macallan add mode setting support
If we find a monitor via DDC we switch to its preferred mode if it reports one,
otherwise stick with whatever the firmware set up.
 1.13 31-Mar-2011  macallan add DDC2 support. Not too useful yet.
 1.12 30-Mar-2011  macallan add a bunch of GBE registers, no functional change (yet)
 1.11 01-Mar-2011  macallan use hardware to draw characters, while there use vcons_replay_msgbuf()
 1.10 26-Mar-2009  macallan branches: 1.10.4; 1.10.6; 1.10.8;
add a few more register definitions, needed by the latest crime_drv.
 1.9 06-Nov-2008  macallan branches: 1.9.4;
add a couple more registers
 1.8 08-May-2008  jmcneill branches: 1.8.4; 1.8.6; 1.8.8;
Use 2-clause license.
 1.7 17-Feb-2008  macallan branches: 1.7.6; 1.7.8; 1.7.10; 1.7.12;
adjust some register names, also use MTE for scrolling down
 1.6 17-Feb-2008  macallan use the memory transfer engine for scrolling when possible
currently that's only for scrolling upwards but the speedup should be very
noticeable
TODO: use MTE for erase rasops, figure out how to control the MTEs direction
 1.5 05-Feb-2008  macallan update (c) sections
 1.4 05-Feb-2008  macallan add hardware acceleration for scrolling and clearing.
The framebuffer is now run in tiled mode so we can use the rendering engine
which means X is broken for now.
This needs more testing.
 1.3 02-Feb-2008  sekiya Define relevent register data so that we can turn off sync-on-green when needed.
 1.2 02-Dec-2007  jmcneill CRMFB_VT_VCMAP and CRMFB_VT_HCMAP register definitions were transposed.
From jsing@openbsd in private mail.
 1.1 26-Jul-2007  macallan branches: 1.1.4; 1.1.6; 1.1.8; 1.1.10; 1.1.12; 1.1.14; 1.1.20;
- move register definitions to crmfbreg.h
- identify as WSDISPLAY_TYPE_CRIME
- always claim we're 32bit
- switch to 32bit colour in WSDISPLAYIO_MODE_MAPPED, switch back to 8bit
in WSDISPLAYIO_MODE_EMUL
- restore palette, turn off the cursor when switching back to console mode
- add a few delay()s, hopefully that will deal with occasional messed up
video timings *fingers crossed*
 1.1.20.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.20.1 08-Dec-2007  mjf Sync with HEAD.
 1.1.14.6 27-Feb-2008  yamt sync with head.
 1.1.14.5 11-Feb-2008  yamt sync with head.
 1.1.14.4 04-Feb-2008  yamt sync with head.
 1.1.14.3 07-Dec-2007  yamt sync with head
 1.1.14.2 03-Sep-2007  yamt sync with head.
 1.1.14.1 26-Jul-2007  yamt file crmfbreg.h was added on branch yamt-lazymbuf on 2007-09-03 14:29:14 +0000
 1.1.12.2 23-Mar-2008  matt sync with HEAD
 1.1.12.1 09-Jan-2008  matt sync with HEAD
 1.1.10.3 03-Dec-2007  ad Sync with HEAD.
 1.1.10.2 20-Aug-2007  ad Sync with HEAD.
 1.1.10.1 26-Jul-2007  ad file crmfbreg.h was added on branch vmlocking on 2007-08-20 22:07:00 +0000
 1.1.8.2 15-Aug-2007  skrll Sync with HEAD.
 1.1.8.1 26-Jul-2007  skrll file crmfbreg.h was added on branch nick-csl-alignment on 2007-08-15 13:47:37 +0000
 1.1.6.2 07-Aug-2007  matt Sync with HEAD.
 1.1.6.1 26-Jul-2007  matt file crmfbreg.h was added on branch matt-mips64 on 2007-08-07 18:05:38 +0000
 1.1.4.1 03-Dec-2007  joerg Sync with HEAD.
 1.7.12.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.7.10.2 04-May-2009  yamt sync with head.
 1.7.10.1 16-May-2008  yamt sync with head.
 1.7.8.1 18-May-2008  yamt sync with head.
 1.7.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.7.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.8.2 01-Apr-2009  snj Pull up following revision(s) (requested by macallan in ticket #625):
sys/arch/sgimips/dev/crmfbreg.h: revision 1.10
add a few more register definitions, needed by the latest crime_drv.
 1.8.8.1 25-Feb-2009  snj Pull up following revision(s) (requested by macallan in ticket #507):
sys/arch/sgimips/dev/crmfbreg.h: revision 1.9
add a couple more registers
 1.8.6.2 28-Apr-2009  skrll Sync with HEAD.
 1.8.6.1 19-Jan-2009  skrll Sync with HEAD.
 1.8.4.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.9.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.10.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.4.3 31-May-2011  rmind sync with head
 1.10.4.2 21-Apr-2011  rmind sync with head
 1.10.4.1 05-Mar-2011  rmind sync with head
 1.15.32.1 06-Apr-2015  skrll Sync with HEAD
 1.15.14.1 03-Dec-2017  jdolecek update from HEAD
 1.4 18-Feb-2015  macallan switch sgimips to common bus_dma and bus_space in arch/mips/
Tested on O2 and Indy.
Things that are compile-tested only for lack of hardware:
- GIO ethernet cards with PCI bridges
- IP2x hardware not found on Indy
- IP1x
 1.3 01-Jul-2011  dyoung branches: 1.3.12; 1.3.30;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
Deal with arcbios calls being O32 and kernels being N32/N64.
Need to save/restore T8 across arcbios calls.
 1.1 10-Feb-2009  rumble branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10; 1.1.12; 1.1.14;
Check in work in progress of Personal IRIS 4D/20 and 4D/25 support (IP6
and IP10, respectively).
 1.1.14.1 05-Mar-2011  bouyer Sync with HEAD
 1.1.12.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.10.1 05-Mar-2011  rmind sync with head
 1.1.6.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.6.1 10-Feb-2009  jym file ctl.c was added on branch jym-xensuspend on 2009-05-13 17:18:17 +0000
 1.1.4.2 04-May-2009  yamt sync with head.
 1.1.4.1 10-Feb-2009  yamt file ctl.c was added on branch yamt-nfs-mp on 2009-05-04 08:11:49 +0000
 1.1.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.1.2.1 10-Feb-2009  skrll file ctl.c was added on branch nick-hppapmap on 2009-03-03 18:29:13 +0000
 1.3.30.1 06-Apr-2015  skrll Sync with HEAD
 1.3.12.1 03-Dec-2017  jdolecek update from HEAD
 1.1 10-Feb-2009  rumble branches: 1.1.2; 1.1.4; 1.1.6;
Check in work in progress of Personal IRIS 4D/20 and 4D/25 support (IP6
and IP10, respectively).
 1.1.6.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.6.1 10-Feb-2009  jym file ctlreg.h was added on branch jym-xensuspend on 2009-05-13 17:18:18 +0000
 1.1.4.2 04-May-2009  yamt sync with head.
 1.1.4.1 10-Feb-2009  yamt file ctlreg.h was added on branch yamt-nfs-mp on 2009-05-04 08:11:49 +0000
 1.1.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.1.2.1 10-Feb-2009  skrll file ctlreg.h was added on branch nick-hppapmap on 2009-03-03 18:29:13 +0000
 1.3 05-Dec-2021  msaitoh Fix typo again... s/Comparision/Comparison/
 1.2 05-Dec-2021  msaitoh s/comparsion/comparision/ in comment.
 1.1 12-Feb-2009  rumble branches: 1.1.2; 1.1.4; 1.1.6;
Enable Personal IRIS 4D/20 and 4D/25 support:
- Adapt int(4) to handle the INT1 chip
- Move generic rtc clocks out of hpc/ and into dev/
- Handle the very strangely wired eeprom and other bits in arcemu
- Sprinkle MACH_SGI_IP6 as necessary
- Enable IP6/IP10 devices in GENERIC32_IP12. Yes, the naming is poor but
there's no winning with kernel/hw compatibility on sgimips...

Tested on my 4D/25. Doesn't (appear to) break macallan@'s IP22.
 1.1.6.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.6.1 12-Feb-2009  jym file dp8573areg.h was added on branch jym-xensuspend on 2009-05-13 17:18:18 +0000
 1.1.4.2 04-May-2009  yamt sync with head.
 1.1.4.1 12-Feb-2009  yamt file dp8573areg.h was added on branch yamt-nfs-mp on 2009-05-04 08:11:49 +0000
 1.1.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.1.2.1 12-Feb-2009  skrll file dp8573areg.h was added on branch nick-hppapmap on 2009-03-03 18:29:13 +0000
 1.9 07-Sep-2025  thorpej Change todr_chip_handle::cookie -> todr_chip_handle::todr_dev, and
make it a device_t. Upcoming functional changes will require the
device_t associated with a TODR device.

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

And with these largely mechanical yet semantically meaningful changes,
thus spake the Oracle: "Welcome to NetBSD 11.99.2."
 1.8 07-Sep-2025  thorpej Remove unnecessary NULL-initialization of TODR handle fields.
 1.7 02-Jan-2020  thorpej Use todr_gettime_ymdhms / todr_settime_ymdhms.
 1.6 18-Feb-2015  macallan branches: 1.6.18;
switch sgimips to common bus_dma and bus_space in arch/mips/
Tested on O2 and Indy.
Things that are compile-tested only for lack of hardware:
- GIO ethernet cards with PCI bridges
- IP2x hardware not found on Indy
- IP1x
 1.5 20-Nov-2014  christos branches: 1.5.2;
use the inline bcdtobin and bintobcd directly instead through a macro.
 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 01-Jul-2011  dyoung branches: 1.3.2; 1.3.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 12-Dec-2009  tsutsui 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.1 12-Feb-2009  rumble branches: 1.1.2; 1.1.4; 1.1.6;
Enable Personal IRIS 4D/20 and 4D/25 support:
- Adapt int(4) to handle the INT1 chip
- Move generic rtc clocks out of hpc/ and into dev/
- Handle the very strangely wired eeprom and other bits in arcemu
- Sprinkle MACH_SGI_IP6 as necessary
- Enable IP6/IP10 devices in GENERIC32_IP12. Yes, the naming is poor but
there's no winning with kernel/hw compatibility on sgimips...

Tested on my 4D/25. Doesn't (appear to) break macallan@'s IP22.
 1.1.6.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.6.1 12-Feb-2009  jym file dpclock.c was added on branch jym-xensuspend on 2009-05-13 17:18:18 +0000
 1.1.4.3 11-Mar-2010  yamt sync with head
 1.1.4.2 04-May-2009  yamt sync with head.
 1.1.4.1 12-Feb-2009  yamt file dpclock.c was added on branch yamt-nfs-mp on 2009-05-04 08:11:49 +0000
 1.1.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.1.2.1 12-Feb-2009  skrll file dpclock.c was added on branch nick-hppapmap on 2009-03-03 18:29:13 +0000
 1.3.12.2 03-Dec-2017  jdolecek update from HEAD
 1.3.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.2.1 30-Oct-2012  yamt sync with head
 1.5.2.1 06-Apr-2015  skrll Sync with HEAD
 1.6.18.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.9 07-Sep-2025  thorpej Change todr_chip_handle::cookie -> todr_chip_handle::todr_dev, and
make it a device_t. Upcoming functional changes will require the
device_t associated with a TODR device.

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

And with these largely mechanical yet semantically meaningful changes,
thus spake the Oracle: "Welcome to NetBSD 11.99.2."
 1.8 07-Sep-2025  thorpej Remove unnecessary NULL-initialization of TODR handle fields.
 1.7 18-Feb-2015  macallan switch sgimips to common bus_dma and bus_space in arch/mips/
Tested on O2 and Indy.
Things that are compile-tested only for lack of hardware:
- GIO ethernet cards with PCI bridges
- IP2x hardware not found on Indy
- IP1x
 1.6 20-Nov-2014  christos branches: 1.6.2;
use the inline bcdtobin and bintobcd directly instead through a macro.
 1.5 01-Jul-2011  dyoung branches: 1.5.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 12-Jan-2010  tsutsui Split device_t/softc, some KNF.
 1.3 12-Jan-2010  tsutsui Switch to using todr_[gs]ettime_ymdhms() format
which doesn't require struct timeval details.
 1.2 12-Dec-2009  tsutsui 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.1 12-Feb-2009  rumble branches: 1.1.2; 1.1.4; 1.1.6;
Enable Personal IRIS 4D/20 and 4D/25 support:
- Adapt int(4) to handle the INT1 chip
- Move generic rtc clocks out of hpc/ and into dev/
- Handle the very strangely wired eeprom and other bits in arcemu
- Sprinkle MACH_SGI_IP6 as necessary
- Enable IP6/IP10 devices in GENERIC32_IP12. Yes, the naming is poor but
there's no winning with kernel/hw compatibility on sgimips...

Tested on my 4D/25. Doesn't (appear to) break macallan@'s IP22.
 1.1.6.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.6.1 12-Feb-2009  jym file dsclock.c was added on branch jym-xensuspend on 2009-05-13 17:18:18 +0000
 1.1.4.3 11-Mar-2010  yamt sync with head
 1.1.4.2 04-May-2009  yamt sync with head.
 1.1.4.1 12-Feb-2009  yamt file dsclock.c was added on branch yamt-nfs-mp on 2009-05-04 08:11:49 +0000
 1.1.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.1.2.1 12-Feb-2009  skrll file dsclock.c was added on branch nick-hppapmap on 2009-03-03 18:29:13 +0000
 1.5.12.1 03-Dec-2017  jdolecek update from HEAD
 1.6.2.1 06-Apr-2015  skrll Sync with HEAD
 1.14 06-Oct-2011  he The crmfb device does not depend on iic; i2cbus and i2c_bitbang is
sufficient, says jmcneill@
Fixes a build problem for (at least) the GENERIC32_IP3x kernel.
 1.13 22-May-2011  macallan crmfb may run in more than 8 bit now so we need the other rasops* as well
 1.12 07-Apr-2011  macallan defflag CRMFB_DEBUG
 1.11 04-Apr-2011  macallan crmfb needs edid and friends now
 1.10 12-Feb-2009  rumble branches: 1.10.4; 1.10.6;
Enable Personal IRIS 4D/20 and 4D/25 support:
- Adapt int(4) to handle the INT1 chip
- Move generic rtc clocks out of hpc/ and into dev/
- Handle the very strangely wired eeprom and other bits in arcemu
- Sprinkle MACH_SGI_IP6 as necessary
- Enable IP6/IP10 devices in GENERIC32_IP12. Yes, the naming is poor but
there's no winning with kernel/hw compatibility on sgimips...

Tested on my 4D/25. Doesn't (appear to) break macallan@'s IP22.
 1.9 17-Oct-2007  garbled branches: 1.9.20; 1.9.28; 1.9.34;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.8 26-Sep-2007  macallan crime needs-flag
 1.7 12-Apr-2007  jmcneill branches: 1.7.2; 1.7.10; 1.7.12; 1.7.14;
Add crmfb, a framebuffer console driver for the onboard O2 video (SGI-CRM)
 1.6 30-Aug-2006  rumble branches: 1.6.8; 1.6.12; 1.6.14;
Add pic and imc-specific functions to alter the GIO bus arbiter
configuration. These are to be used exclusively by a higher interface in
gio/gio.c.

Also add functions to enable, disable and query the state of SysAd bus
parity detection since certain gio(4) cards need to be able to disable
it in order to work around their own buggy implementations.
 1.5 11-Dec-2005  christos branches: 1.5.4; 1.5.8; 1.5.18;
merge ktrace-lwp.
 1.4 18-Oct-2005  tsutsui TAB/space cleanup.
 1.3 08-Jul-2004  sekiya branches: 1.3.2; 1.3.14;
Add support for keyboard and mouse attachments at zs*, used on IP12 and IP20.
Code written by Steve Rumble; committed with his blessing.

Using a glass TTY as a console on IP20 (IP12 untested) should now be possible.
 1.2 19-Jan-2004  sekiya Attach int0 at mainbus (precedent being the ip32 CRIME device, which handled
interrupts and timer calibration yet is also attached at mainbus).

Introduce the INDY_R4600_CACHE config option, which more accurately describes
the code enabled by this option.

This renders #ifdef IPxx completely obsolete, thus we theoretically can unify
the GENERIC files if a workable load address relocation scheme can be found.
 1.1 18-Jan-2004  sekiya Add files.dev and files.mace
 1.3.14.4 27-Oct-2007  yamt sync with head.
 1.3.14.3 03-Sep-2007  yamt sync with head.
 1.3.14.2 30-Dec-2006  yamt sync with head.
 1.3.14.1 21-Jun-2006  yamt sync with head.
 1.3.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.2 03-Aug-2004  skrll Sync with HEAD
 1.3.2.1 08-Jul-2004  skrll file files.dev was added on branch ktrace-lwp on 2004-08-03 10:40:00 +0000
 1.5.18.1 10-Sep-2006  tron Pull up following revision(s) (requested by rumble in ticket #137):
sys/arch/sgimips/dev/imc.c: revision 1.26
sys/arch/sgimips/dev/files.dev: revision 1.6
sys/arch/sgimips/dev/pic.c: revision 1.11
sys/arch/sgimips/dev/imcvar.h: revision 1.1
Add pic and imc-specific functions to alter the GIO bus arbiter
configuration. These are to be used exclusively by a higher interface in
gio/gio.c.
Also add functions to enable, disable and query the state of SysAd bus
parity detection since certain gio(4) cards need to be able to disable
it in order to work around their own buggy implementations.
 1.5.8.1 03-Sep-2006  yamt sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.6.14.1 11-Jul-2007  mjf Sync with head.
 1.6.12.2 09-Oct-2007  ad Sync with head.
 1.6.12.1 27-May-2007  ad Sync with head.
 1.6.8.1 15-Apr-2007  yamt sync with head.
 1.7.14.1 06-Oct-2007  yamt sync with head.
 1.7.12.1 06-Nov-2007  matt sync with HEAD
 1.7.10.1 02-Oct-2007  joerg Sync with HEAD.
 1.7.2.1 03-Oct-2007  garbled Sync with HEAD
 1.9.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.28.1 03-Mar-2009  skrll Sync with HEAD.
 1.9.20.1 04-May-2009  yamt sync with head.
 1.10.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.4.2 31-May-2011  rmind sync with head
 1.10.4.1 21-Apr-2011  rmind sync with head
 1.14 18-Jan-2004  sekiya Following the example of the hpc/, gio/, and ioc/ directories, move the
mace devices to their own mace/ directory. Alter conf/files.sgimips to
reflect this change in a sane manner (i.e., pull in dev/files.dev and
mace/files.mace when appropriate).

At the same time, allow crime_intr_establish() to fall through to
mace_intr_establish(). mace devices now call cpu_intr_establish().
 1.13 11-Jan-2004  sekiya Checkpoint if_mec work (just in case I get hit by a bus). This driver is still
not operational. The MII code mostly works, DMA data structures are defined
and allocated, but tx/rx logic is missing.
 1.12 17-Nov-2003  keihan www.netbsd.org -> www.NetBSD.org
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 26-Dec-2002  pooka branches: 1.10.2;
sync with mecreg change, ie. make this compile
 1.9 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.8 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 13-Mar-2002  simonb Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.5 18-Nov-2000  soren branches: 1.5.2; 1.5.6; 1.5.10;
Use ETHER_ADDR_LEN.
 1.4 15-Nov-2000  thorpej Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach().
 1.3 03-Jul-2000  soren A few tweaks. Still not a real driver.
 1.2 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.1 14-Jun-2000  soren branches: 1.1.4;
A start at O2 support..
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 14-Jun-2000  minoura file if_mec.c was added on branch minoura-xpg4dl on 2000-06-22 17:03:01 +0000
 1.5.10.3 29-Dec-2002  thorpej Sync with HEAD.
 1.5.10.2 18-Oct-2002  nathanw Catch up to -current.
 1.5.10.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.5.6.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.5.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.5.2.3 22-Nov-2000  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 18-Nov-2000  bouyer file if_mec.c was added on branch thorpej_scsipi on 2000-11-20 20:23:41 +0000
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6 18-Jan-2004  sekiya Following the example of the hpc/, gio/, and ioc/ directories, move the
mace devices to their own mace/ directory. Alter conf/files.sgimips to
reflect this change in a sane manner (i.e., pull in dev/files.dev and
mace/files.mace when appropriate).

At the same time, allow crime_intr_establish() to fall through to
mace_intr_establish(). mace devices now call cpu_intr_establish().
 1.5 11-Jan-2004  sekiya Checkpoint if_mec work (just in case I get hit by a bus). This driver is still
not operational. The MII code mostly works, DMA data structures are defined
and allocated, but tx/rx logic is missing.
 1.4 17-Nov-2003  keihan www.netbsd.org -> www.NetBSD.org
 1.3 26-Dec-2002  pooka branches: 1.3.2;
brush up situation with mec register definitions

from Chris Sekiya
 1.2 13-Mar-2002  simonb Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.1 14-Jun-2000  soren branches: 1.1.4; 1.1.6; 1.1.10; 1.1.14;
A start at O2 support..
 1.1.14.2 29-Dec-2002  thorpej Sync with HEAD.
 1.1.14.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.10.1 16-Mar-2002  jdolecek Catch up with -current.
 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 14-Jun-2000  bouyer file if_mecreg.h was added on branch thorpej_scsipi on 2000-11-20 20:23:41 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 14-Jun-2000  minoura file if_mecreg.h was added on branch minoura-xpg4dl on 2000-06-22 17:03:01 +0000
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.38 19-Oct-2025  thorpej Use {,e}isabus_attach().
 1.37 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.36 24-Apr-2021  thorpej branches: 1.36.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.35 26-Apr-2019  macallan branches: 1.35.12;
fix misleading error message
 1.34 18-Feb-2015  macallan branches: 1.34.18;
switch sgimips to common bus_dma and bus_space in arch/mips/
Tested on O2 and Indy.
Things that are compile-tested only for lack of hardware:
- GIO ethernet cards with PCI bridges
- IP2x hardware not found on Indy
- IP1x
 1.33 27-Oct-2012  chs branches: 1.33.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.32 01-Jul-2011  dyoung branches: 1.32.2; 1.32.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.31 30-Jun-2011  wiz dependant -> dependent
 1.30 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
Deal with arcbios calls being O32 and kernels being N32/N64.
Need to save/restore T8 across arcbios calls.
 1.29 23-Aug-2008  tsutsui branches: 1.29.12; 1.29.16; 1.29.22; 1.29.24;
KNF and misc cosmetics.
 1.28 19-Feb-2007  rumble branches: 1.28.42; 1.28.46; 1.28.48; 1.28.52;
Support the sq(4) interface on the Challenge S's IOPLUS mezzanine. This
requires us to configure the IOPLUS to use the appropriate DMA channel,
depending on what other expansion cards may be installed. Further, we need
to do a bit more configuration of the sq(4) DMA engine, which apparently
was formerly being configured properly by the PROM. Use the same values,
which appear to work fine.

Also, extend the gio_arb_config interface as needed.

NB: We're currently setting the IOPLUS board to long burst, but it may be
better to use realtime. This will require some experimentation.
 1.27 22-Dec-2006  rumble branches: 1.27.2;
Guiness -> Guinness.
 1.26 30-Aug-2006  rumble branches: 1.26.2;
Add pic and imc-specific functions to alter the GIO bus arbiter
configuration. These are to be used exclusively by a higher interface in
gio/gio.c.

Also add functions to enable, disable and query the state of SysAd bus
parity detection since certain gio(4) cards need to be able to disable
it in order to work around their own buggy implementations.
 1.25 11-Dec-2005  christos branches: 1.25.4; 1.25.8; 1.25.18;
merge ktrace-lwp.
 1.24 18-Oct-2005  tsutsui TAB/space cleanup.
 1.23 29-Sep-2004  sekiya branches: 1.23.12;
Various fixes:

* clean up EISA detection logic,
* really fix config_found_ia() usage (from drochner@),
* sprinkle a bit of KNF.
 1.22 05-Sep-2004  sekiya Oooops, iaa.iaa_name must be initialized.
 1.21 05-Sep-2004  sekiya Use config_found_ia() rather than config_found().
 1.20 17-Aug-2004  rumble Implement several changes that get my E++ (HPC1.5 GIO ethernet
adapter) to work on IP24:
o Force HPC and GIO slot endianness.
o Allow slots one and two to be masters and configure for
realtime mode.

Also, while we're here move IP22 invariants into the IP22 case.

I suspect that IP20 will work as well since it exhibited the same
broken DMA that IP24 did before I flipped the master bit.
 1.19 25-Jul-2004  sekiya Properly detect the EISA bus for IP22-class machines.
 1.18 13-Jun-2004  rumble sekiya-san's platform abstraction allows us to keep these
functions static.
 1.17 03-Apr-2004  sekiya Hook the IMC bus error handler into the ISR, otherwise bus error conditions
won't be properly dealt with.
 1.16 18-Jan-2004  sekiya branches: 1.16.2;
Keep chip revision and EISA information on same line as attach information.
 1.15 18-Jan-2004  sekiya Properly disable watchdog timer.
 1.14 18-Jan-2004  sekiya Finish moving code between ip2x.c and ip3x.c to imc.c and crime.c.
 1.13 13-Jan-2004  sekiya Assign memory controller-dependent watchdog reset functions to
platform.watchdog_reset.
 1.12 13-Jan-2004  sekiya As the platform-specific bus reset routine varies based on the memory
controller used, set it in the memory controller driver rather than the
platform init code.
 1.11 10-Jan-2004  sekiya Add watchdog and bus error handling functions (these features live in
IMC space, thus should be handled here rather than in ip2x.c)
 1.10 14-Dec-2003  sekiya Bus-space'ify the memory controller driver, and add IP20-specific bits.
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 01-Jan-2003  thorpej branches: 1.8.2;
Use aprint_normal() for cfprint routines.
 1.7 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 13-Mar-2002  simonb Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.3 10-Sep-2001  rafal branches: 1.3.4;
Use the newly committed imcreg.h to get rid of the magic numbers polluting
this file; while I'm here, rework the GIO arbitrator parameter setup to
match more closely what is done by lunix on the same hardware... Finally,
on a tip from Wilbern Cobb, preserve the graphics-related bits of the
GIO arbitrator parameter register from the PROM-initialized settings so
ARCS console on the graphics display works (tested on both my Indy with
Newport and my Indigo2 with XL gfx).
 1.2 08-Jul-2001  thorpej branches: 1.2.2; 1.2.4;
- Use the identifier strings that are fetched by the MI ARC BIOS
code.
- Garbage-collect some non-useful stuff from the mainbus_attach_args.
 1.1 11-May-2001  thorpej branches: 1.1.2;
Support for the Indigo2/Indy IMC (this is that to which all other
devices are attached).
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.2.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.4.4 03-Jan-2003  thorpej Sync with HEAD.
 1.3.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.3.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.4.1 10-Sep-2001  nathanw file imc.c was added on branch nathanw_sa on 2002-04-01 07:42:18 +0000
 1.8.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.2.5 19-Oct-2004  skrll Sync with HEAD
 1.8.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.2 25-Aug-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.2.1 11-May-2004  tron Pull up revision 1.17 (requested by sekiya in ticket #285):
Hook the IMC bus error handler into the ISR, otherwise bus error conditions
won't be properly dealt with.
 1.23.12.3 26-Feb-2007  yamt sync with head.
 1.23.12.2 30-Dec-2006  yamt sync with head.
 1.23.12.1 21-Jun-2006  yamt sync with head.
 1.25.18.1 10-Sep-2006  tron Pull up following revision(s) (requested by rumble in ticket #137):
sys/arch/sgimips/dev/imc.c: revision 1.26
sys/arch/sgimips/dev/files.dev: revision 1.6
sys/arch/sgimips/dev/pic.c: revision 1.11
sys/arch/sgimips/dev/imcvar.h: revision 1.1
Add pic and imc-specific functions to alter the GIO bus arbiter
configuration. These are to be used exclusively by a higher interface in
gio/gio.c.
Also add functions to enable, disable and query the state of SysAd bus
parity detection since certain gio(4) cards need to be able to disable
it in order to work around their own buggy implementations.
 1.25.8.1 03-Sep-2006  yamt sync with head.
 1.25.4.1 09-Sep-2006  rpaulo sync with head
 1.26.2.1 12-Jan-2007  ad Sync with head.
 1.27.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.28.52.1 19-Oct-2008  haad Sync with HEAD.
 1.28.48.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.28.46.1 04-May-2009  yamt sync with head.
 1.28.42.1 28-Sep-2008  mjf Sync with HEAD.
 1.29.24.1 05-Mar-2011  bouyer Sync with HEAD
 1.29.22.1 06-Jun-2011  jruoho Sync with HEAD.
 1.29.16.1 05-Mar-2011  rmind sync with head
 1.29.12.1 29-Dec-2010  matt Adapt sgimips to the interrupt framework.
 1.32.12.2 03-Dec-2017  jdolecek update from HEAD
 1.32.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.32.2.1 30-Oct-2012  yamt sync with head
 1.33.14.1 06-Apr-2015  skrll Sync with HEAD
 1.34.18.1 10-Jun-2019  christos Sync with HEAD
 1.35.12.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.36.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 11-Jul-2015  kamil Improve spelling: regsiter -> register

This change is non-functional.

Approved by <riastradh>, <pgoyette>
 1.4 11-Dec-2005  christos branches: 1.4.122; 1.4.142;
merge ktrace-lwp.
 1.3 14-Dec-2003  sekiya Bus-space'ify the memory controller driver, and add IP20-specific bits.
 1.2 13-Mar-2002  simonb branches: 1.2.12;
Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.1 10-Sep-2001  rafal branches: 1.1.2; 1.1.4; 1.1.8;
Register defines for the SGI MC memory controller. Not 100% complete, but
has enough register/bit definitions to get rid of all the magic numbers that
currently pollute imc.c
 1.1.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.8.1 10-Sep-2001  nathanw file imcreg.h was added on branch nathanw_sa on 2002-04-01 07:42:18 +0000
 1.1.4.2 01-Oct-2001  fvdl Catch up with -current.
 1.1.4.1 10-Sep-2001  fvdl file imcreg.h was added on branch thorpej-devvp on 2001-10-01 12:41:48 +0000
 1.1.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.1 10-Sep-2001  thorpej file imcreg.h was added on branch kqueue on 2001-09-13 01:14:30 +0000
 1.2.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.12.1 03-Aug-2004  skrll Sync with HEAD
 1.4.142.1 22-Sep-2015  skrll Sync with HEAD
 1.4.122.1 03-Dec-2017  jdolecek update from HEAD
 1.1 30-Aug-2006  rumble branches: 1.1.2; 1.1.6; 1.1.8; 1.1.14;
Add pic and imc-specific functions to alter the GIO bus arbiter
configuration. These are to be used exclusively by a higher interface in
gio/gio.c.

Also add functions to enable, disable and query the state of SysAd bus
parity detection since certain gio(4) cards need to be able to disable
it in order to work around their own buggy implementations.
 1.1.14.2 30-Dec-2006  yamt sync with head.
 1.1.14.1 30-Aug-2006  yamt file imcvar.h was added on branch yamt-lazymbuf on 2006-12-30 20:46:52 +0000
 1.1.8.1 10-Sep-2006  tron Pull up following revision(s) (requested by rumble in ticket #137):
sys/arch/sgimips/dev/imc.c: revision 1.26
sys/arch/sgimips/dev/files.dev: revision 1.6
sys/arch/sgimips/dev/pic.c: revision 1.11
sys/arch/sgimips/dev/imcvar.h: revision 1.1
Add pic and imc-specific functions to alter the GIO bus arbiter
configuration. These are to be used exclusively by a higher interface in
gio/gio.c.
Also add functions to enable, disable and query the state of SysAd bus
parity detection since certain gio(4) cards need to be able to disable
it in order to work around their own buggy implementations.
 1.1.6.2 09-Sep-2006  rpaulo sync with head
 1.1.6.1 30-Aug-2006  rpaulo file imcvar.h was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:42:52 +0000
 1.1.2.2 03-Sep-2006  yamt sync with head.
 1.1.2.1 30-Aug-2006  yamt file imcvar.h was added on branch yamt-pdpolicy on 2006-09-03 15:23:27 +0000
 1.32 21-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.31 29-May-2020  rin branches: 1.31.2;
For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.
 1.30 10-Nov-2019  chs in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.29 27-Sep-2018  macallan add event counters for int0 at mainbus
 1.28 18-Feb-2015  macallan branches: 1.28.16; 1.28.18;
switch sgimips to common bus_dma and bus_space in arch/mips/
Tested on O2 and Indy.
Things that are compile-tested only for lack of hardware:
- GIO ethernet cards with PCI bridges
- IP2x hardware not found on Indy
- IP1x
 1.27 03-Jun-2014  macallan branches: 1.27.4;
actually get rid of actually unused variables, still works on my Indy
thanks mrg
 1.26 02-Jun-2014  macallan sprinkle __unused()
 1.25 27-Oct-2012  chs branches: 1.25.10;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.24 01-Jul-2011  dyoung branches: 1.24.2; 1.24.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.23 10-Mar-2011  tsutsui Set correct struct clockframe .intr value for hardclock(9).
 1.22 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
Deal with arcbios calls being O32 and kernels being N32/N64.
Need to save/restore T8 across arcbios calls.
 1.21 14-Dec-2009  matt branches: 1.21.4; 1.21.6; 1.21.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.20 12-Feb-2009  rumble Enable Personal IRIS 4D/20 and 4D/25 support:
- Adapt int(4) to handle the INT1 chip
- Move generic rtc clocks out of hpc/ and into dev/
- Handle the very strangely wired eeprom and other bits in arcemu
- Sprinkle MACH_SGI_IP6 as necessary
- Enable IP6/IP10 devices in GENERIC32_IP12. Yes, the naming is poor but
there's no winning with kernel/hw compatibility on sgimips...

Tested on my 4D/25. Doesn't (appear to) break macallan@'s IP22.
 1.19 23-Aug-2008  tsutsui branches: 1.19.2; 1.19.8; 1.19.12;
KNF and misc cosmetics.
 1.18 26-May-2008  tsutsui branches: 1.18.4;
Remove all initialization of obsolete ci_divisor_recip in
mips struct cpu_info and related macroes.
The member was prepared for a hack in MD microtime(9) implementation
but it has been superseded by MI timecounter(9).
 1.17 09-Jan-2008  wiz branches: 1.17.6; 1.17.8; 1.17.10; 1.17.12;
Fix typo in macro name and comments.
 1.16 29-Dec-2006  rumble branches: 1.16.24; 1.16.30; 1.16.36;
Change printing such that our 'timecounter:' message gets its own line on
IP12.
 1.15 29-Dec-2006  rumble Move the mips1_clock_intr handling into int.c where it belongs.
 1.14 29-Dec-2006  rumble Add i8254 timecounter support for use on IP12.

Now pings aren't 0.000 ms anymore.
 1.13 28-Dec-2006  rumble Sprinkle static.
 1.12 01-Sep-2006  rumble branches: 1.12.2;
Remove the 'FIFO Full' hack for interrupt vector 0.

It is unclear that this interrupt fails to latch as int2_wait_fifo()
depends on it doing so and appears to work. Furthermore, we were previously
unconditionally unmasking the interrupt 0 vector, which led to more
'unexpected interrupt' messages on the console, rather than avoiding them.

Approved by sekiya@.
 1.11 11-Dec-2005  christos branches: 1.11.4; 1.11.8; 1.11.18;
merge ktrace-lwp.
 1.10 18-Oct-2005  tsutsui TAB/space cleanup.
 1.9 08-Jul-2004  sekiya branches: 1.9.2; 1.9.12; 1.9.14;
Fake a FIFO interrupt iff the FIFO interrupt is unmasked. Should eliminate
the "spurious interrupt" messages on machines without grtwo displays.
 1.8 06-Jul-2004  sekiya Add the following to the int driver:

* if the driver hasn't been properly initialized, spin for a bit in wait_fifo()
rather than try to access the local0 status register.
* allow interrupt sharing (from Steve Rumble; necessary for IP20 glass TTY
support).
 1.7 11-Apr-2004  pooka Fix base address for i8254 calibration code. This has the effect of
us writing to the correct addresses and the thing actually working.
 1.6 25-Mar-2004  pooka branches: 1.6.2;
KNF
 1.5 25-Mar-2004  pooka replace terms ip1x and ip2x in comment
 1.4 25-Mar-2004  pooka Sprinkle some #ifdef MIPS3 to be able to compile the port without
including MIPS3 code.

for upcoming IP12
 1.3 09-Mar-2004  sekiya Add int2_wait_fifo(), which will idle while awaiting a flag in the interrupt
controller to deassert. Needed for the more interesting features of various
SGI framebuffers.
 1.2 19-Jan-2004  sekiya opt_machtype.h no longer exists.
 1.1 19-Jan-2004  sekiya Attach int0 at mainbus (precedent being the ip32 CRIME device, which handled
interrupts and timer calibration yet is also attached at mainbus).

Introduce the INDY_R4600_CACHE config option, which more accurately describes
the code enabled by this option.

This renders #ifdef IPxx completely obsolete, thus we theoretically can unify
the GENERIC files if a workable load address relocation scheme can be found.
 1.6.2.1 23-Jul-2004  tron Pull up revision 1.7 (requested by rumble in ticket #682):
Fix base address for i8254 calibration code. This has the effect of
us writing to the correct addresses and the thing actually working.
 1.9.14.3 21-Jan-2008  yamt sync with head
 1.9.14.2 30-Dec-2006  yamt sync with head.
 1.9.14.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 16-Sep-2006  ghen Pull up following revision(s) (requested by rumble in ticket #1496):
sys/arch/sgimips/dev/int.c: revision 1.12
Remove the 'FIFO Full' hack for interrupt vector 0.
It is unclear that this interrupt fails to latch as int2_wait_fifo()
depends on it doing so and appears to work. Furthermore, we were previously
unconditionally unmasking the interrupt 0 vector, which led to more
'unexpected interrupt' messages on the console, rather than avoiding them.
Approved by sekiya@.
 1.9.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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-Aug-2004  skrll Sync with HEAD
 1.9.2.1 08-Jul-2004  skrll file int.c was added on branch ktrace-lwp on 2004-08-03 10:40:00 +0000
 1.11.18.1 06-Sep-2006  riz Pull up following revision(s) (requested by rumble in ticket #110):
sys/arch/sgimips/dev/int.c: revision 1.12
Remove the 'FIFO Full' hack for interrupt vector 0.
It is unclear that this interrupt fails to latch as int2_wait_fifo()
depends on it doing so and appears to work. Furthermore, we were previously
unconditionally unmasking the interrupt 0 vector, which led to more
'unexpected interrupt' messages on the console, rather than avoiding them.
Approved by sekiya@.
 1.11.8.1 03-Sep-2006  yamt sync with head.
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.12.2.1 12-Jan-2007  ad Sync with head.
 1.16.36.1 10-Jan-2008  bouyer Sync with HEAD
 1.16.30.1 18-Feb-2008  mjf Sync with HEAD.
 1.16.24.1 23-Mar-2008  matt sync with HEAD
 1.17.12.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.12.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.17.10.2 11-Mar-2010  yamt sync with head
 1.17.10.1 04-May-2009  yamt sync with head.
 1.17.8.1 04-Jun-2008  yamt sync with head
 1.17.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.17.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.18.4.1 19-Oct-2008  haad Sync with HEAD.
 1.19.12.2 29-Dec-2010  matt Adapt sgimips to the interrupt framework.
 1.19.12.1 10-Sep-2009  matt Add preliminary LP64 support for sgimips
 1.19.8.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.19.2.1 03-Mar-2009  skrll Sync with HEAD.
 1.21.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.21.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.21.4.2 21-Apr-2011  rmind sync with head
 1.21.4.1 05-Mar-2011  rmind sync with head
 1.24.12.3 03-Dec-2017  jdolecek update from HEAD
 1.24.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.24.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.24.2.1 30-Oct-2012  yamt sync with head
 1.25.10.1 10-Aug-2014  tls Rebase.
 1.27.4.1 06-Apr-2015  skrll Sync with HEAD
 1.28.18.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.28.18.1 10-Jun-2019  christos Sync with HEAD
 1.28.16.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.31.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.2 12-Feb-2009  rumble branches: 1.2.2; 1.2.4; 1.2.6;
Enable Personal IRIS 4D/20 and 4D/25 support:
- Adapt int(4) to handle the INT1 chip
- Move generic rtc clocks out of hpc/ and into dev/
- Handle the very strangely wired eeprom and other bits in arcemu
- Sprinkle MACH_SGI_IP6 as necessary
- Enable IP6/IP10 devices in GENERIC32_IP12. Yes, the naming is poor but
there's no winning with kernel/hw compatibility on sgimips...

Tested on my 4D/25. Doesn't (appear to) break macallan@'s IP22.
 1.1 10-Feb-2009  rumble Check in work in progress of Personal IRIS 4D/20 and 4D/25 support (IP6
and IP10, respectively).
 1.2.6.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.6.1 12-Feb-2009  jym file int1reg.h was added on branch jym-xensuspend on 2009-05-13 17:18:18 +0000
 1.2.4.2 04-May-2009  yamt sync with head.
 1.2.4.1 12-Feb-2009  yamt file int1reg.h was added on branch yamt-nfs-mp on 2009-05-04 08:11:49 +0000
 1.2.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.2.2.1 12-Feb-2009  skrll file int1reg.h was added on branch nick-hppapmap on 2009-03-03 18:29:13 +0000
 1.5 12-Feb-2009  rumble Enable Personal IRIS 4D/20 and 4D/25 support:
- Adapt int(4) to handle the INT1 chip
- Move generic rtc clocks out of hpc/ and into dev/
- Handle the very strangely wired eeprom and other bits in arcemu
- Sprinkle MACH_SGI_IP6 as necessary
- Enable IP6/IP10 devices in GENERIC32_IP12. Yes, the naming is poor but
there's no winning with kernel/hw compatibility on sgimips...

Tested on my 4D/25. Doesn't (appear to) break macallan@'s IP22.
 1.4 11-Dec-2005  christos branches: 1.4.78; 1.4.86; 1.4.92;
merge ktrace-lwp.
 1.3 06-Jul-2004  sekiya branches: 1.3.2;
Add the following to the int driver:

* if the driver hasn't been properly initialized, spin for a bit in wait_fifo()
rather than try to access the local0 status register.
* allow interrupt sharing (from Steve Rumble; necessary for IP20 glass TTY
support).
 1.2 18-Jan-2004  sekiya Finish moving code between ip2x.c and ip3x.c to imc.c and crime.c.
 1.1 10-Jan-2004  sekiya Add register definitions for INT2 interrupt controller.
 1.3.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.2 03-Aug-2004  skrll Sync with HEAD
 1.3.2.1 06-Jul-2004  skrll file int2reg.h was added on branch ktrace-lwp on 2004-08-03 10:40:00 +0000
 1.4.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.86.1 03-Mar-2009  skrll Sync with HEAD.
 1.4.78.1 04-May-2009  yamt sync with head.
 1.3 23-Aug-2008  tsutsui KNF and misc cosmetics.
 1.2 11-Dec-2005  christos branches: 1.2.74; 1.2.78; 1.2.80; 1.2.84;
merge ktrace-lwp.
 1.1 09-Mar-2004  sekiya branches: 1.1.4;
Add int2_wait_fifo(), which will idle while awaiting a flag in the interrupt
controller to deassert. Needed for the more interesting features of various
SGI framebuffers.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 09-Mar-2004  skrll file int2var.h was added on branch ktrace-lwp on 2004-08-03 10:40:00 +0000
 1.2.84.1 19-Oct-2008  haad Sync with HEAD.
 1.2.80.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.78.1 04-May-2009  yamt sync with head.
 1.2.74.1 28-Sep-2008  mjf Sync with HEAD.
 1.9 18-Jan-2004  sekiya Following the example of the hpc/, gio/, and ioc/ directories, move the
mace devices to their own mace/ directory. Alter conf/files.sgimips to
reflect this change in a sane manner (i.e., pull in dev/files.dev and
mace/files.mace when appropriate).

At the same time, allow crime_intr_establish() to fall through to
mace_intr_establish(). mace devices now call cpu_intr_establish().
 1.8 17-Nov-2003  keihan www.netbsd.org -> www.NetBSD.org
 1.7 05-Oct-2003  tsutsui Apply a bunch of patches written by Christopher SEKIYA
(with several cosmetic changes by me) which fixes O2 (IP32) support.

Now my R5000 O2 works fine in multiuser with on-board AIC7880 SCSIs
and several PCI network cards (but only on serial console yet).
L2 cache on R5000/Rm5200 is still disabled for now, but it will be
fixed later, hopefully.

See recent discussion on port-sgimips for details.
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Add trailing ; to CFATTACH_DECL.
 1.4 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 13-Mar-2002  simonb Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.1 14-Jun-2000  soren branches: 1.1.4; 1.1.6; 1.1.10; 1.1.14;
A start at O2 support..
 1.1.14.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.14.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.10.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.10.1 16-Mar-2002  jdolecek Catch up with -current.
 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 14-Jun-2000  bouyer file lpt_mace.c was added on branch thorpej_scsipi on 2000-11-20 20:23:41 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 14-Jun-2000  minoura file lpt_mace.c was added on branch minoura-xpg4dl on 2000-06-22 17:03:02 +0000
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.4 18-Jan-2004  sekiya Following the example of the hpc/, gio/, and ioc/ directories, move the
mace devices to their own mace/ directory. Alter conf/files.sgimips to
reflect this change in a sane manner (i.e., pull in dev/files.dev and
mace/files.mace when appropriate).

At the same time, allow crime_intr_establish() to fall through to
mace_intr_establish(). mace devices now call cpu_intr_establish().
 1.3 17-Nov-2003  keihan www.netbsd.org -> www.NetBSD.org
 1.2 13-Mar-2002  simonb branches: 1.2.12;
Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.1 14-Jun-2000  soren branches: 1.1.4; 1.1.6; 1.1.10; 1.1.14;
A start at O2 support..
 1.1.14.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.10.1 16-Mar-2002  jdolecek Catch up with -current.
 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 14-Jun-2000  bouyer file macaureg.h was added on branch thorpej_scsipi on 2000-11-20 20:23:42 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 14-Jun-2000  minoura file macaureg.h was added on branch minoura-xpg4dl on 2000-06-22 17:03:03 +0000
 1.2.12.1 03-Aug-2004  skrll Sync with HEAD
 1.16 18-Jan-2004  sekiya Following the example of the hpc/, gio/, and ioc/ directories, move the
mace devices to their own mace/ directory. Alter conf/files.sgimips to
reflect this change in a sane manner (i.e., pull in dev/files.dev and
mace/files.mace when appropriate).

At the same time, allow crime_intr_establish() to fall through to
mace_intr_establish(). mace devices now call cpu_intr_establish().
 1.15 17-Nov-2003  keihan www.netbsd.org -> www.NetBSD.org
 1.14 25-Oct-2003  chs NULL -> 0
 1.13 05-Oct-2003  tsutsui Apply a bunch of patches written by Christopher SEKIYA
(with several cosmetic changes by me) which fixes O2 (IP32) support.

Now my R5000 O2 works fine in multiuser with on-board AIC7880 SCSIs
and several PCI network cards (but only on serial console yet).
L2 cache on R5000/Rm5200 is still disabled for now, but it will be
fixed later, hopefully.

See recent discussion on port-sgimips for details.
 1.12 15-Jul-2003  lukem __KERNEL_RCSID()
 1.11 06-Jan-2003  rafal branches: 1.11.2;
Improve the interrupt code somewhat by having callers of xxx_intr_establish
pass in an interrupt handle (which is currently to the CRIME interrupt the
device is attached to) so the interrupt handlers know which device was the
one looking for attention.

While here, fix up PCI interrupt routing for both the on-board devices and
the PCI slots -- even though there is only one PCI slot in the chasis, the
hardware can accomodate up to three and provides an interrupt mapping for
all the PCI interrupt pins for both the internal SCSI & PCI slot and the
two "extra" slots.
 1.10 03-Jan-2003  rafal Checkpoint of O2 work by Chris Sekiya and myself. This is the sgimips bit;
still needs some arch/mips support code before it will fully work.
 1.9 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.8 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.7 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 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.4 13-Mar-2002  simonb Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.3 11-Oct-2001  pooka branches: 1.3.4;
* fix thinko in mace_print() to prevent intr with value MACECF_INTR_DEFAULT
from getting printed
* fetch device name from dv_xname instead of using hardcoded value
 1.2 08-Jul-2001  thorpej branches: 1.2.2;
- Use the identifier strings that are fetched by the MI ARC BIOS
code.
- Garbage-collect some non-useful stuff from the mainbus_attach_args.
 1.1 14-Jun-2000  soren branches: 1.1.4; 1.1.6;
A start at O2 support..
 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 14-Jun-2000  bouyer file mace.c was added on branch thorpej_scsipi on 2000-11-20 20:23:42 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 14-Jun-2000  minoura file mace.c was added on branch minoura-xpg4dl on 2000-06-22 17:03:04 +0000
 1.2.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.4.5 07-Jan-2003  thorpej Sync with HEAD.
 1.3.4.4 03-Jan-2003  thorpej Sync with HEAD.
 1.3.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.3.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.4.1 11-Oct-2001  nathanw file mace.c was added on branch nathanw_sa on 2002-04-01 07:42:20 +0000
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7 18-Jan-2004  sekiya Following the example of the hpc/, gio/, and ioc/ directories, move the
mace devices to their own mace/ directory. Alter conf/files.sgimips to
reflect this change in a sane manner (i.e., pull in dev/files.dev and
mace/files.mace when appropriate).

At the same time, allow crime_intr_establish() to fall through to
mace_intr_establish(). mace devices now call cpu_intr_establish().
 1.6 17-Nov-2003  keihan www.netbsd.org -> www.NetBSD.org
 1.5 05-Oct-2003  tsutsui Apply a bunch of patches written by Christopher SEKIYA
(with several cosmetic changes by me) which fixes O2 (IP32) support.

Now my R5000 O2 works fine in multiuser with on-board AIC7880 SCSIs
and several PCI network cards (but only on serial console yet).
L2 cache on R5000/Rm5200 is still disabled for now, but it will be
fixed later, hopefully.

See recent discussion on port-sgimips for details.
 1.4 04-Oct-2003  tsutsui TAB/space cleanup.
 1.3 23-Dec-2002  pooka branches: 1.3.2;
MACE register definitions

from Chris Sekiya
 1.2 13-Mar-2002  simonb Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.1 14-Jun-2000  soren branches: 1.1.4; 1.1.6; 1.1.10; 1.1.14;
A start at O2 support..
 1.1.14.2 29-Dec-2002  thorpej Sync with HEAD.
 1.1.14.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.10.1 16-Mar-2002  jdolecek Catch up with -current.
 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 14-Jun-2000  bouyer file macereg.h was added on branch thorpej_scsipi on 2000-11-20 20:23:42 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 14-Jun-2000  minoura file macereg.h was added on branch minoura-xpg4dl on 2000-06-22 17:03:04 +0000
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6 18-Jan-2004  sekiya Following the example of the hpc/, gio/, and ioc/ directories, move the
mace devices to their own mace/ directory. Alter conf/files.sgimips to
reflect this change in a sane manner (i.e., pull in dev/files.dev and
mace/files.mace when appropriate).

At the same time, allow crime_intr_establish() to fall through to
mace_intr_establish(). mace devices now call cpu_intr_establish().
 1.5 17-Nov-2003  keihan www.netbsd.org -> www.NetBSD.org
 1.4 05-Oct-2003  tsutsui Apply a bunch of patches written by Christopher SEKIYA
(with several cosmetic changes by me) which fixes O2 (IP32) support.

Now my R5000 O2 works fine in multiuser with on-board AIC7880 SCSIs
and several PCI network cards (but only on serial console yet).
L2 cache on R5000/Rm5200 is still disabled for now, but it will be
fixed later, hopefully.

See recent discussion on port-sgimips for details.
 1.3 03-Jan-2003  rafal branches: 1.3.2;
Checkpoint of O2 work by Chris Sekiya and myself. This is the sgimips bit;
still needs some arch/mips support code before it will fully work.
 1.2 13-Mar-2002  simonb Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.1 14-Jun-2000  soren branches: 1.1.4; 1.1.6; 1.1.10; 1.1.14;
A start at O2 support..
 1.1.14.2 07-Jan-2003  thorpej Sync with HEAD.
 1.1.14.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.10.1 16-Mar-2002  jdolecek Catch up with -current.
 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 14-Jun-2000  bouyer file macevar.h was added on branch thorpej_scsipi on 2000-11-20 20:23:42 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 14-Jun-2000  minoura file macevar.h was added on branch minoura-xpg4dl on 2000-06-22 17:03:05 +0000
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13 18-Jan-2004  sekiya Following the example of the hpc/, gio/, and ioc/ directories, move the
mace devices to their own mace/ directory. Alter conf/files.sgimips to
reflect this change in a sane manner (i.e., pull in dev/files.dev and
mace/files.mace when appropriate).

At the same time, allow crime_intr_establish() to fall through to
mace_intr_establish(). mace devices now call cpu_intr_establish().
 1.12 25-Oct-2003  chs NULL -> 0
 1.11 05-Oct-2003  tsutsui Apply a bunch of patches written by Christopher SEKIYA
(with several cosmetic changes by me) which fixes O2 (IP32) support.

Now my R5000 O2 works fine in multiuser with on-board AIC7880 SCSIs
and several PCI network cards (but only on serial console yet).
L2 cache on R5000/Rm5200 is still disabled for now, but it will be
fixed later, hopefully.

See recent discussion on port-sgimips for details.
 1.10 04-Oct-2003  tsutsui TAB/space cleanup.
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 19-Jan-2003  rafal branches: 1.8.2;
Update to use the full DS1687 register set, therefore allowing the clock to
store absolute year rather than an offset -- this means the clock is now
consitent across the ARCS PROM, IRIX and NetBSD.

XXX: This attachment is now a mismoner, since it's a Dallas Semi RTC, not
a Motorola RTC. Should be renamed.
 1.7 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 14-Jan-2002  pooka slight last-minute typo here
 1.3 14-Jan-2002  pooka make RTC year IRIX semantics adjustments a macro
 1.2 25-Nov-2001  soren branches: 1.2.2; 1.2.4;
Forgot pooka's license header.
 1.1 25-Nov-2001  soren O2 RTC attachment, based on code from Antti Kantee.
 1.2.4.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.1 25-Nov-2001  thorpej file mcclock_mace.c was added on branch kqueue on 2002-01-10 19:48:25 +0000
 1.2.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.2.1 25-Nov-2001  nathanw file mcclock_mace.c was added on branch nathanw_sa on 2002-01-08 00:27:26 +0000
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.10 18-Jan-2004  sekiya Following the example of the hpc/, gio/, and ioc/ directories, move the
mace devices to their own mace/ directory. Alter conf/files.sgimips to
reflect this change in a sane manner (i.e., pull in dev/files.dev and
mace/files.mace when appropriate).

At the same time, allow crime_intr_establish() to fall through to
mace_intr_establish(). mace devices now call cpu_intr_establish().
 1.9 17-Nov-2003  keihan www.netbsd.org -> www.NetBSD.org
 1.8 17-Oct-2003  sekiya Mouse port offset was incorrect.
 1.7 05-Oct-2003  tsutsui Apply a bunch of patches written by Christopher SEKIYA
(with several cosmetic changes by me) which fixes O2 (IP32) support.

Now my R5000 O2 works fine in multiuser with on-board AIC7880 SCSIs
and several PCI network cards (but only on serial console yet).
L2 cache on R5000/Rm5200 is still disabled for now, but it will be
fixed later, hopefully.

See recent discussion on port-sgimips for details.
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Add trailing ; to CFATTACH_DECL.
 1.4 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 13-Mar-2002  simonb Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.1 29-Jun-2000  soren branches: 1.1.2; 1.1.6; 1.1.10;
Just a stub. Needs different register accesses than other 8-bit MACE
deviecs..
 1.1.10.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.6.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.1 16-Mar-2002  jdolecek 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 29-Jun-2000  bouyer file pckbc_mace.c was added on branch thorpej_scsipi on 2000-11-20 20:23:42 +0000
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.19 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.18 24-Apr-2021  thorpej branches: 1.18.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.17 18-Feb-2015  macallan branches: 1.17.32;
switch sgimips to common bus_dma and bus_space in arch/mips/
Tested on O2 and Indy.
Things that are compile-tested only for lack of hardware:
- GIO ethernet cards with PCI bridges
- IP2x hardware not found on Indy
- IP1x
 1.16 27-Oct-2012  chs branches: 1.16.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.15 01-Jul-2011  dyoung branches: 1.15.2; 1.15.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.14 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
Deal with arcbios calls being O32 and kernels being N32/N64.
Need to save/restore T8 across arcbios calls.
 1.13 23-Aug-2008  tsutsui branches: 1.13.12; 1.13.16; 1.13.22; 1.13.24;
KNF and misc cosmetics.
 1.12 27-Dec-2006  rumble branches: 1.12.44; 1.12.48; 1.12.50; 1.12.54;
Catch and report bus errors.
 1.11 30-Aug-2006  rumble branches: 1.11.2;
Add pic and imc-specific functions to alter the GIO bus arbiter
configuration. These are to be used exclusively by a higher interface in
gio/gio.c.

Also add functions to enable, disable and query the state of SysAd bus
parity detection since certain gio(4) cards need to be able to disable
it in order to work around their own buggy implementations.
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.8; 1.10.18;
merge ktrace-lwp.
 1.9 12-Nov-2004  sekiya branches: 1.9.12;
Print board identification, same as we do on the IP2x machines.
 1.8 13-Jun-2004  rumble branches: 1.8.2;
General cleanup to improve style consistency and KNF adherence.
Updated comments and removed superfluous code. No functional
change intended.

ok'd by pooka and sekiya
 1.7 11-Apr-2004  pooka RCS Id police
 1.6 10-Apr-2004  pooka and finally, the big moment you've all been waiting for:
make it actually compile
 1.5 10-Apr-2004  pooka fix off-by-one in revision print
 1.4 10-Apr-2004  pooka add watchdog enable and disable

from Steve Rumble
 1.3 13-Jan-2004  sekiya branches: 1.3.2;
Assign memory controller-dependent watchdog reset functions to
platform.watchdog_reset.
 1.2 13-Jan-2004  sekiya As the platform-specific bus reset routine varies based on the memory
controller used, set it in the memory controller driver rather than the
platform init code.
 1.1 12-Jan-2004  sekiya Add pic (memory controller for IP12) driver. Originally written by
Steve Rumble, with mostly stylistic changes by myself.
 1.3.2.4 23-Jul-2004  tron Pull up revision 1.7 (requested by rumble in ticket #682):
RCS Id police
 1.3.2.3 23-Jul-2004  tron Pull up revision 1.6 (requested by rumble in ticket #682):
and finally, the big moment you've all been waiting for:
make it actually compile
 1.3.2.2 23-Jul-2004  tron Pull up revision 1.5 (requested by rumble in ticket #682):
fix off-by-one in revision print
 1.3.2.1 23-Jul-2004  tron Pull up revision 1.4 (requested by rumble in ticket #682):
add watchdog enable and disable
from Steve Rumble
 1.8.2.5 14-Nov-2004  skrll Sync with HEAD.
 1.8.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.2 03-Aug-2004  skrll Sync with HEAD
 1.8.2.1 13-Jun-2004  skrll file pic.c was added on branch ktrace-lwp on 2004-08-03 10:40:00 +0000
 1.9.12.1 30-Dec-2006  yamt sync with head.
 1.10.18.1 10-Sep-2006  tron Pull up following revision(s) (requested by rumble in ticket #137):
sys/arch/sgimips/dev/imc.c: revision 1.26
sys/arch/sgimips/dev/files.dev: revision 1.6
sys/arch/sgimips/dev/pic.c: revision 1.11
sys/arch/sgimips/dev/imcvar.h: revision 1.1
Add pic and imc-specific functions to alter the GIO bus arbiter
configuration. These are to be used exclusively by a higher interface in
gio/gio.c.
Also add functions to enable, disable and query the state of SysAd bus
parity detection since certain gio(4) cards need to be able to disable
it in order to work around their own buggy implementations.
 1.10.8.1 03-Sep-2006  yamt sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.2.1 12-Jan-2007  ad Sync with head.
 1.12.54.1 19-Oct-2008  haad Sync with HEAD.
 1.12.50.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.12.48.1 04-May-2009  yamt sync with head.
 1.12.44.1 28-Sep-2008  mjf Sync with HEAD.
 1.13.24.1 05-Mar-2011  bouyer Sync with HEAD
 1.13.22.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.16.1 05-Mar-2011  rmind sync with head
 1.13.12.1 29-Dec-2010  matt Adapt sgimips to the interrupt framework.
 1.15.12.2 03-Dec-2017  jdolecek update from HEAD
 1.15.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.15.2.1 30-Oct-2012  yamt sync with head
 1.16.14.1 06-Apr-2015  skrll Sync with HEAD
 1.17.32.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.18.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 08-Mar-2006  lukem Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.4 11-Dec-2005  christos branches: 1.4.4; 1.4.6; 1.4.8; 1.4.10;
merge ktrace-lwp.
 1.3 18-Oct-2005  tsutsui TAB/space cleanup.
 1.2 10-Apr-2004  pooka branches: 1.2.2; 1.2.14;
Add physical offsets for memory configuration registers to be used
outside bus_space.
 1.1 12-Jan-2004  sekiya branches: 1.1.2;
Add pic (memory controller for IP12) driver. Originally written by
Steve Rumble, with mostly stylistic changes by myself.
 1.1.2.1 23-Jul-2004  tron Pull up revision 1.2 (requested by rumble in ticket #682):
Add physical offsets for memory configuration registers to be used
outside bus_space.
 1.2.14.1 21-Jun-2006  yamt sync with head.
 1.2.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.2 03-Aug-2004  skrll Sync with HEAD
 1.2.2.1 10-Apr-2004  skrll file picreg.h was added on branch ktrace-lwp on 2004-08-03 10:40:00 +0000
 1.4.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.4.8.1 13-Mar-2006  yamt sync with head.
 1.4.6.1 22-Apr-2006  simonb Sync with head.
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.11 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.10 26-Oct-2022  riastradh sgimips/scn(4): Convert to ttylock/ttyunlock.
 1.9 04-Oct-2022  rin Remove unused extern declaration of constty.
 1.8 04-Apr-2015  macallan don't malloc a tiny, fixed size buffer to scribble into, then not use it
and never free it either

found by Brainy
 1.7 25-Jul-2014  dholland branches: 1.7.2; 1.7.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.6 24-Mar-2014  christos branches: 1.6.2;
- use cpu_{g,s}etmodel
- fix unused
 1.5 16-Mar-2014  dholland Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.4 27-Oct-2012  chs branches: 1.4.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.3 24-Apr-2011  rmind branches: 1.3.4; 1.3.14;
Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.2 21-Nov-2009  rmind branches: 1.2.4; 1.2.6;
Use lwp_getpcb() on mips, powerpc and sh3, clean from struct user usage.
 1.1 10-Feb-2009  rumble branches: 1.1.2; 1.1.4; 1.1.6;
Check in work in progress of Personal IRIS 4D/20 and 4D/25 support (IP6
and IP10, respectively).
 1.1.6.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.6.1 10-Feb-2009  jym file scn.c was added on branch jym-xensuspend on 2009-05-13 17:18:18 +0000
 1.1.4.3 11-Mar-2010  yamt sync with head
 1.1.4.2 04-May-2009  yamt sync with head.
 1.1.4.1 10-Feb-2009  yamt file scn.c was added on branch yamt-nfs-mp on 2009-05-04 08:11:49 +0000
 1.1.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.1.2.1 10-Feb-2009  skrll file scn.c was added on branch nick-hppapmap on 2009-03-03 18:29:13 +0000
 1.2.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.4.1 31-May-2011  rmind sync with head
 1.3.14.3 03-Dec-2017  jdolecek update from HEAD
 1.3.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.4.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.3.4.1 30-Oct-2012  yamt sync with head
 1.4.2.1 18-May-2014  rmind sync with head
 1.6.2.1 10-Aug-2014  tls Rebase.
 1.7.4.1 06-Apr-2015  skrll Sync with HEAD
 1.7.2.1 16-May-2015  snj Pull up following revision(s) (requested by maxv in ticket #761):
sys/arch/sgimips/dev/scn.c: revision 1.8
sys/arch/sgimips/mace/macekbc.c: revision 1.8
sys/dev/hpc/hpcfb.c: revision 1.59
sys/dev/i2c/i2c.c: revision 1.47
sys/dev/ic/mfi.c: revision 1.57
sys/dev/if_ndis/if_ndis_pci.c: revision 1.21
sys/dev/sysmon/sysmon_power.c: revisions 1.50-1.52
sys/dev/usb/umass_isdata.c: revision 1.31
fix double free, found by Brainy.
--
Free cmd on error if we allocated it.
Found by Brainy, reported by maxv@.
--
don't leak rl (but there are other leaks), found by Brainy.
--
Free ped if we can't hand it to the power daemon.
Found by Brainy, reported by maxv@.
--
don't forget to free the dictionary.
--
another missing free dict.
--
fix leak, found by Brainy.
--
don't malloc a tiny, fixed size buffer to scribble into, then not use it
and never free it either
found by Brainy
--
malloc() -> kmem_alloc() for private data, also kmem_free() them if we
don't finish attaching for whatever reason
found by Brainy
 1.1 10-Feb-2009  rumble branches: 1.1.2; 1.1.4; 1.1.6;
Check in work in progress of Personal IRIS 4D/20 and 4D/25 support (IP6
and IP10, respectively).
 1.1.6.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.6.1 10-Feb-2009  jym file scnreg.h was added on branch jym-xensuspend on 2009-05-13 17:18:18 +0000
 1.1.4.2 04-May-2009  yamt sync with head.
 1.1.4.1 10-Feb-2009  yamt file scnreg.h was added on branch yamt-nfs-mp on 2009-05-04 08:11:49 +0000
 1.1.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.1.2.1 10-Feb-2009  skrll file scnreg.h was added on branch nick-hppapmap on 2009-03-03 18:29:13 +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 10-Feb-2009  rumble branches: 1.1.2; 1.1.4; 1.1.6; 1.1.18; 1.1.28;
Check in work in progress of Personal IRIS 4D/20 and 4D/25 support (IP6
and IP10, respectively).
 1.1.28.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.18.1 30-Oct-2012  yamt sync with head
 1.1.6.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.6.1 10-Feb-2009  jym file scnvar.h was added on branch jym-xensuspend on 2009-05-13 17:18:18 +0000
 1.1.4.2 04-May-2009  yamt sync with head.
 1.1.4.1 10-Feb-2009  yamt file scnvar.h was added on branch yamt-nfs-mp on 2009-05-04 08:11:49 +0000
 1.1.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.1.2.1 10-Feb-2009  skrll file scnvar.h was added on branch nick-hppapmap on 2009-03-03 18:29:13 +0000
 1.5 26-Dec-2006  rumble Make backspace and control keys work.

XXX: Why does KS_BackSpace not do what we want? We're copying pckbd now...
 1.4 11-Dec-2005  christos branches: 1.4.20;
merge ktrace-lwp.
 1.3 18-Oct-2005  tsutsui TAB/space cleanup.
 1.2 29-Sep-2004  sekiya branches: 1.2.12;
Use C-style comments.
 1.1 08-Jul-2004  sekiya branches: 1.1.2;
Add support for keyboard and mouse attachments at zs*, used on IP12 and IP20.
Code written by Steve Rumble; committed with his blessing.

Using a glass TTY as a console on IP20 (IP12 untested) should now be possible.
 1.1.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.5 19-Oct-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 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 08-Jul-2004  skrll file wskbdmap_sgi.c was added on branch ktrace-lwp on 2004-08-03 10:40:00 +0000
 1.2.12.2 30-Dec-2006  yamt sync with head.
 1.2.12.1 21-Jun-2006  yamt sync with head.
 1.4.20.1 12-Jan-2007  ad Sync with head.
 1.43 24-Oct-2023  andvar declare zskgdb() in zs.c, if KGBD option is enabled.

Fixes compilation issue with the KGBD option enabled for sgimips.
 1.42 11-Sep-2021  andvar Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
 1.41 07-Aug-2021  thorpej 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 18-Feb-2015  macallan branches: 1.39.32;
switch sgimips to common bus_dma and bus_space in arch/mips/
Tested on O2 and Indy.
Things that are compile-tested only for lack of hardware:
- GIO ethernet cards with PCI bridges
- IP2x hardware not found on Indy
- IP1x
 1.38 24-Mar-2014  christos branches: 1.38.6;
- use cpu_{g,s}etmodel
- fix unused
 1.37 20-Feb-2011  matt branches: 1.37.4; 1.37.14; 1.37.18;
Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
Deal with arcbios calls being O32 and kernels being N32/N64.
Need to save/restore T8 across arcbios calls.
 1.36 12-Feb-2009  rumble branches: 1.36.4; 1.36.6; 1.36.8;
Enable Personal IRIS 4D/20 and 4D/25 support:
- Adapt int(4) to handle the INT1 chip
- Move generic rtc clocks out of hpc/ and into dev/
- Handle the very strangely wired eeprom and other bits in arcemu
- Sprinkle MACH_SGI_IP6 as necessary
- Enable IP6/IP10 devices in GENERIC32_IP12. Yes, the naming is poor but
there's no winning with kernel/hw compatibility on sgimips...

Tested on my 4D/25. Doesn't (appear to) break macallan@'s IP22.
 1.35 13-Jun-2008  cegger branches: 1.35.4; 1.35.10;
use device_lookup_private to get softc
 1.34 28-Apr-2008  martin branches: 1.34.2; 1.34.4;
Remove clause 3 and 4 from TNF licenses
 1.33 29-Mar-2008  tsutsui branches: 1.33.2; 1.33.4;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.32 20-Nov-2007  ad branches: 1.32.14;
Use the softint API.
 1.31 09-Nov-2007  ad Call zs_lock_init() to set up the chanstate's lock.
 1.30 14-May-2006  elad branches: 1.30.18; 1.30.36; 1.30.38; 1.30.42; 1.30.44;
integrate kauth.
 1.29 28-Mar-2006  thorpej Use device_unit().
 1.28 11-Dec-2005  christos branches: 1.28.4; 1.28.6; 1.28.8; 1.28.10; 1.28.12;
merge ktrace-lwp.
 1.27 18-Oct-2005  tsutsui TAB/space cleanup.
 1.26 03-Jun-2005  martin branches: 1.26.2;
Constify
 1.25 29-Sep-2004  sekiya Use ANSI function declarations.
 1.24 08-Jul-2004  sekiya Add support for keyboard and mouse attachments at zs*, used on IP12 and IP20.
Code written by Steve Rumble; committed with his blessing.

Using a glass TTY as a console on IP20 (IP12 untested) should now be possible.
 1.23 10-Apr-2004  pooka At least my IP12 works better without the port-flipping glue,
so un-glueify IP12 for the time being.
 1.22 18-Jan-2004  sekiya branches: 1.22.2;
ANSIfy, de-__P(), add a little glue for IP12.
 1.21 14-Dec-2003  sekiya The serial controller on IP20 lives in a different place. Modify
zs_get_chan_addr() to reflect this.

XXX hardcoded addresses are quite distasteful. This should be passed in
through consinit() -- to avoid conflicts with Ilpo's soon-to-be-committed
framebuffer driver, I'll hold off until his code hits the tree.
 1.20 04-Oct-2003  tsutsui TAB/space cleanup.
 1.19 15-Jul-2003  lukem __KERNEL_RCSID()
 1.18 28-Jan-2003  pk branches: 1.18.2;
Provide locking required by the interrupt handlers running at IPL_SERIAL.
 1.17 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.16 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.15 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.14 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.13 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.12 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.11 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.10 02-May-2002  rafal branches: 1.10.2;
If we handle multiple events from the zs chip in one interrupt, don't count
that as multiple interrupts.
 1.9 17-Apr-2002  rafal Add event counter for zs interrupts and attach and use it; also, get the
zs major number out of the cdevsw table rather than hardcoding it in zs.c.
 1.8 13-Mar-2002  simonb Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.7 20-Nov-2001  lukem - pull in opt_kgdb.h where necessary
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for options KGDB_DEVNAME="\"com\""
- use correct quotes for options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
 1.6 18-Nov-2001  thorpej * Clean up HPC autoconfiguration a little. Pass device register and
DMA register offsets, as well as IRQ, to children. Use direct
config. Use machine type/subtype to determine which devices are
present.
* Add support for the second SCSI controller on the Indigo2.
 1.5 08-Jul-2001  thorpej branches: 1.5.2; 1.5.8;
bcopy -> memcpy, bzero -> memset
 1.4 08-Jul-2001  thorpej Use sys/dev/arcbios.
 1.3 07-Jul-2001  wdk - Finish off KGDB kernel debugger support for sgimips
 1.2 07-Jun-2001  thorpej branches: 1.2.2;
Don't use PCLK as the baud rate generator, as the Indy doens't
like that, and it has no effect on the Indigo2.
From Christopher SEKIYA <wileyc@rezrov.net>.

Also, query the "ConsoleOut" ARCS variable (i.e. "what the console
really is") rather than "console" ("what the console is configured
as").
 1.1 11-May-2001  thorpej Support for the SCC serial ports on Indigo2/Indy.

From Rafal K. Boni.
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.8.7 03-Jan-2003  thorpej Sync with HEAD.
 1.5.8.6 18-Oct-2002  nathanw Catch up to -current.
 1.5.8.5 17-Sep-2002  nathanw Catch up to -current.
 1.5.8.4 20-Jun-2002  nathanw Catch up to -current.
 1.5.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.5.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.8.1 08-Jul-2001  nathanw file zs.c was added on branch nathanw_sa on 2002-01-08 00:27:26 +0000
 1.5.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.5.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.5.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.2.2 08-Jun-2002  gehenna remove cdev_decl.
 1.10.2.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.18.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.2.4 19-Oct-2004  skrll Sync with HEAD
 1.18.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.18.2.1 03-Aug-2004  skrll Sync with HEAD
 1.22.2.1 23-Jul-2004  tron Pull up revision 1.23 (requested by rumble in ticket #682):
At least my IP12 works better without the port-flipping glue,
so un-glueify IP12 for the time being.
 1.26.2.3 07-Dec-2007  yamt sync with head
 1.26.2.2 15-Nov-2007  yamt sync with head.
 1.26.2.1 21-Jun-2006  yamt sync with head.
 1.28.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.28.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.28.8.1 01-Apr-2006  yamt sync with head.
 1.28.6.1 22-Apr-2006  simonb Sync with head.
 1.28.4.1 09-Sep-2006  rpaulo sync with head
 1.30.44.2 08-Dec-2007  mjf Sync with HEAD.
 1.30.44.1 19-Nov-2007  mjf Sync with HEAD.
 1.30.42.2 21-Nov-2007  bouyer Sync with HEAD
 1.30.42.1 13-Nov-2007  bouyer Sync with HEAD
 1.30.38.1 09-Jan-2008  matt sync with HEAD
 1.30.36.2 21-Nov-2007  joerg Sync with HEAD.
 1.30.36.1 11-Nov-2007  joerg Sync with HEAD.
 1.30.18.1 03-Dec-2007  ad Sync with HEAD.
 1.32.14.3 29-Jun-2008  mjf Sync with HEAD.
 1.32.14.2 02-Jun-2008  mjf Sync with HEAD.
 1.32.14.1 03-Apr-2008  mjf Sync with HEAD.
 1.33.4.2 04-May-2009  yamt sync with head.
 1.33.4.1 16-May-2008  yamt sync with head.
 1.33.2.2 17-Jun-2008  yamt sync with head.
 1.33.2.1 18-May-2008  yamt sync with head.
 1.34.4.1 18-Jun-2008  simonb Sync with head.
 1.34.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.35.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.35.4.1 03-Mar-2009  skrll Sync with HEAD.
 1.36.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.36.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.36.4.1 05-Mar-2011  rmind sync with head
 1.37.18.1 18-May-2014  rmind sync with head
 1.37.14.2 03-Dec-2017  jdolecek update from HEAD
 1.37.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.37.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.38.6.1 06-Apr-2015  skrll Sync with HEAD
 1.39.32.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.40.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.14 18-Sep-2021  tsutsui Remove unnecessary (and unimplemented) WSKBD_*BELL ioctls in kbd drivers.

It looks the only ioctl(4) to be implemented for WSKBDIO_*BELL in
the backend keyboard driver is WSKBDIO_COMPLEXBELL.
All other BELL ioctls (WSKBDIO_BELL, WSKBDIO_SETBELL, WSKBDIO_GETBELL,
WSKBDIO_SETDEFAULTBELL, and WSKBDIO_GETDEFAULTBELL) are handled in the
MI wskbd driver (in wskbd_displayioctl() in src/sys/dev/wscons/wskbd.c).
 1.13 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.12 24-Apr-2021  thorpej branches: 1.12.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.11 21-Nov-2020  thorpej branches: 1.11.2;
malloc(9) -> kmem(9)
 1.10 29-Oct-2012  chs branches: 1.10.50;
fix device/softc split errors.
 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 29-Mar-2008  tsutsui branches: 1.8.38; 1.8.48;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.7 04-Mar-2007  christos branches: 1.7.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.6 11-Dec-2005  christos branches: 1.6.26;
merge ktrace-lwp.
 1.5 18-Oct-2005  tsutsui TAB/space cleanup.
 1.4 20-Jul-2004  rumble branches: 1.4.2; 1.4.14;
KNF and consistency
 1.3 20-Jul-2004  rumble Allow for console attachment by statically allocating a softc
extension. Tweak cs_softreq when appending the transmit queue.
Finally, add a bit of debugging.
 1.2 20-Jul-2004  rumble Properly initialise the tx and rx queue head and tail positions.
 1.1 08-Jul-2004  sekiya Add support for keyboard and mouse attachments at zs*, used on IP12 and IP20.
Code written by Steve Rumble; committed with his blessing.

Using a glass TTY as a console on IP20 (IP12 untested) should now be possible.
 1.4.14.2 03-Sep-2007  yamt sync with head.
 1.4.14.1 21-Jun-2006  yamt sync with head.
 1.4.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.5 13-Jan-2005  skrll Adapt to branch
 1.4.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.2 03-Aug-2004  skrll Sync with HEAD
 1.4.2.1 20-Jul-2004  skrll file zs_kbd.c was added on branch ktrace-lwp on 2004-08-03 10:40:00 +0000
 1.6.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.7.40.1 03-Apr-2008  mjf Sync with HEAD.
 1.8.48.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.8.38.1 30-Oct-2012  yamt sync with head
 1.10.50.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.11.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.12.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.17 24-Oct-2023  andvar cast kgdb_dev to int as sun3, sgimips and sgimips64 have different types,
same %lld format specifier doesn't work for both.
 1.16 24-Oct-2023  andvar apply similar changes between different archs/machines for zs_kgdb.c:
1) adjust zs_kgdb_init tty attachment message for kgdb_dev type change.
(one arch uses cast to int instead, but kept one approach for consistency)
2) remove unused rr0 declaration and assignment in zs_kgdb_txint()
3) adjust kgdb_dev format specifier to %llx/d if needed.
4) add const for zs_kgdb_devname declaration (macppc only).
should fix zs_kgdb.c build for all these ports.
 1.15 18-Mar-2009  cegger branches: 1.15.44; 1.15.54;
Ansify function definitions w/o arguments. Generated with sed.
 1.14 28-Apr-2008  martin branches: 1.14.8; 1.14.14;
Remove clause 3 and 4 from TNF licenses
 1.13 06-Jan-2008  dsieger branches: 1.13.6; 1.13.8; 1.13.10;
Fix a typo: s/Kgdb_dev/kgdb_dev/
 1.12 17-Oct-2007  garbled branches: 1.12.2; 1.12.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.11 23-Jun-2007  hauke branches: 1.11.10;
Fix a warning from gcc 4 about stripping the volatile qualifier by a cast
by doing the proper __UNVOLATILE() dance.
 1.10 11-Dec-2005  christos branches: 1.10.30; 1.10.32; 1.10.38;
merge ktrace-lwp.
 1.9 29-Sep-2004  sekiya branches: 1.9.12;
Use ANSI function declarations.
 1.8 08-Jul-2004  sekiya Add support for keyboard and mouse attachments at zs*, used on IP12 and IP20.
Code written by Steve Rumble; committed with his blessing.

Using a glass TTY as a console on IP20 (IP12 untested) should now be possible.
 1.7 08-Feb-2004  sekiya de-__P.
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 06-Sep-2002  gehenna branches: 1.5.6;
Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.4 13-Mar-2002  simonb branches: 1.4.4;
Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.3 08-Jul-2001  thorpej branches: 1.3.2; 1.3.8;
bcopy -> memcpy, bzero -> memset
 1.2 07-Jul-2001  wdk - Finish off KGDB kernel debugger support for sgimips
 1.1 11-May-2001  thorpej branches: 1.1.2;
Support for the SCC serial ports on Indigo2/Indy.

From Rafal K. Boni.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.3.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.8.1 08-Jul-2001  nathanw file zs_kgdb.c was added on branch nathanw_sa on 2002-04-01 07:42:20 +0000
 1.3.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.4.4.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.5.6.4 19-Oct-2004  skrll Sync with HEAD
 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.12.2 21-Jan-2008  yamt sync with head
 1.9.12.1 03-Sep-2007  yamt sync with head.
 1.10.38.1 26-Jun-2007  garbled Sync with HEAD.
 1.10.32.1 11-Jul-2007  mjf Sync with head.
 1.10.30.1 15-Jul-2007  ad Sync with head.
 1.11.10.2 09-Jan-2008  matt sync with HEAD
 1.11.10.1 06-Nov-2007  matt sync with HEAD
 1.12.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.12.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.13.10.2 04-May-2009  yamt sync with head.
 1.13.10.1 16-May-2008  yamt sync with head.
 1.13.8.1 18-May-2008  yamt sync with head.
 1.13.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.15.54.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.15.44.1 20-Jul-2016  pgoyette Adapt the machine/arch dependent code to the new {b,c}devsw reference
counting.

XXX Most of these will require testing by someone other than myself, as
I have a limited selection of hardware!
 1.10 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.9 24-Apr-2021  thorpej branches: 1.9.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.8 27-Oct-2012  chs branches: 1.8.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.7 29-Mar-2008  tsutsui branches: 1.7.38; 1.7.48;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.6 04-Mar-2007  christos branches: 1.6.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.5 12-Nov-2006  plunky branches: 1.5.4;
Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.4 11-Dec-2005  christos branches: 1.4.20; 1.4.22;
merge ktrace-lwp.
 1.3 18-Oct-2005  tsutsui TAB/space cleanup.
 1.2 18-Oct-2005  tsutsui Pass proper values to MI wsmouse_input(9):
http://mail-index.netbsd.org/port-sgimips/2005/10/18/0000.html

Ok'ed by Steve Rumble.
 1.1 08-Jul-2004  sekiya branches: 1.1.2; 1.1.14;
Add support for keyboard and mouse attachments at zs*, used on IP12 and IP20.
Code written by Steve Rumble; committed with his blessing.

Using a glass TTY as a console on IP20 (IP12 untested) should now be possible.
 1.1.14.3 03-Sep-2007  yamt sync with head.
 1.1.14.2 30-Dec-2006  yamt sync with head.
 1.1.14.1 21-Jun-2006  yamt sync with head.
 1.1.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.5 13-Jan-2005  skrll Adapt to branch
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 08-Jul-2004  skrll file zs_ms.c was added on branch ktrace-lwp on 2004-08-03 10:40:01 +0000
 1.4.22.1 10-Dec-2006  yamt sync with head.
 1.4.20.1 18-Nov-2006  ad Sync with head.
 1.5.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.6.40.1 03-Apr-2008  mjf Sync with HEAD.
 1.7.48.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7.38.1 30-Oct-2012  yamt sync with head
 1.8.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.9.8.1 04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed