Home | History | Annotate | only in /src/sys/arch/mvme68k/dev
History log of /src/sys/arch/mvme68k/dev
RevisionDateAuthorComments
 1.8 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.7 31-May-2001  scw branches: 1.7.2; 1.7.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.6 24-Nov-2000  scw branches: 1.6.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.5 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.4 20-Jul-2000  scw Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.3 18-Mar-2000  scw branches: 1.3.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 13-Feb-1999  scw branches: 1.1.2;
file clmpcc_pcctwo.c was initially added on branch scw-mvme167.
 1.1.2.1 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.2.16.3 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.2.16.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.4.2 17-Oct-2000  scw Pullup 1.4 - 1.5 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.3.4.1 22-Jul-2000  scw Pullup from trunk: 1.4
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.6.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.7.8.1 31-May-2001  nathanw file clmpcc_pcctwo.c was added on branch nathanw_sa on 2002-02-28 04:10:49 +0000
 1.7.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.20 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.19 28-Apr-2008  martin branches: 1.19.34; 1.19.44;
Remove clause 3 and 4 from TNF licenses
 1.18 12-Jan-2008  tsutsui branches: 1.18.6; 1.18.8; 1.18.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.17 07-Jan-2008  tsutsui Add timecounter(9) support for mvme68k.

Based on a patch from Garrett D'Amore and several tweaks by me.
Compile tested only, but reviewed by joerg@ and
no objection from scw@ on port-mvme68k.
 1.16 11-Dec-2005  christos branches: 1.16.50; 1.16.56; 1.16.64;
merge ktrace-lwp.
 1.15 03-Jun-2005  scw branches: 1.15.2;
Placate -Wshadow
 1.14 15-Jul-2003  lukem __KERNEL_RCSID()
 1.13 02-Oct-2002  thorpej branches: 1.13.6;
Use CFATTACH_DECL().
 1.12 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.11 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.10 12-Aug-2001  scw branches: 1.10.6;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.9 06-Jul-2001  scw branches: 1.9.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.8 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.7 14-Apr-2001  scw Implement a real microtime() by reading the timer counter register.
On mvme147 this gives 6.25uS resolution, and 1uS on all other boards.
 1.6 18-Mar-2000  scw branches: 1.6.6;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.5 12-Jan-1998  thorpej branches: 1.5.16; 1.5.24;
Update for changes to config.
 1.4 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.3 19-Mar-1997  gwr branches: 1.3.4;
Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.2 12-Sep-1996  thorpej Grab the stat clock stuff from the SPARC port, and glue it to the
second timer on the PCC.
 1.1 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.3.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.24.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.5.24.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.5.16.2 21-Apr-2001  bouyer Sync with HEAD
 1.5.16.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.9.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.10.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.10.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.10.6.1 12-Aug-2001  nathanw file clock_pcc.c was added on branch nathanw_sa on 2002-02-28 04:10:49 +0000
 1.13.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.13.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.6.1 03-Aug-2004  skrll Sync with HEAD
 1.15.2.1 21-Jan-2008  yamt sync with head
 1.16.64.2 19-Jan-2008  bouyer Sync with HEAD
 1.16.64.1 08-Jan-2008  bouyer Sync with HEAD
 1.16.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.16.50.2 23-Mar-2008  matt sync with HEAD
 1.16.50.1 09-Jan-2008  matt sync with HEAD
 1.18.10.1 16-May-2008  yamt sync with head.
 1.18.8.1 18-May-2008  yamt sync with head.
 1.18.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.19.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.34.1 30-Oct-2012  yamt sync with head
 1.9 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.8 12-Aug-2001  scw branches: 1.8.6;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.7 06-Jul-2001  scw branches: 1.7.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.6 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.5 14-Apr-2001  scw Implement a real microtime() by reading the timer counter register.
On mvme147 this gives 6.25uS resolution, and 1uS on all other boards.
 1.4 06-Sep-2000  scw branches: 1.4.2;
Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.3 18-Mar-2000  scw branches: 1.3.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file clock_pcctwo.c was initially added on branch scw-mvme167.
 1.1.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.16.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.8.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.4.1 17-Oct-2000  scw Pullup 1.3 - 1.4 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.7.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.8.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.8.6.1 12-Aug-2001  nathanw file clock_pcctwo.c was added on branch nathanw_sa on 2002-02-28 04:10:49 +0000
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 18-Apr-1996  chuck branches: 1.1.68;
new driver: SCSI for VME147
contributed by: Steve Woodford <steve@mctavish.demon.co.uk>

this driver is based on the amiga sbic/33C93 driver. Steve has
cleaned it up and fixed lots of bugs. Note that the original driver
used features which require at least a WD33C93A (the vme147 has the
original WD33C93 chip <no 'A' suffix>). Steve has also written
the DMA routines for the 147 to get things really going. Hardware
scatter-gather DMA and sync. SCSI are not supported (yet). tested
on several disk drives and a tape drive. CD-ROM untested, but
should work.
 1.1.68.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.68.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.68.1 03-Aug-2004  skrll Sync with HEAD
 1.14 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.13 26-Nov-2001  fredette Added macros for the bits in the SYSBUS byte, and macros
for the i82596 PORT access interface, from the documentation
for that chip. These help clarify writes to the SYSBUS
part of the SCP, and PORT usage by i82596-aware drivers.
 1.12 07-Jul-2001  scw branches: 1.12.2; 1.12.8;
bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
 1.11 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.10 11-Mar-2001  scw Make this compile again; chan_attn() prototype has changed.
 1.9 22-Jan-2001  bjh21 branches: 1.9.2;
Patch from PR kern/8001, submitted by Rafal Boni.

This adds support for EtherExpress/16 cards with 16k of RAM, and in the
process adds general support for PIO mode on these cards. This entails
changing the way the i82586 driver handles bus barriers, since it doesn't
allow for strange cases like this.

This has been tested on the i386 port with the 'ix' driver in both
16KB (which was the source of the problem) and 32KB modes, as well
as with the 'ef' driver. I've tested it (briefly) with 'ei' on arm26
as well. In theory, drivers other than 'ix' should follow precisely the
same code paths as before.
 1.8 15-Sep-2000  scw Use the complete ethernet address stored in nvram on mvme162/mvme167
instead of faking the first 5 nibbles a'la mvme147.

Apparently recent mvme16x boards have a new 5 nibble prefix...
 1.7 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.6 25-Jul-2000  scw Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER.
 1.5 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.4 18-Mar-2000  scw branches: 1.4.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 08-Jul-1999  thorpej branches: 1.3.2; 1.3.10;
Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.2 14-Feb-1999  scw branches: 1.2.4;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file if_ie.c was initially added on branch scw-mvme167.
 1.1.2.4 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.3 31-Jan-1999  scw Add mvme68k/machdep.h and start populating with external
declarations for a couple of mvme68k globals.
Include the above file where necessary.
 1.1.2.2 31-Jan-1999  scw Make the ethernet packet buffer shared between the Lance and i82596
drivers.

While I'm here, make the packet buffer size adjustable, either with
a config file option or by patching a variable. Make sure to mark all
packet buffer pages as non-cacheable.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.4.1 02-Aug-1999  thorpej Update from trunk.
 1.3.10.5 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.3.10.4 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.3.10.3 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.3.10.2 13-Mar-2000  scw Add constraints for bus_dmamem_map() to allow allocation from onboard
RAM only, and/or restricting physical addresses to 24-bits.

Also make bus_dmamem_map() actually honour the BUS_DMA_COHERENT flag.
 1.3.10.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.3.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.3.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.3.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.4.1 17-Oct-2000  scw Pullup 1.6 - 1.8 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.9.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.9.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.12.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.12.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.12.8.1 07-Jul-2001  nathanw file if_ie.c was added on branch nathanw_sa on 2002-01-08 00:26:33 +0000
 1.12.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.12.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.4 26-Nov-2001  fredette Added macros for the bits in the SYSBUS byte, and macros
for the i82596 PORT access interface, from the documentation
for that chip. These help clarify writes to the SYSBUS
part of the SCP, and PORT usage by i82596-aware drivers.
 1.3 18-Mar-2000  scw branches: 1.3.8; 1.3.12;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 13-Feb-1999  scw branches: 1.1.2;
file if_iereg.h was initially added on branch scw-mvme167.
 1.1.2.1 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.12.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.12.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.3.8.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.37 29-May-2022  rin le(4): Fix resource leaks for error paths.

XXX
Compile test only (at least one arch per driver).
 1.36 19-Jan-2010  pooka Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

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

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.35 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.34 04-Apr-2008  tsutsui branches: 1.34.2; 1.34.4;
Split device_t/softc for le(4) and variants and misc cosmetic changes.
 1.33 12-Jan-2008  tsutsui branches: 1.33.6;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.32 04-Mar-2007  christos branches: 1.32.20; 1.32.26; 1.32.32;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.31 11-Dec-2005  christos branches: 1.31.26;
merge ktrace-lwp.
 1.30 07-Aug-2003  agc branches: 1.30.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.29 15-Jul-2003  lukem __KERNEL_RCSID()
 1.28 02-Apr-2003  thorpej branches: 1.28.2;
Use PAGE_SIZE rather than NBPG.
 1.27 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.26 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.25 31-May-2001  scw branches: 1.25.2; 1.25.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.24 30-May-2001  mrg use _KERNEL_OPT
 1.23 15-Sep-2000  scw branches: 1.23.2;
Use the complete ethernet address stored in nvram on mvme162/mvme167
instead of faking the first 5 nibbles a'la mvme147.

Apparently recent mvme16x boards have a new 5 nibble prefix...
 1.22 25-Jul-2000  scw Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER.
 1.21 18-Mar-2000  scw branches: 1.21.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.20 14-Feb-1999  scw branches: 1.20.8; 1.20.16;
Merge support for mvme167 into main tree.
 1.19 22-Aug-1998  scw branches: 1.19.6;
vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.18 15-Aug-1998  mycroft Assign my copyrights to TNF.
 1.17 21-Jul-1998  drochner adapt to LANCE driver split
 1.16 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.15 12-Jan-1998  thorpej Update for changes to config.
 1.14 19-Mar-1997  gwr Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.13 17-Mar-1997  thorpej #include <net/if_media.h>
 1.12 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.11 31-Jan-1997  thorpej branches: 1.11.4;
bootdv -> booted_device
 1.10 29-May-1996  chuck branches: 1.10.2;
detect if we are the boot device (to fix generic kernel)
 1.9 08-May-1996  thorpej branches: 1.9.4;
RCS id police.
 1.8 07-May-1996  thorpej Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.

Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.7 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.6 22-Apr-1996  christos Add a hardware dependent initialization function lehwinit()
 1.5 18-Apr-1996  cgd change LANCE copy & zero functions' names to start with amd7990_, and
remove their 'integrate' (usually defined to be 'static') keywords.
when lance drivers are split up by attachment, more than one file will
reference the copy/zero functions (i.e. not just the file that pulls in
am7990.c... and eventually inclusion of am7990.c should go away entirely).
 1.4 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.3 03-Feb-1996  mycroft Make sure to pull in the MI code.
 1.2 11-Dec-1995  mycroft Use the MI LANCE code.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.9.4.1 29-May-1996  chuck import generic boot bug fix
 1.10.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

These changes implement machine-independent root device and file system
selection. Notable features:

- All ports behave in a consistent manner regarding root
device selection.
- No more "options GENERIC"; all kernels have the ability
to boot with RB_ASKNAME to select root device and file system
type.
- Root file system type can be wildcarded; a machine-independent
function will try all possible file systems for the selected
root device until one succeeds.
- If the root file system fails to mount, the operator will
be given the chance to select a new root device and file
system type, rather than having the machine simply panic.
- nfs_mountroot() no longer panics if any part of the NFS
mount process fails; it now returns an error, giving the
operator a chance to recover.
- New, more consistent, config(8) grammar. The constructs:

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

config netbsd root on ? type ?
config netbsd root on ? type nfs

Additionally, the operator may select or wildcard root file
system type in the kernel configuration file:

config netbsd root on cd0a type cd9660

config(8) now requires that a "root" specification be
made. "root" may be wired down or wildcarded. "swap" and
"dump" specifications are optional, and follow previous
semantics.

- config(8) has a new "file-system" keyword, used to configure
file systems into the kernel. Eventually, this will be used
to generate the default vfssw[].

- "options NFSCLIENT" is obsolete, and is replaced by
"file-system NFS". "options NFSSERVER" still exists, since
NFS server support is independent of the NFS file system
client.

- sys/arch/<foo>/<foo>/swapgeneric.c is no longer used, and
will be removed; all information is now generated by config(8).

As of this commit, all ports except arm32 have been updated to use
the new setroot(). Only SPARC, i386, and Alpha ports have been
tested at this time. Port masters should test these changes on their
ports, and report any problems back to me.

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.11.4.2 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.11.4.1 05-Mar-1997  is Change to new ARP code.
 1.19.6.2 31-Jan-1999  scw Add mvme68k/machdep.h and start populating with external
declarations for a couple of mvme68k globals.
Include the above file where necessary.
 1.19.6.1 31-Jan-1999  scw Make the ethernet packet buffer shared between the Lance and i82596
drivers.

While I'm here, make the packet buffer size adjustable, either with
a config file option or by patching a variable. Make sure to mark all
packet buffer pages as non-cacheable.
 1.20.16.3 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.20.16.2 13-Mar-2000  scw Add constraints for bus_dmamem_map() to allow allocation from onboard
RAM only, and/or restricting physical addresses to 24-bits.

Also make bus_dmamem_map() actually honour the BUS_DMA_COHERENT flag.
 1.20.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.20.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.21.4.1 17-Oct-2000  scw Pullup 1.22 - 1.23 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.23.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.25.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.25.8.1 31-May-2001  nathanw file if_le.c was added on branch nathanw_sa on 2002-10-18 02:38:57 +0000
 1.25.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.28.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.28.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.28.2.1 03-Aug-2004  skrll Sync with HEAD
 1.30.16.2 21-Jan-2008  yamt sync with head
 1.30.16.1 03-Sep-2007  yamt sync with head.
 1.31.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.32.32.1 19-Jan-2008  bouyer Sync with HEAD
 1.32.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.32.20.1 23-Mar-2008  matt sync with HEAD
 1.33.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.34.4.2 11-Mar-2010  yamt sync with head
 1.34.4.1 16-May-2008  yamt sync with head.
 1.34.2.1 18-May-2008  yamt sync with head.
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.4 18-Mar-2000  scw branches: 1.4.28;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 08-May-1996  thorpej branches: 1.3.32; 1.3.40;
RCS id police.
 1.2 11-Dec-1995  mycroft Use the MI LANCE code.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.3.40.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.3.32.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.28.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.28.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.28.1 03-Aug-2004  skrll Sync with HEAD
 1.8 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.7 11-Dec-2005  christos branches: 1.7.74; 1.7.76; 1.7.78;
merge ktrace-lwp.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.5 31-May-2001  scw branches: 1.5.8; 1.5.24;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.4 18-Mar-2000  scw branches: 1.4.6;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 15-Aug-1998  mycroft branches: 1.3.14; 1.3.22;
Assign my copyrights to TNF.
 1.2 07-May-1996  thorpej Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.

Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.1 11-Dec-1995  mycroft Use the MI LANCE code.
 1.3.22.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.3.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.24.1 03-Aug-2004  skrll Sync with HEAD
 1.5.8.2 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.5.8.1 31-May-2001  scw file if_levar.h was added on branch nathanw_sa on 2001-05-31 18:46:08 +0000
 1.7.78.1 16-May-2008  yamt sync with head.
 1.7.76.1 18-May-2008  yamt sync with head.
 1.7.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.4 26-Apr-1996  chuck remove iio files; replaced by jason's new autoconfig scheme
 1.3 04-Apr-1996  cgd update for the fact that config_found() and config_rootfound() now
return pointers. (Check vs. NULL, rather than just boolean tests.)
 1.2 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.2 26-Apr-1996  chuck remove iio files; replaced by jason's new autoconfig scheme
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.8 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.7 23-Mar-2000  thorpej branches: 1.7.6; 1.7.8; 1.7.12;
New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.6 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.5 14-Feb-1999  scw branches: 1.5.8; 1.5.14; 1.5.16;
Merge support for mvme167 into main tree.
 1.4 15-Aug-1998  mycroft branches: 1.4.6;
Make copyright notices with my name consistent.
 1.3 12-Jan-1998  thorpej Update for changes to config.
 1.2 19-Mar-1997  gwr Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.1 09-Nov-1996  chuck - new lpt driver, contributed by Steve Woodford <steve@mctavish.demon.co.uk>
- added 1.1 and 1.2 compat to VME147 config file
 1.4.6.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.4.6.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.5.16.2 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.5.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.5.14.1 21-Dec-1999  wrstuden Initial commit of recent changes to make DEV_BSIZE go away.

Runs on i386, needs work on other arch's. Main kernel routines should be
fine, but a number of the stand programs need help.

cd, fd, ccd, wd, and sd have been updated. sd has been tested with non-512
byte block devices. vnd, raidframe, and lfs need work.

Non 2**n block support is automatic for LKM's and conditional for kernels
on "options NON_PO2_BLOCKS".
 1.5.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.7.8.1 16-Mar-2002  jdolecek Catch up with -current.
 1.7.6.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.12 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.11 07-Mar-2008  cube branches: 1.11.2; 1.11.4;
Split the softc from the device_t for all lpt(4) variants and attachments
except the ppbus stuff (which doesn't compile) and ulpt(4) which is
unrelated and can be dealt with separately.

As usual, it comes with related cosmetic changes.
 1.10 12-Jan-2008  tsutsui branches: 1.10.2; 1.10.6;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.9 11-Dec-2005  christos branches: 1.9.50; 1.9.56; 1.9.64;
merge ktrace-lwp.
 1.8 15-Jul-2003  lukem branches: 1.8.16;
__KERNEL_RCSID()
 1.7 02-Oct-2002  thorpej branches: 1.7.6;
Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.4 31-May-2001  scw branches: 1.4.2; 1.4.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.3 18-Mar-2000  scw branches: 1.3.6;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file lpt_pcc.c was initially added on branch scw-mvme167.
 1.1.2.3 14-Feb-1999  scw Fix typo.
 1.1.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.16.2 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.8.1 31-May-2001  nathanw file lpt_pcc.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +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.7.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.2 17-Mar-2008  yamt sync with head.
 1.8.16.1 21-Jan-2008  yamt sync with head
 1.9.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.9.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.9.50.1 23-Mar-2008  matt sync with HEAD
 1.10.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.10.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.10.2.1 24-Mar-2008  keiichi sync with head.
 1.11.4.1 16-May-2008  yamt sync with head.
 1.11.2.1 18-May-2008  yamt sync with head.
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 18-Mar-2000  scw branches: 1.3.130; 1.3.132; 1.3.134;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file lpt_pccreg.h was initially added on branch scw-mvme167.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.134.1 16-May-2008  yamt sync with head.
 1.3.132.1 18-May-2008  yamt sync with head.
 1.3.130.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.5 31-May-2001  scw branches: 1.5.2; 1.5.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.4 06-Sep-2000  scw branches: 1.4.2;
Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.3 18-Mar-2000  scw branches: 1.3.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file lpt_pcctwo.c was initially added on branch scw-mvme167.
 1.1.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.16.3 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.2.16.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.4.1 17-Oct-2000  scw Pullup 1.3 - 1.4 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.5.8.1 31-May-2001  nathanw file lpt_pcctwo.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.5.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.2 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.1 09-Nov-1996  chuck branches: 1.1.22;
- new lpt driver, contributed by Steve Woodford <steve@mctavish.demon.co.uk>
- added 1.1 and 1.2 compat to VME147 config file
 1.1.22.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.6 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.5 31-May-2001  scw branches: 1.5.2; 1.5.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.4 23-Mar-2000  thorpej branches: 1.4.6;
New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.3 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file lptvar.h was initially added on branch scw-mvme167.
 1.1.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.5.8.1 31-May-2001  nathanw file lptvar.h was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.5.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.24 18-Jan-2024  thorpej Don't put the MVME1xx model defines into IDENT, make them defflag options and
put them in opt_mvmeconf.h. Make these options depend on the appropriate
M680x0 option (MVME147 -> M68030, MVME16[27] -> M68040, MVME17[27] -> M68060)
so that the CPU option appears correctly in opt_m68k_arch.h.
 1.23 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.22 24-Apr-2021  thorpej branches: 1.22.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.21 05-Jun-2011  matt branches: 1.21.68;
struct device * -> device_t, struct cfdata * -> cfdata_t
CFATTACH_DECL(*, sizeof(struct device), -> CFATTACH_DECL_NEW(&, 0
 1.20 28-Apr-2008  martin branches: 1.20.22; 1.20.28; 1.20.32;
Remove clause 3 and 4 from TNF licenses
 1.19 12-Jan-2008  tsutsui branches: 1.19.6; 1.19.8; 1.19.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.18 11-Dec-2005  christos branches: 1.18.50; 1.18.56; 1.18.64;
merge ktrace-lwp.
 1.17 15-Jul-2003  lukem branches: 1.17.16;
__KERNEL_RCSID()
 1.16 01-Jan-2003  thorpej branches: 1.16.2;
Use aprint_normal() for cfprint routines.
 1.15 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.14 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.13 24-Mar-2002  scw Fix a botch from the dev/mvme split for kernels with no vmetwo in
the config file.
 1.12 17-Mar-2002  scw Fix an include file botch when there is no vmetwo device in the
kernel config.
 1.11 12-Aug-2001  scw branches: 1.11.6;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.10 27-Jul-2001  scw Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.9 06-Jul-2001  scw branches: 1.9.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.8 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.7 03-Dec-2000  scw branches: 1.7.2;
Revert the previous change, after discussion with thorpej and cgd.
 1.6 30-Nov-2000  scw Only try to attach those devices which have been configured
in the kernel config file.
 1.5 24-Nov-2000  scw Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.4 20-Nov-2000  scw branches: 1.4.2;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.3 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.2 18-Mar-2000  scw branches: 1.2.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 11-Mar-2000  scw branches: 1.1.2;
file mainbus.c was initially added on branch scw_mvme68k_bus_space.
 1.1.2.3 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.1.2.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.1.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.4.1 17-Oct-2000  scw Pullup 1.2 - 1.3 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.4.2.4 08-Dec-2000  bouyer Sync with HEAD.
 1.4.2.3 22-Nov-2000  bouyer Sync with HEAD.
 1.4.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.2.1 20-Nov-2000  bouyer file mainbus.c was added on branch thorpej_scsipi on 2000-11-20 20:15:17 +0000
 1.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.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.9.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.9.2.1 03-Aug-2001  lukem update to -current
 1.11.6.4 03-Jan-2003  thorpej Sync with HEAD.
 1.11.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.11.6.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.11.6.1 12-Aug-2001  nathanw file mainbus.c was added on branch nathanw_sa on 2002-04-01 07:41:20 +0000
 1.16.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.16.1 21-Jan-2008  yamt sync with head
 1.18.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.18.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.18.50.1 23-Mar-2008  matt sync with HEAD
 1.19.10.1 16-May-2008  yamt sync with head.
 1.19.8.1 18-May-2008  yamt sync with head.
 1.19.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.20.32.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.20.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.20.22.1 12-Jun-2011  rmind sync with head
 1.21.68.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.22.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 12-Aug-2001  scw branches: 1.6.6; 1.6.124; 1.6.126; 1.6.128;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.5 27-Jul-2001  scw Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.4 31-May-2001  scw branches: 1.4.2;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.3 24-Nov-2000  scw branches: 1.3.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.2 18-Mar-2000  scw branches: 1.2.6;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 11-Mar-2000  scw branches: 1.1.2;
file mainbus.h was initially added on branch scw_mvme68k_bus_space.
 1.1.2.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.1.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.6.3 08-Dec-2000  bouyer Sync with HEAD.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 18-Mar-2000  bouyer file mainbus.h was added on branch thorpej_scsipi on 2000-11-20 20:15:17 +0000
 1.3.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.4.2.1 03-Aug-2001  lukem update to -current
 1.6.128.1 16-May-2008  yamt sync with head.
 1.6.126.1 18-May-2008  yamt sync with head.
 1.6.124.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.6.2 12-Aug-2001  scw Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.6.6.1 12-Aug-2001  scw file mainbus.h was added on branch nathanw_sa on 2001-08-12 18:33:14 +0000
 1.10 24-Nov-2000  scw Use the MI md_root.c.
 1.9 22-Jul-2000  scw Include <sys/systm.h>, if only for printf() prototype.
 1.8 18-Mar-2000  scw branches: 1.8.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.7 17-Mar-1999  sommerfe branches: 1.7.8; 1.7.16;
defopt MINIROOTSIZE
 1.6 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.5 28-Dec-1996  pk branches: 1.5.10;
rename: ramdisk => md
 1.4 09-Dec-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.3 13-Oct-1996  christos backout previous kprintf change
 1.2 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.1 20-May-1996  chuck import rd_root from sun3
 1.5.10.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7.16.1 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.7.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.7.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.8.4.1 22-Jul-2000  scw Pullup from trunk: 1.9
Approved by: thorpej

Need to include <sys/systm.h> for printf() prototype.
 1.10 17-Mar-2002  scw G/C. These should have been deleted as part of the move to sys/dev/mvme.
 1.9 28-Jul-2001  scw branches: 1.9.6;
Hook the error interrupt only once, otherwise we'd fail when hooking
the interrupt for the 2nd DRAM board where two boards are present.
 1.8 27-Jul-2001  scw Blah, yet another nit: s/irq/ipl/
 1.7 27-Jul-2001  scw Don't bother trying to initiate a DRAM scrub on startup as it requires
frobbing with registers which are marked as "For Test Purposes [only]".
 1.6 27-Jul-2001  scw Remove Mistakenly Left In comments around some `#ifdef DIAGNOSTIC' tests.
 1.5 27-Jul-2001  scw Forgot to shift the DRAM Bank identifiers by four.
 1.4 27-Jul-2001  scw Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.3 31-May-2001  scw branches: 1.3.2;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.2 30-Nov-2000  scw branches: 1.2.2; 1.2.4;
Print some more details of the memory managed by each ASIC.
 1.1 24-Nov-2000  scw First cut of a driver for the Memory Controller ASICs found
on mvme16x and mvme17x boards.
 1.2.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.2.2.1 30-Nov-2000  bouyer file memc.c was added on branch thorpej_scsipi on 2000-12-08 09:28:30 +0000
 1.3.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.1 03-Aug-2001  lukem update to -current
 1.9.6.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.9.6.1 28-Jul-2001  nathanw file memc.c was added on branch nathanw_sa on 2002-04-01 07:41:20 +0000
 1.9 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.8 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.7 28-Apr-2008  martin branches: 1.7.34; 1.7.44;
Remove clause 3 and 4 from TNF licenses
 1.6 12-Jan-2008  tsutsui branches: 1.6.6; 1.6.8; 1.6.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.5 11-Dec-2005  christos branches: 1.5.50; 1.5.56; 1.5.64;
merge ktrace-lwp.
 1.4 15-Jul-2003  lukem branches: 1.4.16;
__KERNEL_RCSID()
 1.3 02-Oct-2002  thorpej branches: 1.3.6;
Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 12-Feb-2002  scw branches: 1.1.2; 1.1.8;
Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.1.8.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 12-Feb-2002  jdolecek file memc_68k.c was added on branch kqueue on 2002-03-16 15:58:52 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 12-Feb-2002  nathanw file memc_68k.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.1 21-Jan-2008  yamt sync with head
 1.5.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.5.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.5.50.1 23-Mar-2008  matt sync with HEAD
 1.6.10.1 16-May-2008  yamt sync with head.
 1.6.8.1 18-May-2008  yamt sync with head.
 1.6.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7.34.1 30-Oct-2012  yamt sync with head
 1.3 17-Mar-2002  scw G/C. These should have been deleted as part of the move to sys/dev/mvme.
 1.2 27-Jul-2001  scw branches: 1.2.6;
Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.1 24-Nov-2000  scw branches: 1.1.2; 1.1.6;
First cut of a driver for the Memory Controller ASICs found
on mvme16x and mvme17x boards.
 1.1.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.1 03-Aug-2001  lukem update to -current
 1.1.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.1.2.1 24-Nov-2000  bouyer file memcreg.h was added on branch thorpej_scsipi on 2000-12-08 09:28:30 +0000
 1.2.6.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.6.1 27-Jul-2001  nathanw file memcreg.h was added on branch nathanw_sa on 2002-04-01 07:41:20 +0000
 1.9 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.8 07-Aug-2001  scw branches: 1.8.6;
Change a post-decrement to a pre-decrement.
 1.7 31-May-2001  scw branches: 1.7.2;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.6 24-Nov-2000  scw branches: 1.6.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.5 19-Sep-2000  scw branches: 1.5.2;
Pass the requested cpu irq priority through to the VME chipset-specific
backend.

The VME2chip can use this to translate a VMEbus irq to a cpu irq.

The VMEchip (on mvme147) can't deal with the VMEbus irq and cpu irq
being different so we just panic in that case for now.
 1.4 21-Aug-2000  scw A VMEbus RAM board configured for use by mvme68k can now be
treated as just another available VMEbus slave image as far as
bus_dma(9) is concerned.

To preserve faster onboard memory, mvmebus_dmamem_alloc() will
allocate first from the offboard VMEbus RAM slave image if present,
and assuming its address modifier matches the caller's constraints.
This can be overidden by specifying the BUS_DMA_ONBOARD_RAM flag.
 1.3 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.2 20-Aug-2000  scw Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
. Get VMEbus slave mode going on mvme147. This should be easy.
. Fix up the A16 slave mappings.
. Bounce buffer support. (Messy, but pretty much a `must have'.)
. Figure out how to deal with `location monitor' interrupts
within the framework. (Useful for Busnet, among other things.)
. It would be nice to make use of the VMEchip2's DMA facilities...
 1.1 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.5.2.3 08-Dec-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 19-Sep-2000  bouyer file mvmebus.c was added on branch thorpej_scsipi on 2000-11-20 20:15:17 +0000
 1.6.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.7.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.8.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.8.6.1 07-Aug-2001  nathanw file mvmebus.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.7 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.6 31-May-2001  scw branches: 1.6.2; 1.6.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.5 24-Nov-2000  scw branches: 1.5.2;
Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.4 19-Sep-2000  scw branches: 1.4.2;
Pass the requested cpu irq priority through to the VME chipset-specific
backend.

The VME2chip can use this to translate a VMEbus irq to a cpu irq.

The VMEchip (on mvme147) can't deal with the VMEbus irq and cpu irq
being different so we just panic in that case for now.
 1.3 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.2 20-Aug-2000  scw Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
. Get VMEbus slave mode going on mvme147. This should be easy.
. Fix up the A16 slave mappings.
. Bounce buffer support. (Messy, but pretty much a `must have'.)
. Figure out how to deal with `location monitor' interrupts
within the framework. (Useful for Busnet, among other things.)
. It would be nice to make use of the VMEchip2's DMA facilities...
 1.1 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.4.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.4.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.2.1 19-Sep-2000  bouyer file mvmebus.h was added on branch thorpej_scsipi on 2000-11-20 20:15:17 +0000
 1.5.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.6.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.6.8.1 31-May-2001  nathanw file mvmebus.h was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.6.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.12 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.11 31-May-2001  scw branches: 1.11.2; 1.11.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.10 03-May-2001  scw G/C a printf which has moved to the MI code.
 1.9 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.8 25-Apr-2001  bouyer Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.7 20-Nov-2000  scw branches: 1.7.2;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.6 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.5 25-Jul-2000  scw Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER.
 1.4 18-Mar-2000  scw branches: 1.4.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 26-Feb-2000  scw branches: 1.3.2;
Include <machine/cpu.h> to make these compile again.
 1.2 21-Feb-1999  scw branches: 1.2.8;
Move scsi_nosync declaration into ncrsc_pcctwo since I've permanently
disabled sync negotiation in the 147's SBIC driver. (I could never make
it work). Also, don't enable bus-snooping with a 68060 based board.
 1.1 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.2.8.3 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.2.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.2.4 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.3.2.3 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.3.2.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.3.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.4.4.1 17-Oct-2000  scw Pullup 1.5 - 1.6 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.11.8.1 31-May-2001  nathanw file ncrsc_pcctwo.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.11.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.35 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.34 24-Apr-2021  thorpej branches: 1.34.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.33 29-Oct-2012  chs branches: 1.33.52;
fix device/softc split errors.
 1.32 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.31 01-Feb-2011  chuck branches: 1.31.4; 1.31.14;
udpate license clauses on my code to match the new-style BSD licenses.
remove no-longer-valid wustl email address for me.
based on diff that rmind@ sent me.

no functional change with this commit.
 1.30 28-Apr-2008  martin branches: 1.30.22; 1.30.28; 1.30.30;
Remove clause 3 and 4 from TNF licenses
 1.29 12-Jan-2008  tsutsui branches: 1.29.6; 1.29.8; 1.29.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.28 03-Dec-2007  ad branches: 1.28.6;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.27 11-Dec-2005  christos branches: 1.27.30; 1.27.48; 1.27.50; 1.27.56;
merge ktrace-lwp.
 1.26 03-Jun-2005  scw branches: 1.26.2;
Fix const fallout.
 1.25 15-Jul-2003  lukem __KERNEL_RCSID()
 1.24 06-Jan-2003  wiz branches: 1.24.2;
interrupt with two rs.
 1.23 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.22 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.21 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.20 12-Aug-2001  scw branches: 1.20.6;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.19 06-Jul-2001  scw branches: 1.19.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.18 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.17 03-Dec-2000  scw branches: 1.17.2;
Revert the previous change, after discussion with thorpej and cgd.
 1.16 30-Nov-2000  scw Only try to attach those devices which have been configured
in the kernel config file.
 1.15 24-Nov-2000  scw Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.14 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.13 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.12 14-Feb-1999  scw branches: 1.12.8; 1.12.16;
Merge support for mvme167 into main tree.
 1.11 12-Jan-1998  thorpej branches: 1.11.8;
Update for changes to config.
 1.10 05-Oct-1997  thorpej Copyright assigned to The NetBSD Foundation.
 1.9 19-Mar-1997  gwr branches: 1.9.4;
Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.8 13-Oct-1996  christos backout previous kprintf change
 1.7 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.6 12-Sep-1996  thorpej Update to use the new badaddr(); simplifies the code that attaches
pcc children somewhat.
 1.5 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.4 08-May-1996  thorpej RCS id police.
 1.3 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.2 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.9.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.11.8.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.12.16.4 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.12.16.3 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.12.16.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.12.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.12.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.12.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.17.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.19.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.19.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.20.6.4 07-Jan-2003  thorpej Sync with HEAD.
 1.20.6.3 03-Jan-2003  thorpej Sync with HEAD.
 1.20.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.20.6.1 12-Aug-2001  nathanw file pcc.c was added on branch nathanw_sa on 2002-10-18 02:38:57 +0000
 1.24.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.24.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.24.2.1 03-Aug-2004  skrll Sync with HEAD
 1.26.2.2 21-Jan-2008  yamt sync with head
 1.26.2.1 07-Dec-2007  yamt sync with head
 1.27.56.2 18-Feb-2008  mjf Sync with HEAD.
 1.27.56.1 08-Dec-2007  mjf Sync with HEAD.
 1.27.50.2 23-Mar-2008  matt sync with HEAD
 1.27.50.1 09-Jan-2008  matt sync with HEAD
 1.27.48.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.27.30.2 03-Dec-2007  ad Sync with HEAD.
 1.27.30.1 03-Dec-2007  ad Sync with HEAD.
 1.28.6.1 19-Jan-2008  bouyer Sync with HEAD
 1.29.10.1 16-May-2008  yamt sync with head.
 1.29.8.1 18-May-2008  yamt sync with head.
 1.29.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.30.30.1 08-Feb-2011  bouyer Sync with HEAD
 1.30.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.30.22.1 05-Mar-2011  rmind sync with head
 1.31.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.31.4.1 30-Oct-2012  yamt sync with head
 1.33.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.34.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.11 01-Feb-2011  chuck udpate license clauses on my code to match the new-style BSD licenses.
remove no-longer-valid wustl email address for me.
based on diff that rmind@ sent me.

no functional change with this commit.
 1.10 07-Jan-2008  tsutsui branches: 1.10.32; 1.10.38; 1.10.40;
Add timecounter(9) support for mvme68k.

Based on a patch from Garrett D'Amore and several tweaks by me.
Compile tested only, but reviewed by joerg@ and
no objection from scw@ on port-mvme68k.
 1.9 12-Aug-2001  scw branches: 1.9.6; 1.9.38; 1.9.100; 1.9.106; 1.9.114;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.8 14-Apr-2001  scw branches: 1.8.2;
Implement a real microtime() by reading the timer counter register.
On mvme147 this gives 6.25uS resolution, and 1uS on all other boards.
 1.7 20-Aug-2000  scw branches: 1.7.2;
Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.6 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.5 12-Sep-1996  thorpej branches: 1.5.30; 1.5.38;
Correct a comment, and add timer priming macros.
 1.4 08-May-1996  thorpej RCS id police.
 1.3 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.2 18-Apr-1996  chuck add PCC_ICLEAR
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.5.38.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.5.38.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.5.30.2 21-Apr-2001  bouyer Sync with HEAD
 1.5.30.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.9.114.1 08-Jan-2008  bouyer Sync with HEAD
 1.9.106.1 18-Feb-2008  mjf Sync with HEAD.
 1.9.100.1 09-Jan-2008  matt sync with HEAD
 1.9.38.1 21-Jan-2008  yamt sync with head
 1.9.6.2 12-Aug-2001  scw Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.9.6.1 12-Aug-2001  scw file pccreg.h was added on branch nathanw_sa on 2001-08-12 18:33:14 +0000
 1.10.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.10.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.32.1 05-Mar-2011  rmind sync with head
 1.17 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.16 12-Aug-2001  scw branches: 1.16.6;
Fix the clock device offset. (Overlooked in last commit)
 1.15 12-Aug-2001  scw Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.14 27-Jul-2001  scw Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.13 06-Jul-2001  scw branches: 1.13.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.12 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.11 03-May-2001  scw Attach `osiop' at pcctwo instead of `ncrsc'.
 1.10 01-May-2001  scw Match `osiop' instead of `ncrsc' now.
 1.9 03-Dec-2000  scw branches: 1.9.2;
Revert the previous change, after discussion with thorpej and cgd.
 1.8 30-Nov-2000  scw Only try to attach those devices which have been configured
in the kernel config file.
 1.7 24-Nov-2000  scw First cut of a driver for the Memory Controller ASICs found
on mvme16x and mvme17x boards.
 1.6 24-Nov-2000  scw Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.5 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.4 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.3 18-Mar-2000  scw branches: 1.3.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 14-Feb-1999  scw branches: 1.2.8; 1.2.16;
Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file pcctwo.c was initially added on branch scw-mvme167.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.2.16.4 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.2.16.3 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.2.16.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.2.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.8.3 08-Dec-2000  bouyer Sync with HEAD.
 1.2.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.4.1 17-Oct-2000  scw Pullup 1.3 - 1.4 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.9.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.13.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.13.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.13.2.1 03-Aug-2001  lukem update to -current
 1.16.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.16.6.1 12-Aug-2001  nathanw file pcctwo.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.12 19-Jan-2024  thorpej Make sure to include opt_mvmeconf.h.
 1.11 13-Mar-2019  martin Fix small (but fatal) oversight in device/softc split.
 1.10 27-Oct-2012  chs branches: 1.10.12; 1.10.30; 1.10.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.9 28-Apr-2008  martin branches: 1.9.34; 1.9.44;
Remove clause 3 and 4 from TNF licenses
 1.8 12-Jan-2008  tsutsui branches: 1.8.6; 1.8.8; 1.8.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.7 03-Dec-2007  ad branches: 1.7.6;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.6 11-Dec-2005  christos branches: 1.6.30; 1.6.48; 1.6.50; 1.6.56;
merge ktrace-lwp.
 1.5 03-Jun-2005  scw branches: 1.5.2;
Fix const fallout.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 02-Oct-2002  thorpej branches: 1.3.6;
Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 12-Feb-2002  scw branches: 1.1.2; 1.1.8;
Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.1.8.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 12-Feb-2002  jdolecek file pcctwo_68k.c was added on branch kqueue on 2002-03-16 15:58:53 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 12-Feb-2002  nathanw file pcctwo_68k.c was added on branch nathanw_sa on 2002-02-28 04:10:50 +0000
 1.3.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.5.2.2 21-Jan-2008  yamt sync with head
 1.5.2.1 07-Dec-2007  yamt sync with head
 1.6.56.2 18-Feb-2008  mjf Sync with HEAD.
 1.6.56.1 08-Dec-2007  mjf Sync with HEAD.
 1.6.50.2 23-Mar-2008  matt sync with HEAD
 1.6.50.1 09-Jan-2008  matt sync with HEAD
 1.6.48.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.6.30.2 03-Dec-2007  ad Sync with HEAD.
 1.6.30.1 03-Dec-2007  ad Sync with HEAD.
 1.7.6.1 19-Jan-2008  bouyer Sync with HEAD
 1.8.10.1 16-May-2008  yamt sync with head.
 1.8.8.1 18-May-2008  yamt sync with head.
 1.8.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.34.1 30-Oct-2012  yamt sync with head
 1.10.38.1 10-Jun-2019  christos Sync with HEAD
 1.10.30.1 13-Mar-2019  msaitoh Pull up following revision(s) (requested by martin in ticket #1213):
sys/arch/mvme68k/dev/pcctwo_68k.c: revision 1.11
Fix small (but fatal) oversight in device/softc split.
 1.10.12.1 13-Mar-2019  msaitoh Pull up following revision(s) (requested by martin in ticket #1685):
sys/arch/mvme68k/dev/pcctwo_68k.c: revision 1.11
Fix small (but fatal) oversight in device/softc split.
 1.11 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.10 12-Aug-2001  scw branches: 1.10.6;
Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
 1.9 27-Jul-2001  scw Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.8 14-Apr-2001  scw branches: 1.8.2;
Implement a real microtime() by reading the timer counter register.
On mvme147 this gives 6.25uS resolution, and 1uS on all other boards.
 1.7 24-Nov-2000  scw branches: 1.7.2;
First cut of a driver for the Memory Controller ASICs found
on mvme16x and mvme17x boards.
 1.6 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.5 25-Jul-2000  scw Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER.
 1.4 18-Mar-2000  scw branches: 1.4.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 20-Feb-1999  scw branches: 1.3.8; 1.3.16;
Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.2 14-Feb-1999  scw Merge support for mvme167 into main tree.
 1.1 30-Jan-1999  scw branches: 1.1.2;
file pcctworeg.h was initially added on branch scw-mvme167.
 1.1.2.2 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.1.2.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.3.16.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.3.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.3.8.3 21-Apr-2001  bouyer Sync with HEAD
 1.3.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.3.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.4.1 17-Oct-2000  scw Pullup 1.5 - 1.6 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.8.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.8.2.1 03-Aug-2001  lukem update to -current
 1.10.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.10.6.1 12-Aug-2001  nathanw file pcctworeg.h was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.6 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.5 31-May-2001  scw branches: 1.5.2; 1.5.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.4 24-Nov-2000  scw branches: 1.4.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.3 06-Sep-2000  scw branches: 1.3.2;
Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.2 18-Mar-2000  scw branches: 1.2.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 11-Mar-2000  scw branches: 1.1.2;
file pcctwovar.h was initially added on branch scw_mvme68k_bus_space.
 1.1.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.4.1 17-Oct-2000  scw Pullup 1.2 - 1.3 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.3.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.3.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.3.2.1 06-Sep-2000  bouyer file pcctwovar.h was added on branch thorpej_scsipi on 2000-11-20 20:15:18 +0000
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.5.8.1 31-May-2001  nathanw file pcctwovar.h was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.5.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.11 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.10 28-Apr-2008  martin branches: 1.10.34; 1.10.44;
Remove clause 3 and 4 from TNF licenses
 1.9 12-Jan-2008  tsutsui branches: 1.9.6; 1.9.8; 1.9.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.8 31-May-2001  scw branches: 1.8.8; 1.8.40; 1.8.102; 1.8.108; 1.8.116;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.7 24-Nov-2000  scw branches: 1.7.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.6 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.5 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.4 14-Feb-1999  scw branches: 1.4.8; 1.4.16;
Merge support for mvme167 into main tree.
 1.3 09-Oct-1997  jtc branches: 1.3.10;
Fix tipo inherited from old version of TNF copyright template.
 1.2 17-Jul-1997  jtk branches: 1.2.2;
use locator defines in "locators.h" to index cf_loc[]
 1.1 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.2.2.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.10.1 30-Jan-1999  scw Initial changes for upcoming MVME1[67]7 support.
 1.4.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.4.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.4.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.116.1 19-Jan-2008  bouyer Sync with HEAD
 1.8.108.1 18-Feb-2008  mjf Sync with HEAD.
 1.8.102.1 23-Mar-2008  matt sync with HEAD
 1.8.40.1 21-Jan-2008  yamt sync with head
 1.8.8.2 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.8.8.1 31-May-2001  scw file pccvar.h was added on branch nathanw_sa on 2001-05-31 18:46:09 +0000
 1.9.10.1 16-May-2008  yamt sync with head.
 1.9.8.1 18-May-2008  yamt sync with head.
 1.9.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.10.34.1 30-Oct-2012  yamt sync with head
 1.5 28-Dec-1996  pk rename: ramdisk => md
 1.4 09-Dec-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.3 13-Oct-1996  christos backout previous kprintf change
 1.2 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.1 20-May-1996  chuck import rd_root from sun3
 1.37 08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.36 09-Feb-2022  andvar branches: 1.36.10;
fix various typos in comments.
 1.35 08-Mar-2018  mrg fix various gcc6 m68k issues:
- bad indentation. next68k en.c and mvme68k le_poll.c fixes real issues
in error handling, the rest are NFCI.
- pass 68030 flags as appropriate for mvme68k.
- next68k nextrom.c has -Warray-bounds ignored for an odd expression
that appears to run before relocation, and needs manual offsets
added which trips bounds array checking.

with this all m68k ports build with GCC 6.
 1.34 24-Mar-2014  christos branches: 1.34.28;
use cpu_{g,s}etmodel
fix unused
 1.33 27-Oct-2012  chs branches: 1.33.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.32 12-Jan-2008  tsutsui branches: 1.32.44; 1.32.54;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.31 17-Oct-2007  garbled branches: 1.31.2; 1.31.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.30 09-Jul-2007  ad branches: 1.30.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.29 04-Mar-2007  christos branches: 1.29.2; 1.29.4; 1.29.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.28 08-Mar-2006  lukem branches: 1.28.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.27 11-Dec-2005  christos branches: 1.27.4; 1.27.6; 1.27.8; 1.27.10;
merge ktrace-lwp.
 1.26 03-Jun-2005  scw branches: 1.26.2;
Fix const fallout.
 1.25 01-Nov-2003  scw Quell an uninitialised variable warning.
 1.24 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.23 15-Jul-2003  lukem __KERNEL_RCSID()
 1.22 18-Jun-2003  drochner branches: 1.22.2;
don't #include <sys/dkstat.h> where it is (appearently) unused
 1.21 03-May-2003  wiz DMA, not dma nor Dma.
 1.20 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.19 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.18 22-Jul-2001  wiz branches: 1.18.6;
seperate -> separate
 1.17 07-Jul-2001  scw branches: 1.17.2;
bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
 1.16 25-Apr-2001  bouyer Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.15 29-Jun-2000  mrg branches: 1.15.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.14 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.13 23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.12 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.11 13-Nov-1999  scw branches: 1.11.2;
Make this work with the new scsibus mid-layer, using Ignatios' Amiga
fix as a reference.
 1.10 30-Sep-1999  thorpej branches: 1.10.2; 1.10.4; 1.10.8;
Update for SCSIPI changes.
 1.9 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.8 22-Aug-1998  scw vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.7 04-Jul-1998  jonathan defopt DDB.
 1.6 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.5 13-Oct-1996  christos branches: 1.5.8; 1.5.10;
backout previous kprintf change
 1.4 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.3 26-Aug-1996  thorpej Old-style disk instrumentation is long gone, buster!
 1.2 23-Apr-1996  chuck patch from: Steve Woodford <steve@mctavish.demon.co.uk>
fixes the following problems:
- Timeout on START/STOP unit command (ie. when spinning up the drive)
Side effect of this fix is to reduce the busy-wait time in CMD phase.

- Occasionally, the driver would lose an SBIC interrupt, especially when
a tape drive was re-selecting on a busy SCSI bus.
 1.1 18-Apr-1996  chuck new driver: SCSI for VME147
contributed by: Steve Woodford <steve@mctavish.demon.co.uk>

this driver is based on the amiga sbic/33C93 driver. Steve has
cleaned it up and fixed lots of bugs. Note that the original driver
used features which require at least a WD33C93A (the vme147 has the
original WD33C93 chip <no 'A' suffix>). Steve has also written
the DMA routines for the 147 to get things really going. Hardware
scatter-gather DMA and sync. SCSI are not supported (yet). tested
on several disk drives and a tape drive. CD-ROM untested, but
should work.
 1.5.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.10.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.4.1 15-Nov-1999  fvdl Sync with -current
 1.10.2.3 29-Mar-2001  bouyer Pass compile-test on i386
 1.10.2.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.10.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.11.2.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.15.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.17.2.1 03-Aug-2001  lukem update to -current
 1.18.6.2 11-Nov-2002  nathanw Catch up to -current
 1.18.6.1 22-Jul-2001  nathanw file sbic.c was added on branch nathanw_sa on 2002-11-11 22:01:23 +0000
 1.22.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.22.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.22.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.22.2.1 03-Aug-2004  skrll Sync with HEAD
 1.26.2.3 21-Jan-2008  yamt sync with head
 1.26.2.2 03-Sep-2007  yamt sync with head.
 1.26.2.1 21-Jun-2006  yamt sync with head.
 1.27.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.27.8.1 13-Mar-2006  yamt sync with head.
 1.27.6.1 22-Apr-2006  simonb Sync with head.
 1.27.4.1 09-Sep-2006  rpaulo sync with head
 1.28.16.1 12-Mar-2007  rmind Sync with HEAD.
 1.29.10.1 03-Oct-2007  garbled Sync with HEAD
 1.29.4.1 11-Jul-2007  mjf Sync with head.
 1.29.2.1 15-Jul-2007  ad Sync with head.
 1.30.10.2 23-Mar-2008  matt sync with HEAD
 1.30.10.1 06-Nov-2007  matt sync with HEAD
 1.31.8.1 19-Jan-2008  bouyer Sync with HEAD
 1.31.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.32.54.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.54.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.32.44.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.32.44.1 30-Oct-2012  yamt sync with head
 1.33.2.1 18-May-2014  rmind sync with head
 1.34.28.1 15-Mar-2018  pgoyette Synch with HEAD
 1.36.10.1 02-Aug-2025  perseant Sync with HEAD
 1.6 16-Sep-2021  andvar fix various typos, mainly in comments.
 1.5 12-Jan-2008  tsutsui Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.4 08-Mar-2006  lukem branches: 1.4.40; 1.4.46; 1.4.54;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.6; 1.3.8; 1.3.10;
merge ktrace-lwp.
 1.2 07-Aug-2003  agc branches: 1.2.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 18-Apr-1996  chuck branches: 1.1.68;
new driver: SCSI for VME147
contributed by: Steve Woodford <steve@mctavish.demon.co.uk>

this driver is based on the amiga sbic/33C93 driver. Steve has
cleaned it up and fixed lots of bugs. Note that the original driver
used features which require at least a WD33C93A (the vme147 has the
original WD33C93 chip <no 'A' suffix>). Steve has also written
the DMA routines for the 147 to get things really going. Hardware
scatter-gather DMA and sync. SCSI are not supported (yet). tested
on several disk drives and a tape drive. CD-ROM untested, but
should work.
 1.1.68.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.68.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.68.1 03-Aug-2004  skrll Sync with HEAD
 1.2.16.2 21-Jan-2008  yamt sync with head
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.3.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.3.8.1 13-Mar-2006  yamt sync with head.
 1.3.6.1 22-Apr-2006  simonb Sync with head.
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.4.54.1 19-Jan-2008  bouyer Sync with HEAD
 1.4.46.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.40.1 23-Mar-2008  matt sync with HEAD
 1.18 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.17 01-Jan-2022  andvar fix typos in comments, mainly basicly -> basically.
 1.16 24-Jul-2021  andvar Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.15 27-Oct-2012  chs branches: 1.15.54;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.14 12-Jan-2008  tsutsui branches: 1.14.44; 1.14.54;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.13 11-Dec-2005  christos branches: 1.13.50; 1.13.56; 1.13.64;
merge ktrace-lwp.
 1.12 07-Dec-2004  thorpej branches: 1.12.10;
Use "struct scsipi_command" in internal command structures so that
we have enough space for 16-byte CDBs.
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.10 03-May-2003  wiz branches: 1.10.2;
DMA, not dma nor Dma.
 1.9 14-May-2002  matt Eliminate commons (including many used ones). Clean up variable references.
 1.8 25-Apr-2001  bouyer branches: 1.8.2; 1.8.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.7 23-Mar-2000  thorpej branches: 1.7.6;
New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.6 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.5 19-Nov-1998  thorpej branches: 1.5.12; 1.5.20;
Adapt to the new scsipi_adapter interface.
 1.4 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.3 08-May-1996  thorpej branches: 1.3.10; 1.3.12;
RCS id police.
 1.2 26-Apr-1996  chuck nuke old isr structure (no longer use)
 1.1 18-Apr-1996  chuck new driver: SCSI for VME147
contributed by: Steve Woodford <steve@mctavish.demon.co.uk>

this driver is based on the amiga sbic/33C93 driver. Steve has
cleaned it up and fixed lots of bugs. Note that the original driver
used features which require at least a WD33C93A (the vme147 has the
original WD33C93 chip <no 'A' suffix>). Steve has also written
the DMA routines for the 147 to get things really going. Hardware
scatter-gather DMA and sync. SCSI are not supported (yet). tested
on several disk drives and a tape drive. CD-ROM untested, but
should work.
 1.3.12.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.10.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.5.20.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.5.20.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.5.12.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.5.12.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.8.8.1 25-Apr-2001  nathanw file sbicvar.h was added on branch nathanw_sa on 2002-06-20 03:39:59 +0000
 1.8.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.10.2.4 18-Dec-2004  skrll Sync with HEAD.
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.10.1 21-Jan-2008  yamt sync with head
 1.13.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.13.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.13.50.1 23-Mar-2008  matt sync with HEAD
 1.14.54.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.44.1 30-Oct-2012  yamt sync with head
 1.15.54.1 01-Aug-2021  thorpej Sync with HEAD.
 1.2 26-Apr-1996  chuck switched to MI driver
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.7 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.6 25-Apr-2001  bouyer Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.5 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.4 26-Feb-2000  scw branches: 1.4.2;
Include <machine/cpu.h> to make these compile again.
 1.3 30-Sep-1999  thorpej branches: 1.3.2;
Update for SCSIPI changes.
 1.2 10-Apr-1999  scw Put some delays around the SCSI bus reset code.
 1.1 20-Feb-1999  scw branches: 1.1.2;
Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.1.2.1 13-Apr-1999  scw branches: 1.1.2.1.2;
Pullup 1.2: Add some delay()s around the scsibus reset code.
 1.1.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3.2.3 29-Mar-2001  bouyer Pass compile-test on i386
 1.3.2.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.3.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.2.1 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.2 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.1 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.2 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.1 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.2 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.1 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.4 30-Apr-2001  scw Switch to the MI 53c710 driver recently committed by Izumi Tsutsui.
 1.3 25-Apr-2001  bouyer Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.2 21-Feb-1999  scw branches: 1.2.8;
Remove a comment of mine which no longer applies.
 1.1 20-Feb-1999  scw Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.2.8.1 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.13 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.12 29-Mar-2008  tsutsui branches: 1.12.2; 1.12.4;
Don't forget to initialize sc_dev.
 1.11 28-Mar-2008  tsutsui Split device_t and softc for MI mk48txx(4) and intersil7170(4) clocks,
and other related misc cosmetics.
 1.10 10-Jan-2008  tsutsui branches: 1.10.6;
- move todr_attach(9) calls from each MD attachment to MI mk48txx_attach()
- don't clear todr_setwen in mk48txx_attach() since it might be set by
MD attachments
 1.9 11-Dec-2005  christos branches: 1.9.50; 1.9.56; 1.9.64;
merge ktrace-lwp.
 1.8 01-Nov-2003  tsutsui branches: 1.8.16;
Adapt MI mk48txx(4) changes. (compiles but untested)
 1.7 18-Jul-2003  thorpej Rename clock_rtc_config() to todr_attach().
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 23-Feb-2002  scw Allow MD code to provide functions for reading/writing NVRAM/RTC
locations. If passed NULL, the old behaviour using bus_space_{read,write}_1()
is used. Otherwise, all access to the chip goes via the MD functions.

This is necessary for mvmeppc boards where the mk48txx NVRAM/RTC is not
directly addressable.
 1.2 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.1 12-Aug-2001  scw branches: 1.1.2; 1.1.8;
Time Keeper NVRAM driver.
 1.1.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.8.1 12-Aug-2001  nathanw file timekeeper.c was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.1.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.1.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.1.2.1 12-Aug-2001  thorpej file timekeeper.c was added on branch kqueue on 2001-08-25 06:15:36 +0000
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.1 21-Jan-2008  yamt sync with head
 1.9.64.1 10-Jan-2008  bouyer Sync with HEAD
 1.9.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.9.50.1 23-Mar-2008  matt sync with HEAD
 1.10.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.10.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.12.4.1 16-May-2008  yamt sync with head.
 1.12.2.1 18-May-2008  yamt sync with head.
 1.9 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.8 12-Jan-1998  thorpej branches: 1.8.16; 1.8.24;
Update for changes to config.
 1.7 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.6 19-Mar-1997  gwr branches: 1.6.4;
Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.5 09-Dec-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.4 13-Oct-1996  christos backout previous kprintf change
 1.3 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.2 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.1 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.6.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.8.24.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.8.16.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.27 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.26 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.25 16-Mar-2009  dsl branches: 1.25.12; 1.25.22;
ANSIfy functions with function-pointer arguments
 1.24 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.23 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.22 28-Apr-2008  martin branches: 1.22.8; 1.22.14;
Remove clause 3 and 4 from TNF licenses
 1.21 12-Jan-2008  tsutsui branches: 1.21.6; 1.21.8; 1.21.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.20 11-Dec-2005  christos branches: 1.20.50; 1.20.56; 1.20.64;
merge ktrace-lwp.
 1.19 13-Feb-2004  wiz branches: 1.19.16;
Uppercase CPU, plural is CPUs.
 1.18 15-Jul-2003  lukem __KERNEL_RCSID()
 1.17 02-Oct-2002  thorpej branches: 1.17.6;
Use CFATTACH_DECL().
 1.16 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.15 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.14 31-May-2001  scw branches: 1.14.2; 1.14.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.13 24-Nov-2000  scw branches: 1.13.2;
Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.12 19-Sep-2000  scw Pass the requested cpu irq priority through to the VME chipset-specific
backend.

The VME2chip can use this to translate a VMEbus irq to a cpu irq.

The VMEchip (on mvme147) can't deal with the VMEbus irq and cpu irq
being different so we just panic in that case for now.
 1.11 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.10 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.9 24-Jun-2000  scw Make these compile when DIAGNOSTIC isn't defined.
 1.8 04-Jun-2000  cgd branches: 1.8.2;
Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.7 18-Mar-2000  scw branches: 1.7.2;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.6 12-Jan-1998  thorpej branches: 1.6.16; 1.6.24;
Update for changes to config.
 1.5 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.4 19-Mar-1997  gwr branches: 1.4.4;
Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.3 13-Oct-1996  christos backout previous kprintf change
 1.2 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.1 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.4.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.6.24.6 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.6.24.5 18-Mar-2000  scw Fix local-bus offset of VMEbus windows.
 1.6.24.4 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.6.24.3 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.6.24.2 13-Mar-2000  scw One step closer to getting the VMEbus glue working on mvme167 ...
 1.6.24.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.6.16.2 08-Dec-2000  bouyer Sync with HEAD.
 1.6.16.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.8.2.1 25-Jun-2000  scw Pullup from trunk: 1.8-1.9
Authorised by: thorpej

GC an unused variable when DIAGNOSTIC and M68040 are undefined.
 1.13.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.14.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.14.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.14.8.1 31-May-2001  nathanw file vme_pcc.c was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.14.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.14.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.17.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.6.1 03-Aug-2004  skrll Sync with HEAD
 1.19.16.1 21-Jan-2008  yamt sync with head
 1.20.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.20.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.20.50.1 23-Mar-2008  matt sync with HEAD
 1.21.10.2 04-May-2009  yamt sync with head.
 1.21.10.1 16-May-2008  yamt sync with head.
 1.21.8.1 18-May-2008  yamt sync with head.
 1.21.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.22.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.22.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.25.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.25.12.1 30-Oct-2012  yamt sync with head
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 24-Nov-2000  scw branches: 1.5.126; 1.5.128; 1.5.130;
Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.4 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.3 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.2 09-Oct-1997  jtc branches: 1.2.18; 1.2.26;
Fix tipo inherited from old version of TNF copyright template.
 1.1 26-Apr-1996  chuck branches: 1.1.12;
- zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.1.12.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.2.26.2 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.2.26.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.18.2 08-Dec-2000  bouyer Sync with HEAD.
 1.2.18.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.130.1 16-May-2008  yamt sync with head.
 1.5.128.1 18-May-2008  yamt sync with head.
 1.5.126.1 02-Jun-2008  mjf Sync with HEAD.
 1.8 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.7 24-Nov-2000  scw branches: 1.7.126; 1.7.128; 1.7.130;
Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.6 21-Aug-2000  scw branches: 1.6.2;
A VMEbus RAM board configured for use by mvme68k can now be
treated as just another available VMEbus slave image as far as
bus_dma(9) is concerned.

To preserve faster onboard memory, mvmebus_dmamem_alloc() will
allocate first from the offboard VMEbus RAM slave image if present,
and assuming its address modifier matches the caller's constraints.
This can be overidden by specifying the BUS_DMA_ONBOARD_RAM flag.
 1.5 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.4 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.3 04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.2 18-Mar-2000  scw branches: 1.2.2;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 11-Mar-2000  scw branches: 1.1.2;
file vme_pccvar.h was initially added on branch scw_mvme68k_bus_space.
 1.1.2.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.1.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.2.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.6.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.6.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.2.1 21-Aug-2000  bouyer file vme_pccvar.h was added on branch thorpej_scsipi on 2000-11-20 20:15:19 +0000
 1.7.130.1 16-May-2008  yamt sync with head.
 1.7.128.1 18-May-2008  yamt sync with head.
 1.7.126.1 02-Jun-2008  mjf Sync with HEAD.
 1.15 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.14 06-Jul-2001  scw branches: 1.14.2; 1.14.8;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.13 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.12 24-Nov-2000  scw branches: 1.12.2;
Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.11 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.10 19-Sep-2000  scw Pass the requested cpu irq priority through to the VME chipset-specific
backend.

The VME2chip can use this to translate a VMEbus irq to a cpu irq.

The VMEchip (on mvme147) can't deal with the VMEbus irq and cpu irq
being different so we just panic in that case for now.
 1.9 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.8 23-Aug-2000  scw Though the VMEchip2 documentation is not explicit on the subject, a
VMEbus analyser confirms that D8 transfers are possible on all the
master ranges.
 1.7 20-Aug-2000  scw Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
 1.6 20-Aug-2000  scw Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
. Get VMEbus slave mode going on mvme147. This should be easy.
. Fix up the A16 slave mappings.
. Bounce buffer support. (Messy, but pretty much a `must have'.)
. Figure out how to deal with `location monitor' interrupts
within the framework. (Useful for Busnet, among other things.)
. It would be nice to make use of the VMEchip2's DMA facilities...
 1.5 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.4 23-Jun-2000  scw Fix the `evcnt' prototypes.
 1.3 04-Jun-2000  cgd branches: 1.3.2;
Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.2 18-Mar-2000  scw branches: 1.2.2;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 20-Feb-1999  scw branches: 1.1.8; 1.1.16;
Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.1.16.6 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.1.16.5 18-Mar-2000  scw Fix local-bus offset of VMEbus windows.
 1.1.16.4 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.1.16.3 14-Mar-2000  scw VMEbus support on mvme167 is now pretty much coded for.
Now all I need to do is test it... ;-)
 1.1.16.2 13-Mar-2000  scw One step closer to getting the VMEbus glue working on mvme167 ...
 1.1.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.1.8.3 08-Dec-2000  bouyer Sync with HEAD.
 1.1.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.2.2 17-Oct-2000  scw Pullup 1.8 - 1.9 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.3.2.1 27-Jun-2000  scw Pullup from trunk: 1.3 - 1.4
Approved by: thorpej

Fix some prototype tyops introduced when the generic event counting
code was added.
 1.12.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.14.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.14.8.1 06-Jul-2001  nathanw file vme_two.c was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.14.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.10 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.9 28-Apr-2008  martin branches: 1.9.34; 1.9.44;
Remove clause 3 and 4 from TNF licenses
 1.8 12-Jan-2008  tsutsui branches: 1.8.6; 1.8.8; 1.8.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.7 11-Dec-2005  christos branches: 1.7.50; 1.7.56; 1.7.64;
merge ktrace-lwp.
 1.6 15-Jul-2003  lukem branches: 1.6.16;
__KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 14-May-2002  matt Eliminate commons (including many used ones). Clean up variable references.
 1.2 24-Mar-2002  scw Fix a botch from the dev/mvme split for kernels with no vmetwo in
the config file.
 1.1 12-Feb-2002  scw branches: 1.1.2; 1.1.8;
Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.1.8.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.8.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 12-Feb-2002  jdolecek file vme_two_68k.c was added on branch kqueue on 2002-03-16 15:58:54 +0000
 1.1.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.4 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 12-Feb-2002  nathanw file vme_two_68k.c was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.1 21-Jan-2008  yamt sync with head
 1.7.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.7.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.7.50.1 23-Mar-2008  matt sync with HEAD
 1.8.10.1 16-May-2008  yamt sync with head.
 1.8.8.1 18-May-2008  yamt sync with head.
 1.8.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.34.1 30-Oct-2012  yamt sync with head
 1.4 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.3 31-Jul-2001  chs branches: 1.3.6;
fix typo in previous.
 1.2 27-Jul-2001  scw Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.1 06-Jul-2001  scw branches: 1.1.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.1.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.3.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.6.1 31-Jul-2001  nathanw file vme_two_isr.c was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.5 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.4 24-Nov-2000  scw branches: 1.4.4; 1.4.8;
Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.3 20-Aug-2000  scw Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
. Get VMEbus slave mode going on mvme147. This should be easy.
. Fix up the A16 slave mappings.
. Bounce buffer support. (Messy, but pretty much a `must have'.)
. Figure out how to deal with `location monitor' interrupts
within the framework. (Useful for Busnet, among other things.)
. It would be nice to make use of the VMEchip2's DMA facilities...
 1.2 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 20-Feb-1999  scw branches: 1.1.8; 1.1.16;
Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.1.16.6 18-Mar-2000  scw Houston, we have VMEbus interrupts.
Also address some KNF issues.
 1.1.16.5 18-Mar-2000  scw Fix local-bus offset of VMEbus windows.
 1.1.16.4 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.1.16.3 14-Mar-2000  scw VMEbus support on mvme167 is now pretty much coded for.
Now all I need to do is test it... ;-)
 1.1.16.2 13-Mar-2000  scw One step closer to getting the VMEbus glue working on mvme167 ...
 1.1.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.1.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.1.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.11 12-Feb-2002  scw Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.10 27-Jul-2001  scw branches: 1.10.6;
Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
 1.9 06-Jul-2001  scw branches: 1.9.2;
Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
 1.8 24-Nov-2000  scw Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
 1.7 21-Aug-2000  scw A VMEbus RAM board configured for use by mvme68k can now be
treated as just another available VMEbus slave image as far as
bus_dma(9) is concerned.

To preserve faster onboard memory, mvmebus_dmamem_alloc() will
allocate first from the offboard VMEbus RAM slave image if present,
and assuming its address modifier matches the caller's constraints.
This can be overidden by specifying the BUS_DMA_ONBOARD_RAM flag.
 1.6 20-Aug-2000  scw Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
. Get VMEbus slave mode going on mvme147. This should be easy.
. Fix up the A16 slave mappings.
. Bounce buffer support. (Messy, but pretty much a `must have'.)
. Figure out how to deal with `location monitor' interrupts
within the framework. (Useful for Busnet, among other things.)
. It would be nice to make use of the VMEchip2's DMA facilities...
 1.5 13-Aug-2000  scw Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
 1.4 23-Jun-2000  scw Fix the `evcnt' prototypes.
 1.3 04-Jun-2000  cgd branches: 1.3.2;
Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.2 18-Mar-2000  scw branches: 1.2.2;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.1 20-Feb-1999  scw branches: 1.1.8; 1.1.16;
Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.1.16.4 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.1.16.3 14-Mar-2000  scw VMEbus support on mvme167 is now pretty much coded for.
Now all I need to do is test it... ;-)
 1.1.16.2 13-Mar-2000  scw One step closer to getting the VMEbus glue working on mvme167 ...
 1.1.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.1.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.1.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.2.1 27-Jun-2000  scw Pullup from trunk: 1.3 - 1.4
Approved by: thorpej

Fix some prototype tyops introduced when the generic event counting
code was added.
 1.9.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.9.2.1 03-Aug-2001  lukem update to -current
 1.10.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.10.6.1 27-Jul-2001  nathanw file vme_twovar.h was added on branch nathanw_sa on 2002-02-28 04:10:51 +0000
 1.4 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.3 12-Jan-1998  thorpej branches: 1.3.16; 1.3.24;
Update for changes to config.
 1.2 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.1 26-Apr-1996  chuck branches: 1.1.12;
- zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.1.12.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.24.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.3.16.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.35 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.34 24-Apr-2021  thorpej branches: 1.34.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.33 12-Nov-2019  msaitoh branches: 1.33.10;
Add missing initialization of sc_dev.
 1.32 27-Oct-2012  chs branches: 1.32.30; 1.32.38; 1.32.42;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.31 28-Apr-2008  martin branches: 1.31.34; 1.31.44;
Remove clause 3 and 4 from TNF licenses
 1.30 12-Jan-2008  tsutsui branches: 1.30.6; 1.30.8; 1.30.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.29 11-Dec-2005  christos branches: 1.29.50; 1.29.56; 1.29.64;
merge ktrace-lwp.
 1.28 28-Mar-2004  scw branches: 1.28.16;
Assign my license to TNF.
 1.27 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.26 15-Jul-2003  lukem __KERNEL_RCSID()
 1.25 14-May-2003  wiz branches: 1.25.2;
Spell everything with an r.
 1.24 03-May-2003  wiz DMA, not dma nor Dma.
 1.23 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.22 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.21 31-May-2001  scw branches: 1.21.2; 1.21.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.20 25-Apr-2001  bouyer Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.19 12-Aug-2000  scw branches: 1.19.2;
G/C an unused variable.
 1.18 25-Jul-2000  scw Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER.
 1.17 18-Mar-2000  scw Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.16 26-Feb-2000  scw branches: 1.16.2;
Need <machine/cpu.h> for IIOV definition.
 1.15 20-Feb-1999  scw branches: 1.15.8;
Add support for the VMEchip2 and the ncr53c710 SCSI IOP.
VMEchip2 support work is ongoing. SCSI is complete.
 1.14 05-Dec-1998  mjacob Update HBAs to incorporate the new max_lun property.
 1.13 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.12 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.11 12-Jan-1998  thorpej Update for changes to config.
 1.10 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.9 19-Mar-1997  gwr branches: 1.9.2; 1.9.4;
Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.8 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.7 13-Oct-1996  christos backout previous kprintf change
 1.6 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.5 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.4 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.3 29-May-1996  chuck note if we are the boot device (for fixing generic boot)
 1.2 26-Apr-1996  chuck branches: 1.2.4;
- zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.1 18-Apr-1996  chuck new driver: SCSI for VME147
contributed by: Steve Woodford <steve@mctavish.demon.co.uk>

this driver is based on the amiga sbic/33C93 driver. Steve has
cleaned it up and fixed lots of bugs. Note that the original driver
used features which require at least a WD33C93A (the vme147 has the
original WD33C93 chip <no 'A' suffix>). Steve has also written
the DMA routines for the 147 to get things really going. Hardware
scatter-gather DMA and sync. SCSI are not supported (yet). tested
on several disk drives and a tape drive. CD-ROM untested, but
should work.
 1.2.4.1 29-May-1996  chuck import generic boot bug fix
 1.9.4.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.9.2.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.15.8.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.15.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.16.2.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.19.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.21.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.21.8.1 31-May-2001  nathanw file wdsc.c was added on branch nathanw_sa on 2002-10-18 02:38:58 +0000
 1.21.2.1 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.25.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.25.2.1 03-Aug-2004  skrll Sync with HEAD
 1.28.16.1 21-Jan-2008  yamt sync with head
 1.29.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.29.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.29.50.1 23-Mar-2008  matt sync with HEAD
 1.30.10.1 16-May-2008  yamt sync with head.
 1.30.8.1 18-May-2008  yamt sync with head.
 1.30.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.31.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.31.34.1 30-Oct-2012  yamt sync with head
 1.32.42.1 14-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #425):

sys/dev/sbus/sio16.c: revision 1.25
sys/dev/gpib/mt.c: revision 1.33
sys/arch/mvme68k/dev/wdsc.c: revision 1.33
sys/dev/gpib/ct.c: revision 1.31
sys/dev/isa/mcd.c: revision 1.119
sys/dev/pci/if_stge.c: revision 1.73
sys/dev/gpib/ppi.c: revision 1.25
sys/dev/pcmcia/if_tr_pcmcia.c: revision 1.29
sys/arch/amiga/dev/zssc.c: revision 1.46
sys/arch/mac68k/obio/iwm_fd.c: revision 1.57
sys/arch/amiga/dev/if_qn.c: revision 1.48
sys/dev/isa/tcic2_isa.c: revision 1.28
sys/dev/isa/uha_isa.c: revision 1.42
sys/dev/pci/neo.c: revision 1.55
sys/arch/next68k/dev/nextdisplay.c: revision 1.22
sys/dev/isa/if_iy.c: revision 1.111

Add missing initialization of sc_dev.

Initialize sc_dev correctly to avoid null pointer dereference when
bus_space_map() failed.

Add missing initialization of sc_dev.
 1.32.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.32.30.1 14-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1439):

sys/dev/sbus/sio16.c: revision 1.25
sys/dev/gpib/mt.c: revision 1.33
sys/arch/mvme68k/dev/wdsc.c: revision 1.33
sys/dev/gpib/ct.c: revision 1.31
sys/dev/isa/mcd.c: revision 1.119
sys/dev/pci/if_stge.c: revision 1.73
sys/dev/gpib/ppi.c: revision 1.25
sys/dev/pcmcia/if_tr_pcmcia.c: revision 1.29
sys/arch/amiga/dev/zssc.c: revision 1.46
sys/arch/mac68k/obio/iwm_fd.c: revision 1.57
sys/arch/amiga/dev/if_qn.c: revision 1.48
sys/dev/isa/tcic2_isa.c: revision 1.28
sys/dev/isa/uha_isa.c: revision 1.42
sys/dev/pci/neo.c: revision 1.55
sys/arch/next68k/dev/nextdisplay.c: revision 1.22
sys/dev/isa/if_iy.c: revision 1.111

Add missing initialization of sc_dev.


Initialize sc_dev correctly to avoid null pointer dereference when
bus_space_map() failed.


Add missing initialization of sc_dev.
 1.33.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.34.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.2 08-May-1996  thorpej branches: 1.2.68;
RCS id police.
 1.1 18-Apr-1996  chuck new driver: SCSI for VME147
contributed by: Steve Woodford <steve@mctavish.demon.co.uk>

this driver is based on the amiga sbic/33C93 driver. Steve has
cleaned it up and fixed lots of bugs. Note that the original driver
used features which require at least a WD33C93A (the vme147 has the
original WD33C93 chip <no 'A' suffix>). Steve has also written
the DMA routines for the 147 to get things really going. Hardware
scatter-gather DMA and sync. SCSI are not supported (yet). tested
on several disk drives and a tape drive. CD-ROM untested, but
should work.
 1.2.68.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.68.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.68.1 03-Aug-2004  skrll Sync with HEAD
 1.46 18-Jan-2024  thorpej Don't put the MVME1xx model defines into IDENT, make them defflag options and
put them in opt_mvmeconf.h. Make these options depend on the appropriate
M680x0 option (MVME147 -> M68030, MVME16[27] -> M68040, MVME17[27] -> M68060)
so that the CPU option appears correctly in opt_m68k_arch.h.
 1.45 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.44 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.43 24-Apr-2021  thorpej branches: 1.43.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.42 11-Apr-2009  scw branches: 1.42.78;
Invoke zs_lock_init() _after_ copying console state to avoid a later
lock-related panic.
 1.41 13-Jun-2008  cegger branches: 1.41.4; 1.41.10;
use device_lookup_private to get softc
 1.40 28-Apr-2008  martin branches: 1.40.2; 1.40.4;
Remove clause 3 and 4 from TNF licenses
 1.39 29-Mar-2008  tsutsui branches: 1.39.2; 1.39.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.38 12-Jan-2008  tsutsui branches: 1.38.6;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.37 03-Dec-2007  ad branches: 1.37.6;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.36 09-Nov-2007  ad Call zs_lock_init() to set up the chanstate's lock.
 1.35 28-Mar-2006  thorpej branches: 1.35.18; 1.35.36; 1.35.38; 1.35.42; 1.35.44;
Use device_unit().
 1.34 11-Dec-2005  christos branches: 1.34.4; 1.34.6; 1.34.8; 1.34.10; 1.34.12;
merge ktrace-lwp.
 1.33 04-Dec-2003  keihan branches: 1.33.16;
NetBSD.ORG -> NetBSD.org

Now all "NetBSD.ORG" are gone from src/sys.
 1.32 15-Jul-2003  lukem __KERNEL_RCSID()
 1.31 28-Jan-2003  pk branches: 1.31.2;
Provide locking required by the interrupt handlers running at IPL_SERIAL.
 1.30 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.29 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.28 07-Jul-2001  scw branches: 1.28.2; 1.28.8; 1.28.16;
bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
 1.27 31-May-2001  scw Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.26 21-Nov-2000  scw branches: 1.26.2;
Call zs_set_speed() to calculate the initial timing constants.
 1.25 20-Nov-2000  scw Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.24 18-Nov-2000  scw Fix a braino in the last commit.
 1.23 18-Nov-2000  scw Allow a degree of tolerance when calculating the baudrate timing constant.
 1.22 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.21 21-Jul-2000  scw Make this compile again.
 1.20 20-Jul-2000  scw Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.19 18-Mar-2000  scw branches: 1.19.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.18 27-Mar-1999  wrstuden branches: 1.18.8; 1.18.16;
Add pps support. Only enable pps if CLOCAL & !MDMBUF.
 1.17 11-Feb-1999  mycroft Minor cleanup.
Make the initializer for BAUDLO depend on PCLK directly; it was incorrect on
some ports where PCLK is not 4.9152MHz.
XXX Is the default value actually used?
 1.16 03-Feb-1999  mycroft Don't set DCD_IE in the frontends. KGDB doesn't even use DCD, and the tty
frontends get it from zsparam() anyway.
 1.15 22-Aug-1998  scw vm_offset -> [vp]addr_t and vm_size_t -> [vp]size_t
While I'm here, expunge use of 'register' storage class.
 1.14 12-Jan-1998  thorpej Update for changes to config.
 1.13 02-Nov-1997  mycroft Set rr0_dcd.
Don't set DCD_IE and CTS_IE here; let the MI code do it.
Handle MDMBUF.
 1.12 05-Feb-1997  gwr branches: 1.12.12;
Apply that fix from Bill Studenmund that keeps us from ignoring DCD.
Also fix the copyright (s/REGENTS/FOUNDATION/).
 1.11 17-Dec-1996  gwr Adapt to the new version of dev/ic/z8530*
 1.10 09-Dec-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.9 13-Oct-1996  christos backout previous kprintf change
 1.8 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.7 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.6 26-Aug-1996  thorpej Update for structure member name changes made in the MI code.
 1.5 26-May-1996  chuck fix cngetc() typeo.
 1.4 26-Apr-1996  chuck branches: 1.4.4;
- zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.3 19-Mar-1996  thorpej Fix typo.
 1.2 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.1 25-Jul-1995  chuck branches: 1.1.1;
Initial revision
 1.1.1.1 25-Jul-1995  chuck mvme68k port -- for the motorola vme147 m68030 card
 1.4.4.2 06-Jun-1996  chuck s/cs_pclk_div16/cs_brg_clk/ as per gwr so we can compile again
 1.4.4.1 27-May-1996  chuck fix cngetc bug
 1.12.12.1 04-Nov-1997  mellon Pull rev 1.13 up from trunk (mycrosoft)
 1.18.16.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.18.16.1 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.18.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.18.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.19.4.2 17-Oct-2000  scw Pullup 1.21 - 1.22 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.19.4.1 22-Jul-2000  scw Pullup from trunk: 1.20 and 1.21
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.26.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.28.16.1 19-May-2002  gehenna Remove hard-coded major.
 1.28.8.3 03-Jan-2003  thorpej Sync with HEAD.
 1.28.8.2 17-Sep-2002  nathanw Catch up to -current.
 1.28.8.1 07-Jul-2001  nathanw file zs.c was added on branch nathanw_sa on 2002-09-17 21:16:03 +0000
 1.28.2.1 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.31.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.31.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.31.2.1 03-Aug-2004  skrll Sync with HEAD
 1.33.16.4 21-Jan-2008  yamt sync with head
 1.33.16.3 07-Dec-2007  yamt sync with head
 1.33.16.2 15-Nov-2007  yamt sync with head.
 1.33.16.1 21-Jun-2006  yamt sync with head.
 1.34.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.34.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.34.8.1 01-Apr-2006  yamt sync with head.
 1.34.6.1 22-Apr-2006  simonb Sync with head.
 1.34.4.1 09-Sep-2006  rpaulo sync with head
 1.35.44.3 18-Feb-2008  mjf Sync with HEAD.
 1.35.44.2 08-Dec-2007  mjf Sync with HEAD.
 1.35.44.1 19-Nov-2007  mjf Sync with HEAD.
 1.35.42.1 13-Nov-2007  bouyer Sync with HEAD
 1.35.38.2 23-Mar-2008  matt sync with HEAD
 1.35.38.1 09-Jan-2008  matt sync with HEAD
 1.35.36.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.35.36.1 11-Nov-2007  joerg Sync with HEAD.
 1.35.18.1 03-Dec-2007  ad Sync with HEAD.
 1.37.6.1 19-Jan-2008  bouyer Sync with HEAD
 1.38.6.3 29-Jun-2008  mjf Sync with HEAD.
 1.38.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.38.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.39.4.2 04-May-2009  yamt sync with head.
 1.39.4.1 16-May-2008  yamt sync with head.
 1.39.2.2 17-Jun-2008  yamt sync with head.
 1.39.2.1 18-May-2008  yamt sync with head.
 1.40.4.1 18-Jun-2008  simonb Sync with head.
 1.40.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.41.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.41.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.42.78.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.43.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.21 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.20 29-Mar-2008  tsutsui branches: 1.20.2; 1.20.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.19 12-Jan-2008  tsutsui branches: 1.19.6;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.18 11-Dec-2005  christos branches: 1.18.50; 1.18.56; 1.18.64;
merge ktrace-lwp.
 1.17 04-Dec-2003  keihan branches: 1.17.16;
NetBSD.ORG -> NetBSD.org

Now all "NetBSD.ORG" are gone from src/sys.
 1.16 15-Jul-2003  lukem __KERNEL_RCSID()
 1.15 02-Oct-2002  thorpej branches: 1.15.6;
Use CFATTACH_DECL().
 1.14 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.13 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.12 31-May-2001  scw branches: 1.12.2; 1.12.8; 1.12.16;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.11 24-Nov-2000  scw branches: 1.11.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.10 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.9 23-Jul-2000  scw G/C cf_unit. It wasn't really being used in a meaningfull way.
 1.8 18-Mar-2000  scw branches: 1.8.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.7 14-Feb-1999  scw branches: 1.7.8; 1.7.16;
Merge support for mvme167 into main tree.
 1.6 12-Jan-1998  thorpej branches: 1.6.8;
Update for changes to config.
 1.5 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.4 19-Mar-1997  gwr branches: 1.4.4;
Change arg two of all the match functions back to struct cfdata
now that __BROKEN_INDIRECT_CONFIG has been removed.
 1.3 17-Dec-1996  gwr Adapt to the new version of dev/ic/z8530*
 1.2 09-Dec-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.1 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.4.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.6.8.1 13-Feb-1999  scw The further adventures of mvme167 support. Mostly working now.
 1.7.16.3 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.7.16.2 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.7.16.1 11-Mar-2000  scw Checkpoint of development of the following features of mvme68k:

. Preliminary support for the MI VMEbus framework.
. Full bus_space* and "mostly-there" bus_dma* support.

At this time, MI VMEbus drivers may well work 'as is' on an MVME147 board.
Work to get the MVME167 to this stage is ongoing.

Testers will be required at some point as I have no VMEbus boards which
have existing MI drivers! (Although I am able to test things in a limited
fashion using a noddy driver and a VMEbus RAM card).

TODO:

. Expunge all remaining use of IIOV() and freinds.
. Flag the 'boot device' using bus_space_tag_t and offset.
. Add a 24bit address constraint to bus_dmamem_alloc() (for le/ie)
. VMEChip2 support on MVME167/MVME177
. Support the mvme68k boards in VMEbus slave mode.
. Anything else I can thing of, besides having another beer. ;-)
 1.7.8.2 08-Dec-2000  bouyer Sync with HEAD.
 1.7.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.8.4.1 17-Oct-2000  scw Pullup 1.9 - 1.10 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.11.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.12.16.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.12.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.12.8.2 17-Sep-2002  nathanw Catch up to -current.
 1.12.8.1 31-May-2001  nathanw file zs_pcc.c was added on branch nathanw_sa on 2002-09-17 21:16:04 +0000
 1.12.2.1 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.15.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.6.1 03-Aug-2004  skrll Sync with HEAD
 1.17.16.1 21-Jan-2008  yamt sync with head
 1.18.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.18.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.18.50.1 23-Mar-2008  matt sync with HEAD
 1.19.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.19.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.20.4.1 16-May-2008  yamt sync with head.
 1.20.2.1 18-May-2008  yamt sync with head.
 1.14 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.13 29-Mar-2008  tsutsui branches: 1.13.2; 1.13.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.12 12-Jan-2008  tsutsui branches: 1.12.6;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.11 11-Dec-2005  christos branches: 1.11.50; 1.11.56; 1.11.64;
merge ktrace-lwp.
 1.10 04-Dec-2003  keihan branches: 1.10.16;
NetBSD.ORG -> NetBSD.org

Now all "NetBSD.ORG" are gone from src/sys.
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 02-Oct-2002  thorpej branches: 1.8.6;
Use CFATTACH_DECL().
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.5 12-Feb-2002  scw branches: 1.5.8;
Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
 1.4 31-May-2001  scw branches: 1.4.2; 1.4.8;
Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface.
 1.3 24-Nov-2000  scw branches: 1.3.2;
Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
. add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
. fix a few drivers which have dependencies on the implementation.
 1.2 20-Nov-2000  scw branches: 1.2.2;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.1 06-Sep-2000  scw branches: 1.1.2;
Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.1.2.2 17-Oct-2000  scw Pullup new file on the branch. (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.1.2.1 06-Sep-2000  scw file zs_pcctwo.c was added on branch netbsd-1-5 on 2000-10-17 19:54:48 +0000
 1.2.2.4 08-Dec-2000  bouyer Sync with HEAD.
 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 20-Nov-2000  bouyer file zs_pcctwo.c was added on branch thorpej_scsipi on 2000-11-20 20:15:20 +0000
 1.3.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.4.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.8.1 31-May-2001  nathanw file zs_pcctwo.c was added on branch nathanw_sa on 2002-02-28 04:10:51 +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.5.8.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.8.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.6.1 03-Aug-2004  skrll Sync with HEAD
 1.10.16.1 21-Jan-2008  yamt sync with head
 1.11.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.11.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.50.1 23-Mar-2008  matt sync with HEAD
 1.12.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.12.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.13.4.1 16-May-2008  yamt sync with head.
 1.13.2.1 18-May-2008  yamt sync with head.
 1.14 19-Jan-2024  thorpej Make sure to include opt_mvmeconf.h.
 1.13 09-Aug-2021  andvar s/definitons/definitions/
 1.12 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.11 12-Jan-2008  tsutsui branches: 1.11.6; 1.11.8; 1.11.10;
Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
 1.10 20-Nov-2000  scw branches: 1.10.40; 1.10.102; 1.10.108; 1.10.116;
Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
 1.9 15-Nov-2000  scw Doh! Revert all but the baudrate clock changes from that last commit;
a bunch of local stuff crept in.
 1.8 09-Nov-2000  scw The ZS chips are actually clocked at 5MHz and 10MHz on mvme147 and
mvme162 respectively. Thanks to Neil Lubdan and a frequency counter. :-)
 1.7 06-Sep-2000  scw Add preliminary support for the MVME162-LX 200/300 series of boards.

Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

o Real floating point hardware (the 68LC040 model isn't tested),
o The VMEchip2 must be present,
o If offboard VMEbus RAM is not present, at least 8MB of onboard
RAM is required.
o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
supported with offboard RAM, but not without some funky values in
the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
 1.6 20-Jul-2000  scw Implement generic soft interrupts for mvme68k.
Based on Jason Thorpe's Alpha implementation.
 1.5 18-Mar-2000  scw branches: 1.5.4;
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

o The MI VMEbus framework on both MVME147 and MVME167.
o Enhancements to the existing MD bus_space(9) implementation.
o Most of the bus_dma(9) API.
 1.4 12-Jan-1998  thorpej branches: 1.4.16; 1.4.24;
Update for changes to config.
 1.3 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.2 17-Dec-1996  gwr branches: 1.2.10;
Adapt to the new version of dev/ic/z8530*
 1.1 26-Apr-1996  chuck - zs: switch to MI driver
- clock, le, pcc, wdsc, zs: convert to new autoconfig scheme
- vme: add vme support

Contributed by: Jason R. Thorpe <thorpej@og.org>
 1.2.10.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.24.2 18-Mar-2000  scw MI VMEbus glue more or less complete.
Kernels now compiled with -Wall, etc. (lots of fixes needed for this)
All MD drivers now bus_spaced/bus_dma'd. The two SCSI drivers should
be replaced with bus_spaced MI versions at some point.
 1.4.24.1 14-Mar-2000  scw Get rid of PCC{,TWO}_VADDR(), and some general tidying up.
 1.4.16.2 22-Nov-2000  bouyer Sync with HEAD.
 1.4.16.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.4.2 17-Oct-2000  scw Pullup 1.6 - 1.7 (approved by tv)
Bring support for MVME162 into the 1.5 branch.
 1.5.4.1 22-Jul-2000  scw Pullup from trunk: 1.6
Approved by: thorpej

Implement generic soft interrupts for mvme68k.
 1.10.116.1 19-Jan-2008  bouyer Sync with HEAD
 1.10.108.1 18-Feb-2008  mjf Sync with HEAD.
 1.10.102.1 23-Mar-2008  matt sync with HEAD
 1.10.40.1 21-Jan-2008  yamt sync with head
 1.11.10.1 16-May-2008  yamt sync with head.
 1.11.8.1 18-May-2008  yamt sync with head.
 1.11.6.1 02-Jun-2008  mjf Sync with HEAD.

RSS XML Feed