Home | History | Annotate | only in /src/sys/arch/mac68k/nubus
History log of /src/sys/arch/mac68k/nubus
RevisionDateAuthorComments
 1.11 19-Dec-2020  thorpej malloc(9) -> kmem(9)
 1.10 03-Sep-2018  riastradh branches: 1.10.12;
Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

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

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

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.7 27-Oct-2012  chs branches: 1.7.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.6 31-Jan-2012  hauke branches: 1.6.6;
Employ the two free 16 bit timers of the Hurdler Centronics Parallel
Interface card's Z8536 CIO for Timecounter support.

Builds, should work, but not testable yet because of pmap breakage.
 1.5 13-May-2011  rmind branches: 1.5.4; 1.5.8;
Replace some ltsleep() uses with kpause() and tsleep().
 1.4 10-Sep-2008  christos branches: 1.4.12; 1.4.18; 1.4.24;
replace \xa0 with space from Andy Shevchenko
 1.3 11-Jun-2008  cegger branches: 1.3.2; 1.3.4;
use device_lookup_private to get softc
 1.2 23-May-2008  hauke branches: 1.2.2; 1.2.4; 1.2.6;
Fix NetBSD version tag.
 1.1 22-May-2008  hauke Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.
 1.2.6.1 18-Jun-2008  simonb Sync with head.
 1.2.4.3 17-Jun-2008  yamt sync with head.
 1.2.4.2 04-Jun-2008  yamt sync with head
 1.2.4.1 23-May-2008  yamt file cpi_nubus.c was added on branch yamt-pf42 on 2008-06-04 02:04:48 +0000
 1.2.2.4 28-Sep-2008  mjf Sync with HEAD.
 1.2.2.3 29-Jun-2008  mjf Sync with HEAD.
 1.2.2.2 02-Jun-2008  mjf Sync with HEAD.
 1.2.2.1 23-May-2008  mjf file cpi_nubus.c was added on branch mjf-devfs2 on 2008-06-02 13:22:22 +0000
 1.3.4.1 19-Oct-2008  haad Sync with HEAD.
 1.3.2.3 24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.3.2.2 23-Jun-2008  wrstuden Add files to branch that were added on -current.

After this, all that's left of update is to merge some changes
that had conflicts.
 1.3.2.1 11-Jun-2008  wrstuden file cpi_nubus.c was added on branch wrstuden-revivesa on 2008-06-23 05:02:12 +0000
 1.4.24.1 06-Jun-2011  jruoho Sync with HEAD.
 1.4.18.1 31-May-2011  rmind sync with head
 1.4.12.2 04-May-2009  yamt sync with head.
 1.4.12.1 10-Sep-2008  yamt file cpi_nubus.c was added on branch yamt-nfs-mp on 2009-05-04 08:11:27 +0000
 1.5.8.1 18-Feb-2012  mrg merge to -current.
 1.5.4.3 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.5.4.2 30-Oct-2012  yamt sync with head
 1.5.4.1 17-Apr-2012  yamt sync with head
 1.6.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7.2.1 18-May-2014  rmind sync with head
 1.8.2.1 10-Aug-2014  tls Rebase.
 1.9.28.1 10-Jun-2019  christos Sync with HEAD
 1.9.26.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.10.12.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.4 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.3 31-Jan-2012  hauke branches: 1.3.6;
Employ the two free 16 bit timers of the Hurdler Centronics Parallel
Interface card's Z8536 CIO for Timecounter support.

Builds, should work, but not testable yet because of pmap breakage.
 1.2 23-May-2008  hauke branches: 1.2.2; 1.2.4; 1.2.8; 1.2.22; 1.2.40; 1.2.44;
Fix NetBSD version tag.
 1.1 22-May-2008  hauke Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.
 1.2.44.1 18-Feb-2012  mrg merge to -current.
 1.2.40.2 30-Oct-2012  yamt sync with head
 1.2.40.1 17-Apr-2012  yamt sync with head
 1.2.22.2 04-May-2009  yamt sync with head.
 1.2.22.1 23-May-2008  yamt file cpi_nubusvar.h was added on branch yamt-nfs-mp on 2009-05-04 08:11:27 +0000
 1.2.8.2 23-Jun-2008  wrstuden Add files to branch that were added on -current.

After this, all that's left of update is to merge some changes
that had conflicts.
 1.2.8.1 23-May-2008  wrstuden file cpi_nubusvar.h was added on branch wrstuden-revivesa on 2008-06-23 05:02:12 +0000
 1.2.4.2 04-Jun-2008  yamt sync with head
 1.2.4.1 23-May-2008  yamt file cpi_nubusvar.h was added on branch yamt-pf42 on 2008-06-04 02:04:48 +0000
 1.2.2.2 02-Jun-2008  mjf Sync with HEAD.
 1.2.2.1 23-May-2008  mjf file cpi_nubusvar.h was added on branch mjf-devfs2 on 2008-06-02 13:22:22 +0000
 1.3.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.79 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.78 28-Feb-2016  rjs Set sc_dev field of softc.

Should pullup to 7.
 1.77 25-Oct-2013  martin branches: 1.77.4; 1.77.6;
Simplify
 1.76 27-Oct-2012  chs branches: 1.76.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.75 17-Oct-2007  garbled branches: 1.75.54; 1.75.64;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.74 30-Aug-2007  jmmv Fix typo in comment.
 1.73 05-Mar-2007  he branches: 1.73.2; 1.73.10; 1.73.14; 1.73.18; 1.73.20;
Use a char* helper variable for pointer arithmetic.
 1.72 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.71 06-Dec-2006  hauke branches: 1.71.2;
Support for four nubus video cards:

Formac ProNitron 80.IVb (1024x768/8)
Relax 19" Model 200 (1024x768/8)
Apple Monochrome Video Card (640x480/1)
VillageTronic Mac Picasso 320 (up to 1920x1080/up to 24)

Nubus identifiers for Creative Solutions parallel & serial cards,
and a Becton Dickinson data acquisition card.
 1.70 24-Dec-2005  perry branches: 1.70.20; 1.70.22;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.69 11-Dec-2005  christos merge ktrace-lwp.
 1.68 15-Jan-2005  chs branches: 1.68.10;
de-__P, remove register, ansify, b* -> mem*.
 1.67 15-Jul-2003  lukem __KERNEL_RCSID()
 1.66 02-Oct-2002  thorpej branches: 1.66.6;
Use CFATTACH_DECL().
 1.65 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.64 30-May-2002  thorpej Don't use multi-line string literals.
 1.63 20-Nov-2001  chs branches: 1.63.8;
prepare for ELF:
- add "%" prefix to register names in assembly code.
- use _C_LABEL() where necessary.
- use packed structures where necessary to match the old ABI.
 1.62 22-Jan-2001  briggs branches: 1.62.4; 1.62.8;
Clear interrupts on the RasterOps PaintBoard Prism GT 1.0. From
Alastair Bridgewater <nyef@softhome.net>.
 1.61 22-Jan-2001  briggs Handle interrupts on the Radius DirectColor/GX (id 0x27c). From
Alastair Bridgewater <nyef@softhome.net>.
 1.60 09-Dec-2000  briggs Clear interrupts on the Apple "Boogie" card. Information grovelling
and testing by Lucas Lay.
 1.59 30-Jul-2000  briggs Update hack to point to bus_space_handle base address.
 1.58 26-Jul-2000  briggs Remove advertising clause with my name.
 1.57 18-Mar-2000  scottr branches: 1.57.4;
Add the RasterOps 24MxTV; this card operates in the same manner as two
other RasterOps boards we already handle. Information provided by
Greg Kerr.
 1.56 14-Feb-2000  scottr Merge wscons work onto the main development branch.
 1.55 14-Jun-1999  briggs branches: 1.55.2;
Clear interrupts on a Radius GS/C card. Thanks go to Yasufumi Suzuki
<yattin@sco.bekkoame.ne.jp> for doing the MacsBug "leg"work for me.
 1.54 10-Jun-1999  briggs Use information from Kensuke Ogawa <kenogawa@festa.or.jp> to disable
interrupts on a Micron Exceed color video card.
 1.53 30-May-1999  briggs PR 7021 from Yoshihisa Sugimoto <sugimoto@sums.shiga-med.ac.jp>:
Clear interrupt properly on the RasterOps 24XLTV. Same as the 24LX.
 1.52 20-Sep-1998  scottr branches: 1.52.6; 1.52.8; 1.52.10; 1.52.12;
Make this compile again, as pointed out by Paul Goyette.
 1.51 18-Sep-1998  scottr Interrupt handling for the MicroConversions 2124NB II, from Paul Goyette.
 1.50 17-Aug-1998  briggs Update comment after cut and paste.
 1.49 12-Aug-1998  scottr New and improved console framebuffer initialization and autoconfig. This
resolves a great many issues, including Performa 58x interrupt handling
and offset displays on some models.

Programs that depend on the old (pre-NetBSD 1.1) grf interface may break.
That's actually a separate issue uncovered by this code, not caused by it.
 1.48 09-Aug-1998  briggs Support video interrupt for GrandVimage 17iL video card.
 1.47 01-Jul-1998  scottr Add a GRF_COMPAT option so that old-style grf ioctl() code can be
removed from the kernel.
 1.46 02-Jun-1998  scottr Store the PA of the framebuffer in the softc. This eliminates the need
for the sc_phys callback; we can just store the PA in the grfbus attach
args, rather than a function pointer, which simplifies the code nicely.
 1.45 23-May-1998  briggs Handle video interrupts for the Radius PrecisionColor 24X card. Thanks for
sleuthing and testing go to Robert Oelkers <windcatcher@earthlink.net>.
 1.44 07-May-1998  briggs Handle the interrupt for the Vimage graphics adapter. Thanks to
Sadamu Gohyakuda <joyhiro@joyful.gr.jp> for remote testing.
 1.43 02-May-1998  scottr Move on-board I/O and NuBus drivers to their own directories
via repository copy, and make the necessary adjustments to reflect
the moved files.
 1.42 26-Apr-1998  briggs Deal with the video interrupt for the RasterOps 8/24XLi. Thanks for the
information go to Tadashi Ueda <ng6t-ued@asahi-net.or.jp>.
 1.41 25-Apr-1998  scottr Garbage collect the second (slot number) parameter to NuBus interrupt
handlers. (Only slot_ignore() and slot_noint() need this, and we already
have a place to put this information.) Adjust add_nubus_intr() so that if
the client_data arg is specified as NULL, pass the slot number as
client_data to the interrupt handler.
 1.40 24-Apr-1998  briggs Add interrupt support for two more video cards: the Formac color card II
and the Radius PrecisionColor 24Xp. Thanks to <falk.stern@luene.net> and
<Mario_Magliocco@broder.com> for their remote sleuthing and testing.
 1.39 12-Jan-1998  thorpej Update for changes to config.
 1.38 03-Dec-1997  briggs Thanks to Paul Goyette <paul@whooppee.com> for a patch to clear the
interrupt properly on a SuperMac Spectrum/8 Series III, and thanks
to Dan McMahill for loaning the card to Paul.
I modified Paul's patch somewhat to change grfmv_intr_generic_{1,4}
to grfmv_intr_generic_write{1,4} and added grfmv_intr_generic_or4 to
handle this card.
 1.37 01-Dec-1997  scottr Correct a comment from previous commit.
 1.36 30-Nov-1997  briggs Support for the Lapis ProColorServer 8 PDS on the SE/30. This prevents
hangs when trying to use this video card in conjunction with an ethernet
card. Thanks to David Condon <david@apk.net> for information and testing.
 1.35 25-Oct-1997  briggs Handle interrupts on E-Machines Futura-SX. From Paul Goyette, PR 4348.
 1.34 09-Oct-1997  briggs branches: 1.34.2;
Clear interrupts properly on the Radius PrecisionColor 8.
Thanks for the info go to Andrew MacGibbon <andrew-m@cs.auckland.ac.nz>
 1.33 15-Aug-1997  briggs Add interrupt handler for SuperMac GFX.
Tested by Kai-Yew Lum <kaiyewl@engin.umich.edu> back in May.
 1.32 14-Aug-1997  scottr Recognize the Sigma Designs ColorMax card, and handle the interrupt. Code
provided by Brian Foley <bfoley@gpo.iol.ie> via Allen Briggs, updated for
bus.h by me.
 1.31 11-Aug-1997  scottr Make #include directives consistent. All MD headers are of the form:

#include <mac68k/{dev,mac68k}/foo.h>
 1.30 03-Aug-1997  scottr Fix grf{i,m}v_phys() prototypes.
 1.29 03-Aug-1997  scottr Overhaul grf drivers to correct recent problems with X and dt
(address error faults), as well as other reported problems:

- Simplify grfmv_phys() to work like grfiv_phys(), and eliminate the
second argument to both, as we don't use it anyway.
- Handle fbbase and fboff consistently throughout. Closes PR 3862.
- Eliminate grfaddr() by pulling it into grfmmap(), which is the
only place it was used, previously.
- grfmap() now gets the physical address of the framebuffer from
the appropriate driver, rather than try to compute it by itself.
Be careful with aligning the base to a page address and increase
the length of the mapped region appropriately. Closes PR 2867.
 1.28 26-Jul-1997  scottr branches: 1.28.2;
Add support for Macintosh Display Card, using information provided
by Taras Ivanenko <ivanenko@ctpa03.mit.edu> in PR 3862. (The PR
is still open, due to an unresolved issue regarding the fbbase
field.)
 1.27 01-Jul-1997  scottr Add support for Portrait Video Card. From SUNAGAWA Keiki
<kei_sun@ba2.so-net.or.jp> in PR 3821.
 1.26 12-May-1997  scottr Convert several interrupt handlers to bus space model, removing some
XXX's. Also, fix a bug in grfmv_intr_generic() that I found and
confirmed with Allen.
 1.25 11-May-1997  scottr Implement new NuBus slot space mapping/probing code, utilizing bus.h (and
our MD bus_space_probe() extension). This has several side effects:

- NuBus drivers must map and unmap slot space, rather than relying
on this happening before they are attached.
- Functions exported to NuBus drivers from nubus.c now need to be
supplied with a bus space tag/handle pair.
- Old bus map/peek functions can be garbage collected, as can pmap
support for the same.

Because of some current limitations of the bus space specification, we
are violating the abstraction in grf_mv (NuBus grf driver). All such
violations are clearly marked /* XXX */, and must be addressed when
the specification is updated.
 1.24 03-May-1997  briggs Support for clearing interrupts on a Rasterops Colorboard 364.
Thanks go to Michel Chalufour <michelc@tiac.net> for grovelling around for
me.
 1.23 02-May-1997  briggs Thanks to Tobias Beal <tbeal41@maine.maine.edu>, we can clear interrupts
on at least one Radius Precisioncolor 8 board.
 1.22 01-May-1997  briggs Clear the interrupts properly on an E-Machines Futura II LX and make a wild
guess at clearing them on a Futura II SX/DSP and RasterOps ColorBoard 364.
Thanks to Michel Chalufour <michelc@tiac.net> for loaning me the II LX.
 1.21 14-Apr-1997  scottr Purely cosmetic cleanup:

- Remove unused `register' modifier on declarations
- Reverse the sense of some tests to make the code more clear
- Type casts per KNF
- Move a static variable into the only function that uses it (perhaps
we can eliminate it entirely, someday?)
 1.20 10-Apr-1997  briggs Ignore SE/30 faux-video card.
 1.19 01-Apr-1997  briggs Add DrHW for RasterOps CB264--From Scott Reynolds--and link it in to the
proper interrupt routine.
 1.18 01-Apr-1997  briggs - Support DAFB machines mo' better. Actually detect if a monitor is
present and initialize a few things. No color support, yet.
- Properly disable interrupts for DAFB.
- Rearrange for better nubus display card interrupt support. Only register
an interrupt if we know how to clear it.
- Complain if we don't know about a given display card and can not install
an interrupt handler.
- Change MYSTERY stuff to cb264--still need to get the DrSW so we can
actually call the routine to clear an interrupt from this card.
 1.17 24-Feb-1997  scottr NUBUS_SLOT_TO_PADDR -> NUBUS_SLOT2PA
 1.16 20-Feb-1997  scottr We need bus.h now, due to recent nubus_attach_args change.
 1.15 16-Dec-1996  scottr branches: 1.15.6;
Convert all foo_match() functions to use a `struct cfdata *' for their
second argument. The NuBus autoconfig code had to be reorganized as a
result of this, and looks much more like a directly-attached bus now.
These changes eliminate __BROKEN_INDIRECT_CONFIG.
 1.14 13-Oct-1996  christos backout previous kprintf change
 1.13 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.12 04-Aug-1996  scottr Add a way to tell grf_establish() that internal video doesn't actually
occupy a slot. This is necessary so that GRFIOCMAP can find the correct
physical address of the framebuffer. Fixes P550, some LC models, and
perhaps the PB520.
 1.11 19-May-1996  scottr branches: 1.11.4;
New grf attachment code, mostly by Jason Thorpe with some cleanup by me.
This will allow dt and X to work with a generic kernel, rather than
compiling different kernels that attach grf0 to a NuBus adapter or
internal video.
 1.10 06-May-1996  briggs Set sc_slot--we need it later.
 1.9 06-May-1996  briggs Do not depend on the nubus being mapped in one huge segment.
 1.8 05-May-1996  briggs Prototype for -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-uninitialized
Also change the device probing scheme to use something a bit more rational.
A current side-effect is that nubus cards are double-mapped. I expect
to fix that shortly.
Also change splclock() to block everything but serial hardware interrupts.
 1.7 24-Aug-1995  briggs Some code to support a vector passed in from booter 1.8.
 1.6 06-Jul-1995  briggs Add another routine for the grf display-specific drivers to return a physical
address.
 1.5 02-Jul-1995  briggs Set and use new fboff element from grfmode structure.
 1.4 30-Jun-1995  briggs Fix oversight.
 1.3 21-Jun-1995  briggs Make no assumptions about the absolute address of nubus cards.
 1.2 06-May-1995  briggs Get rid of a printf() that got left behind in the probe.
 1.1 29-Apr-1995  briggs Add new nubus handling that's much more robust.
Update via, if_ae, and grf accordingly.
Revamp grf.
 1.11.4.1 05-Aug-1996  jtc Pulled up from rev 1.12 by request from Scott Reynolds
 1.15.6.1 12-Mar-1997  is Merge in changes from The Trunk, partially just reimplementing newarp.
 1.28.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.28.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.34.2.2 01-Dec-1997  mellon Pull rev 1.36 and 1.37 up from trunk (briggs) (reviewed by mellon)
 1.34.2.1 26-Oct-1997  mellon Pull rev 1.35 up from trunk (briggs)
 1.52.12.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.52.10.1 21-Jun-1999  thorpej Sync w/ -current.
 1.52.8.2 14-Dec-2000  he Pull up revision 1.60 (requested by briggs):
Clear interrupts on the Apple "Boogie" card.
 1.52.8.1 21-Jun-1999  perry pullup 1.52->1.53 (briggs)
 1.52.6.2 15-Jun-1999  scottr Sync with main branch.
 1.52.6.1 11-Mar-1999  scottr First cut at grf emulation. Neither GRFIOCMAP nor mmap'ing a wsdisplay device
work, though several other grf ioctls are properly emulated.
 1.55.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.55.2.2 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.55.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.57.4.2 14-Dec-2000  he Pull up revision 1.60 (requested by briggs):
Clear interrupts on the Apple "Boogie" card.
 1.57.4.1 06-Aug-2000  briggs Pullups approved by thorpej --
Add byte-swap and stride options to bus_space. Allocate as normal, then
call mac68k_bus_space_handle_swapped() or mac68k_bus_space_handle_set_stride().
Stride is untested. Swapped code works for SMC ethernet.

Add bus_space_*_stream_N functions to bus_space.

Add a DIAGNOSTIC panic if (count-using) bus_space macros are called with
a count of zero. Some drivers do this accidentally and some bus_space
implementations will fail if count is passed as zero (they are set up in
a do-{}-while structure).

There were some bogus assumptions about bus_space_handle_t and some
function calls that didn't match prototypes--fix those here, too.
 1.62.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.62.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.62.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.62.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.62.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.62.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.63.8.1 14-Jul-2002  gehenna catch up with -current.
 1.66.6.4 17-Jan-2005  skrll Sync with HEAD.
 1.66.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.66.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.66.6.1 03-Aug-2004  skrll Sync with HEAD
 1.68.10.3 03-Sep-2007  yamt sync with head.
 1.68.10.2 30-Dec-2006  yamt sync with head.
 1.68.10.1 21-Jun-2006  yamt sync with head.
 1.70.22.1 10-Dec-2006  yamt sync with head.
 1.70.20.1 12-Jan-2007  ad Sync with head.
 1.71.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.73.20.1 06-Nov-2007  matt sync with HEAD
 1.73.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.73.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.73.10.1 03-Oct-2007  garbled Sync with HEAD
 1.73.2.1 09-Oct-2007  ad Sync with head.
 1.75.64.3 03-Dec-2017  jdolecek update from HEAD
 1.75.64.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.75.64.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.75.54.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.75.54.1 30-Oct-2012  yamt sync with head
 1.76.2.1 18-May-2014  rmind sync with head
 1.77.6.1 19-Mar-2016  skrll Sync with HEAD
 1.77.4.1 12-Feb-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #1721):

sys/arch/mac68k/nubus/grf_nubus.c: revision 1.78

Set sc_dev field of softc.
Should pullup to 7.
 1.44 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.43 05-Feb-2020  skrll Trailing whitespace
 1.42 05-Feb-2020  skrll Adopt <net/if_stats.h>
 1.41 16-Jan-2009  tsutsui branches: 1.41.66; 1.41.72;
Split device_t/softc, missed on MI dp8390nic changes 10 months ago.
Also use aprint_*(), and remove unnecessary casts against void * variables.

Tested by John Klos on port-mac68k, and should be pulled up to netbsd-5.
 1.40 04-Apr-2008  hauke branches: 1.40.4; 1.40.12; 1.40.14;
Go all the way, and use the new accessor function for the device_xname field.
 1.39 02-Apr-2008  hauke Fall-out from splitting device_t and softc for the dp8390 softc.
 1.38 29-Mar-2006  thorpej branches: 1.38.62;
Use device_cfdata().
 1.37 11-Dec-2005  christos branches: 1.37.4; 1.37.6; 1.37.8; 1.37.10; 1.37.12;
merge ktrace-lwp.
 1.36 03-Jun-2005  rjs branches: 1.36.2;
Add const.
 1.35 15-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*.
 1.34 15-Jul-2003  lukem __KERNEL_RCSID()
 1.33 02-Oct-2002  thorpej branches: 1.33.6;
Use CFATTACH_DECL().
 1.32 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.31 12-Feb-2001  thorpej branches: 1.31.4; 1.31.8;
Adjust the way that media is initialized on DP8390-compatible
chips. The dp8390_softc now has media_init and media_fini
function pointers that do the work.
 1.30 30-Jul-2000  briggs Remove unsupported Focus hardware--this is now probed in if_sm_nubus.
 1.29 29-Sep-1999  scottr branches: 1.29.2; 1.29.12;
Add support for the Macintosh LC Ethernet Adapter, from Ken'ichi Ishizaka.
This was erroneously recognized as an 8390-based card, where in fact it is
using the 83932 (SONIC) controller.
 1.28 27-Sep-1998  scottr branches: 1.28.6; 1.28.8;
Add support for the TFL LAN Inc. E410/E420 PDS cards. Based on code
from Ken Nakata in PR 6199, which was in turn derived from code from
Haru Maruyama <h-maru @ da2.so-net.ne.jp>.
 1.27 12-Aug-1998  scottr Support Cabletron Ethernet card, from John Marohn in PR 5762.
 1.26 02-May-1998  scottr Move on-board I/O and NuBus drivers to their own directories
via repository copy, and make the necessary adjustments to reflect
the moved files.
 1.25 25-Apr-1998  scottr Garbage collect the second (slot number) parameter to NuBus interrupt
handlers. (Only slot_ignore() and slot_noint() need this, and we already
have a place to put this information.) Adjust add_nubus_intr() so that if
the client_data arg is specified as NULL, pass the slot number as
client_data to the interrupt handler.
 1.24 02-Nov-1997  thorpej Adjust for ifmedia-related changes to dp8390 driver.
 1.23 17-Oct-1997  briggs branches: 1.23.2;
Make this compile again.
 1.22 15-Oct-1997  thorpej Pulldown from marc-pcmcia branch: adapt to changes in the MI dp8390 driver.
 1.21 10-Oct-1997  scottr Remove advertising clause.
 1.20 26-Sep-1997  briggs Add another Dayna card to the Apple-compa. list.
Define a constant for the SuperMac Spectrum/24 series III display card.
Thanks go to Luca Falzoni <falzoni@jetai.unipv.it> for trying out the
code for the Dayna ethernet support.
 1.19 11-Aug-1997  scottr Make #include directives consistent. All MD headers are of the form:

#include <mac68k/{dev,mac68k}/foo.h>
 1.18 11-May-1997  scottr branches: 1.18.4;
Implement new NuBus slot space mapping/probing code, utilizing bus.h (and
our MD bus_space_probe() extension). This has several side effects:

- NuBus drivers must map and unmap slot space, rather than relying
on this happening before they are attached.
- Functions exported to NuBus drivers from nubus.c now need to be
supplied with a bus space tag/handle pair.
- Old bus map/peek functions can be garbage collected, as can pmap
support for the same.

Because of some current limitations of the bus space specification, we
are violating the abstraction in grf_mv (NuBus grf driver). All such
violations are clearly marked /* XXX */, and must be addressed when
the specification is updated.
 1.17 01-May-1997  briggs Treat drhw 118 and 119 the same for Apple ethernet cards.
 1.16 30-Apr-1997  scottr Fix typo in last change.
 1.15 30-Apr-1997  scottr Adjust to use16bit -> dcr_reg change in MI driver.
 1.14 29-Apr-1997  scottr Use the new MI 8390 driver, and garbage collect.
 1.13 22-Apr-1997  scottr Remove obsolete drsw diagnostic
 1.12 10-Apr-1997  briggs Changes from Bob Nestor to come closer to supporting his Apple SONIC-based
nubus card.
 1.11 19-Mar-1997  scottr Several more changes to move us toward MI-ness:

- Use more consistent and portable types in the softc.
- Map registers using an array of bus_size_t offsets, and set up the
mapping in the attach code (thanks to Jason Thorpe for suggesting
this!).
- Disable the ae-specific watchdog, which is no longer necessary in
the general case.

Still remaining: split out functions used to copy data to/from the
card, and retain a way to have a local driver name with the MI code.
 1.10 18-Mar-1997  briggs Help this compile and get the nubus address into myaddr instead of
sc->sc_arpcom.ac_enaddr.
 1.9 17-Mar-1997  scottr Some cards we identify as InterLAN cards do not seem to have the MAC
address in the configuration ROM. For these, fall back to the old method
if we can't find the expected sResource record.
 1.8 15-Mar-1997  scottr Defer enabling NuBus slot interrupts until all slots have been probed
and drivers attached. This removes the need for the MAC68K_BROKEN_VIDEO
option. From Allen Briggs.
 1.7 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.6 10-Mar-1997  scottr branches: 1.6.2;
Add missing call to ae_nb_get_enaddr(), from <kei_sun@ba2.so-net.or.jp>.
Fixes PR 3312.
 1.5 28-Feb-1997  scottr Define aesetup() to return an int, so that the attach function can
determine whether there was an error (if so, we unmap the slot space
for this device). Use this functionality to tell the attach function
that we couldn't clear the card's buffer.

Also in aesetup(), eliminate the bogus repetition of the error message
we print when the buffer clear actually fails. Noticed by Hauke Fath.
 1.4 28-Feb-1997  scottr Move the NuBus-specific watchdog function from if_ae.c to if_ae_nubus.c,
and allow the attach function to override the default watchdog. Also,
do some minor cosmetic surgery (rename bus space tags/handles and some
KNFing I missed the first time around).
 1.3 25-Feb-1997  scottr Move bus-independent setup code back into if_ae.c; enable the use of
configuration flags. For NuBus cards, attempt to find the MAC address
in the declaration ROM resources.
 1.2 24-Feb-1997  scottr Add support for the Kinetics EtherPort SE/30, from Ken Nakata.
 1.1 24-Feb-1997  scottr Split out the NuBus attachment code, and convert to bus.h
 1.6.2.1 12-Mar-1997  is Merge in changes from The Trunk, partially just reimplementing newarp.
 1.18.4.5 14-Oct-1997  thorpej Mark this interface as enabled right from the get-go.
 1.18.4.4 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.4.3 14-Oct-1997  thorpej Adapt to changes in the generic DP8390 driver.
 1.18.4.2 29-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.4.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.23.2.1 05-Nov-1997  thorpej Pull up from trunk: update for ifmedia changes to dp8390.c
 1.28.8.1 27-Jun-2000  he Pull up revision 1.29 (requested by scottr):
Add support for the Macintosh LC Ethernet Adapter. This was
previously erroneously recognized as an 8390-based card, where
in fact it is using the 83932 (SONIC) controller.
 1.28.6.1 01-Nov-1999  scottr Sync with main branch.
 1.29.12.1 06-Aug-2000  briggs Pullup approved by thorpej --
Add nubus-based SMC91cxx ethernet support for the mac68k.
 1.29.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.29.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.31.8.1 18-Oct-2002  nathanw Catch up to -current.
 1.31.4.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.33.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.33.6.4 17-Jan-2005  skrll Sync with HEAD.
 1.33.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.33.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.33.6.1 03-Aug-2004  skrll Sync with HEAD
 1.36.2.1 21-Jun-2006  yamt sync with head.
 1.37.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.37.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.37.8.1 01-Apr-2006  yamt sync with head.
 1.37.6.1 22-Apr-2006  simonb Sync with head.
 1.37.4.1 09-Sep-2006  rpaulo sync with head
 1.38.62.3 17-Jan-2009  mjf Sync with HEAD.
 1.38.62.2 02-Jun-2008  mjf Sync with HEAD.
 1.38.62.1 03-Apr-2008  mjf Sync with HEAD.
 1.40.14.1 17-Jan-2009  snj Pull up following revision(s) (requested by tsutsui in ticket #280):
sys/arch/mac68k/nubus/if_ae_nubus.c: revision 1.41
Split device_t/softc, missed on MI dp8390nic changes 10 months ago.
Also use aprint_*(), and remove unnecessary casts against void *
variables.
Tested by John Klos on port-mac68k, and should be pulled up to netbsd-5.
 1.40.12.1 19-Jan-2009  skrll Sync with HEAD.
 1.40.4.1 04-May-2009  yamt sync with head.
 1.41.72.1 29-Feb-2020  ad Sync with head.
 1.41.66.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.35 18-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.34 04-Feb-2020  skrll Trailing whitespace
 1.33 04-Feb-2020  skrll Adopt <net/if_stats.h>
 1.32 29-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.31 21-Oct-2019  msaitoh branches: 1.31.2;
if_percpuq(9) automatically increments if_ipackets, so don't increment it in
the driver itself to prevent double count.
 1.30 13-Sep-2019  msaitoh if_flags is neither int nor short. It's unsigned short.
 1.29 05-Feb-2019  msaitoh branches: 1.29.4;
Remove very old IFF_NOTRAILERS flag.
 1.28 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.27 26-Jun-2018  msaitoh branches: 1.27.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.26 29-Jul-2017  riastradh branches: 1.26.2;
Avoid memory leak in netdock_get.

If top is null, this is the first time through and nothing else will
free m.

From Ilja Van Sprundel.
 1.25 15-Dec-2016  ozaki-r branches: 1.25.8;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

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

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

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

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

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

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

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

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

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.22 27-Oct-2012  chs branches: 1.22.12; 1.22.14; 1.22.16; 1.22.20;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.21 05-Apr-2010  joerg branches: 1.21.8; 1.21.14; 1.21.18; 1.21.20; 1.21.22;
Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.20 19-Jan-2010  pooka branches: 1.20.2; 1.20.4;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

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

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.19 07-Nov-2008  dyoung *** Summary ***

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

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

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

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

Return consistent, appropriate error codes from network drivers.

Improve readability. KNF.

*** Details ***

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Let ifioctl_common() handle SIOCGIFADDR.

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

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

bzero -> memset. Delete unnecessary casts to void *. Use
sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with
NULL instead of "testing truth". Replace some instances of (type
*)0 with NULL. Change some K&R prototypes to ANSI C, and join
lines.
 1.18 04-Apr-2008  hauke branches: 1.18.4; 1.18.10; 1.18.12;
Go all the way, and use the new accessor function for the device_xname field.
 1.17 02-Apr-2008  hauke Fall-out from splitting device_t and softc for the dp8390 softc.
 1.16 17-Oct-2007  garbled branches: 1.16.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.15 01-Sep-2007  jmmv Fix build after dyoung's changes.
 1.14 01-Sep-2007  dyoung Change a bazillion occurrences of code resembling this,

error = (cmd == SIOCADDMULTI) ?
ether_addmulti(ifr, &sc->sc_ec) :
ether_delmulti(ifr, &sc->sc_ec);

if (error == ENETRESET) {

to this,

if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {

which does the same thing.

(A bazillion is a very large number. This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)

Use ifreq_getaddr() twice in es(4).

Whitespace nits.
 1.13 05-Mar-2007  he branches: 1.13.2; 1.13.10; 1.13.14; 1.13.18; 1.13.20;
Use a char* for pointer arithmetic.
 1.12 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11 24-Dec-2005  perry branches: 1.11.26;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.10 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.9 11-Dec-2005  christos merge ktrace-lwp.
 1.8 03-Jun-2005  rjs branches: 1.8.2;
Add const.
 1.7 30-Jan-2005  thorpej Eliminate use of M_HASFCS.
 1.6 15-Jan-2005  chs branches: 1.6.2; 1.6.4;
de-__P, remove register, ansify, b* -> mem*.
 1.5 30-Oct-2004  thorpej When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
 1.4 15-Jul-2003  lukem branches: 1.4.4;
__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 19-Jun-2002  itojun branches: 1.1.2; 1.1.4; 1.1.6;
netdock* - ethernet driver for Asante NetDock/Newer Ether MicroDock.
by Daishi Kato <daishi@axlight.com>
test/stabilization by Takeo Kuwata <tkuwata@virus.kyoto-u.ac.jp>
 1.1.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 19-Jun-2002  jdolecek file if_netdock_nubus.c was added on branch kqueue on 2002-09-06 08:36:58 +0000
 1.1.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.2 01-Aug-2002  nathanw Catch up to -current.
 1.1.4.1 19-Jun-2002  nathanw file if_netdock_nubus.c was added on branch nathanw_sa on 2002-08-01 02:42:22 +0000
 1.1.2.2 16-Jul-2002  gehenna catch up with -current.
 1.1.2.1 19-Jun-2002  gehenna file if_netdock_nubus.c was added on branch gehenna-devsw on 2002-07-16 08:40:11 +0000
 1.3.6.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.6.6 04-Feb-2005  skrll Sync with HEAD.
 1.3.6.5 17-Jan-2005  skrll Sync with HEAD.
 1.3.6.4 02-Nov-2004  skrll Sync with HEAD.
 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.4.1 24-Jan-2005  he Pull up revision 1.5 (requested by thorpej in ticket #939):
When adding or deleting multicast addresses, only change
the address filter if the interface is marked RUNNING.
Fixes PR#27678.
 1.6.4.1 12-Feb-2005  yamt sync with head.
 1.6.2.1 29-Apr-2005  kent sync with -current
 1.8.2.2 03-Sep-2007  yamt sync with head.
 1.8.2.1 21-Jun-2006  yamt sync with head.
 1.11.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.13.20.1 06-Nov-2007  matt sync with HEAD
 1.13.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.13.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.13.10.1 03-Oct-2007  garbled Sync with HEAD
 1.13.2.1 09-Oct-2007  ad Sync with head.
 1.16.16.3 17-Jan-2009  mjf Sync with HEAD.
 1.16.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.16.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.18.12.1 19-Jan-2009  skrll Sync with HEAD.
 1.18.10.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.18.4.3 11-Aug-2010  yamt sync with head.
 1.18.4.2 11-Mar-2010  yamt sync with head
 1.18.4.1 04-May-2009  yamt sync with head.
 1.20.4.1 30-May-2010  rmind sync with head
 1.20.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.21.22.1 12-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1472):
sys/arch/mac68k/nubus/if_netdock_nubus.c: revision 1.26
Avoid memory leak in netdock_get.
If top is null, this is the first time through and nothing else will
free m.
From Ilja Van Sprundel.
 1.21.20.1 12-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1472):
sys/arch/mac68k/nubus/if_netdock_nubus.c: revision 1.26
Avoid memory leak in netdock_get.
If top is null, this is the first time through and nothing else will
free m.
From Ilja Van Sprundel.
 1.21.18.2 03-Dec-2017  jdolecek update from HEAD
 1.21.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.21.14.1 12-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1472):
sys/arch/mac68k/nubus/if_netdock_nubus.c: revision 1.26
Avoid memory leak in netdock_get.
If top is null, this is the first time through and nothing else will
free m.
From Ilja Van Sprundel.
 1.21.8.1 30-Oct-2012  yamt sync with head
 1.22.20.1 11-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1468):
sys/arch/mac68k/nubus/if_netdock_nubus.c: revision 1.26
Avoid memory leak in netdock_get.
If top is null, this is the first time through and nothing else will
free m.
From Ilja Van Sprundel.
 1.22.16.1 11-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1468):
sys/arch/mac68k/nubus/if_netdock_nubus.c: revision 1.26
Avoid memory leak in netdock_get.
If top is null, this is the first time through and nothing else will
free m.
From Ilja Van Sprundel.
 1.22.14.4 28-Aug-2017  skrll Sync with HEAD
 1.22.14.3 05-Feb-2017  skrll Sync with HEAD
 1.22.14.2 09-Jul-2016  skrll Sync with HEAD
 1.22.14.1 19-Mar-2016  skrll Sync with HEAD
 1.22.12.1 11-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1468):
sys/arch/mac68k/nubus/if_netdock_nubus.c: revision 1.26
Avoid memory leak in netdock_get.
If top is null, this is the first time through and nothing else will
free m.
From Ilja Van Sprundel.
 1.24.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.25.8.2 24-Oct-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1416):

sys/dev/ic/i82586.c: revision 1.86
sys/arch/arm/ep93xx/epe.c: revision 1.45
sys/dev/pcmcia/if_cnw.c: revision 1.66
sys/arch/mac68k/nubus/if_netdock_nubus.c: revision 1.31
sys/dev/qbus/if_il.c: revision 1.36
sys/dev/pcmcia/if_ray.c: revision 1.95
sys/dev/qbus/if_qt.c: revision 1.24

if_percpuq(9) automatically increments if_ipackets, so don't increment it in
the driver itself to prevent double count.
 1.25.8.1 05-Aug-2017  snj Pull up following revision(s) (requested by spz in ticket #181):
sys/arch/mac68k/nubus/if_netdock_nubus.c: revision 1.26
Avoid memory leak in netdock_get.
If top is null, this is the first time through and nothing else will
free m.
From Ilja Van Sprundel.
 1.26.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.26.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.27.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.27.2.1 10-Jun-2019  christos Sync with HEAD
 1.29.4.1 23-Oct-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #371):

sys/dev/ic/i82586.c: revision 1.86
sys/arch/arm/ep93xx/epe.c: revision 1.45
sys/dev/pcmcia/if_cnw.c: revision 1.66
sys/arch/mac68k/nubus/if_netdock_nubus.c: revision 1.31
sys/arch/arm/sunxi/sunxi_can.c: revision 1.2
sys/dev/qbus/if_il.c: revision 1.36
sys/dev/pcmcia/if_ray.c: revision 1.95
sys/dev/qbus/if_qt.c: revision 1.24

if_ipackets is incremented in can_input(), so don't increment it in
sunxi_can_rx_intr to prevent double count. OK'd by bouyer@.

if_percpuq(9) automatically increments if_ipackets, so don't increment it in
the driver itself to prevent double count.
 1.31.2.1 29-Feb-2020  ad Sync with head.
 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 12-Feb-2012  matt branches: 1.9.6;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.8 11-Dec-2005  christos branches: 1.8.112; 1.8.116;
merge ktrace-lwp.
 1.7 03-Jun-2005  rjs Add const.
 1.6 15-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*.
 1.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 02-Oct-2002  thorpej branches: 1.4.6;
Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 01-Aug-2000  briggs branches: 1.2.2; 1.2.4; 1.2.8; 1.2.12;
Remove hack for unswapped read/write_multi in swapped space.
Driver now uses read/write_multi_stream_2.
 1.1 30-Jul-2000  briggs M.d. glue for nubus SMC 91cxx-based cards--including Focus Interlan and
AsanteFAST.
 1.2.12.1 18-Oct-2002  nathanw Catch up to -current.
 1.2.8.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.2.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.4.1 01-Aug-2000  bouyer file if_sm_nubus.c was added on branch thorpej_scsipi on 2000-11-20 20:12:25 +0000
 1.2.2.2 06-Aug-2000  briggs Pullup approved by thorpej --
Add nubus-based SMC91cxx ethernet support for the mac68k.
 1.2.2.1 01-Aug-2000  briggs file if_sm_nubus.c was added on branch netbsd-1-5 on 2000-08-06 12:56:19 +0000
 1.4.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.6.4 17-Jan-2005  skrll Sync with HEAD.
 1.4.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.116.1 18-Feb-2012  mrg merge to -current.
 1.8.112.2 30-Oct-2012  yamt sync with head
 1.8.112.1 17-Apr-2012  yamt sync with head
 1.9.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.30 20-Feb-2021  rin sn(4): Add rnd(9) support.
 1.29 23-Apr-2008  tsutsui branches: 1.29.102;
Split softc/device_t and misc cleanup for sn(4).
 1.28 17-Oct-2007  garbled branches: 1.28.16; 1.28.18;
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.27 10-Jun-2007  tsutsui branches: 1.27.10;
Switch mac68k's sn(4) Ethernet to MI SONIC driver.

Tested with Apple Ethernet CS Twisted-Pare Card on LC630 by me
and Quadra 650 on-board Ethernet by hauke@.
NuBus based cards and PowerBook variants are still untested.
 1.26 11-Dec-2005  christos branches: 1.26.30; 1.26.32; 1.26.38;
merge ktrace-lwp.
 1.25 03-Jun-2005  rjs branches: 1.25.2;
Add const.
 1.24 15-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*.
 1.23 15-Jul-2003  lukem __KERNEL_RCSID()
 1.22 02-Oct-2002  thorpej branches: 1.22.6;
Use CFATTACH_DECL().
 1.21 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.20 29-Sep-1999  scottr branches: 1.20.16; 1.20.20;
Add support for the Macintosh LC Ethernet Adapter, from Ken'ichi Ishizaka.
This was erroneously recognized as an 8390-based card, where in fact it is
using the 83932 (SONIC) controller.
 1.19 05-Jul-1998  jonathan branches: 1.19.8; 1.19.10;
defopt INET, NETATALK.
 1.18 02-May-1998  scottr Move on-board I/O and NuBus drivers to their own directories
via repository copy, and make the necessary adjustments to reflect
the moved files.
 1.17 26-Oct-1997  briggs The 16- and 32-bit Apple card types got reversed somehow.
 1.16 11-Aug-1997  scottr branches: 1.16.4;
Make #include directives consistent. All MD headers are of the form:

#include <mac68k/{dev,mac68k}/foo.h>
 1.15 26-Jun-1997  scottr branches: 1.15.4;
Identify and use the Apple Twisted Pair NB card properly, from PR 3789
submitted by Denny Gentry <denny1@home.com>; investigation on the hardware
done by Bob Nestor.
 1.14 15-Jun-1997  scottr Update from Denny Gentry <denny1@home.com>, PR 3685:

Simplify the way transmit buffers are managed, remove assumptions about
NBPG, simplify sonic_get handling, update snioctl to be more like other
current drivers, and probably a few other changes I've now forgotten about.
 1.13 11-May-1997  scottr Implement new NuBus slot space mapping/probing code, utilizing bus.h (and
our MD bus_space_probe() extension). This has several side effects:

- NuBus drivers must map and unmap slot space, rather than relying
on this happening before they are attached.
- Functions exported to NuBus drivers from nubus.c now need to be
supplied with a bus space tag/handle pair.
- Old bus map/peek functions can be garbage collected, as can pmap
support for the same.

Because of some current limitations of the bus space specification, we
are violating the abstraction in grf_mv (NuBus grf driver). All such
violations are clearly marked /* XXX */, and must be addressed when
the specification is updated.
 1.12 01-May-1997  briggs Treat drhw 118 and 119 the same for Apple ethernet cards.
 1.11 30-Apr-1997  scottr Remove dependency on if_aereg.h for vendor constants; these are really
driver-, not architecture-specific.
 1.10 22-Apr-1997  scottr Remove obsolete drsw diagnostic; make formatting consistent; KNF.
 1.9 22-Apr-1997  briggs Make sure that we unmap the space that we mapped if we can't identify the card.
 1.8 22-Apr-1997  briggs Initialize 'offset' to make gcc happy.
 1.7 14-Apr-1997  briggs Use an offset parameter when loading the reg_map--some cards use the "other"
16 bits of the words.
 1.6 13-Apr-1997  briggs Oops. We do not want to unmap something that we've used bus_space_subregion
to get.
 1.5 13-Apr-1997  briggs Some updates based on information from Bob Nestor <rnestor@metronet.com>
about his SONIC-T LC/PDS card.
 1.4 10-Apr-1997  briggs Changes from Denny Gentry <denny1@home.com>:
Change in the way receive buffer areas are handled. Before we gave
the chip 16 buffers, each 1536 bytes (big enough for one packet).
Now we're handing the chip 8 buffers, each 4 Kbytes, and letting
the chip fit as many packets as it can in each one. This should
help keep it from running out of buffer space. Also make some of
the performance-crucial routines inline. It made no measurable
difference except to make me feel better

Changes from Bob Nestor <rnestor@metronet.com> to get closer to support
for his Apple SONIC-based nubus card.

Changes from me to try to get SONIC's MAC address from MacOS settings if
we can't read the PROM space.
 1.3 30-Mar-1997  briggs Some new SONIC code from Denny Gentry <denny1@home.com> with a couple of
tweaks and bug fixes by yours truly.

Here's what Denny had to say:

nubus.h:
- add a drsw entry for my card
[ I also added a couple of constants for more display cards ]
if_sn.c:
- allocate sc->space using malloc (Scott wanted this).
- make csr accesses use NIC_PUT/GET, remove sc->sc_csr.
- add multicast and IFF_PROMISC support. multicast isn't
well tested, but I made sure the unicast case still
works.
- finish the new arp interface, remove sc->sc_enaddr
if_snreg.h:
- remove struct sonic_reg
if_snvar.h:
- add NIC_PUT and NIC_GET macros a la if_ae
- remove sc_txhead, it isn't used.
if_sn_nubus.c:
- clean up support for my SE/30 card.
- Move add_nubus_intr from if_sn.c (to keep if_sn.c MI)
if_sn_obio.c:
- make Q610, C610, Q650, C650, Q800 use EXBUS.
- PB500 had a "return" where "break" was intended. PB500
probably wasn't working.
- move add_nubus_intr from if_sn.c.
- add an "explanation" why Apple's ethernet addr is encoded
in token ring format in the PROM.
 1.2 16-Mar-1997  is On request from Allen Briggs, converted this to new ARP
system. Somebody should actually test if this compiles (and works) on
Mac68k... I only carefully checked cvs diff -u.
 1.1 15-Mar-1997  briggs SONIC driver--originally from pica. Much work done by Dennis Gentry and
Takeshi Yanagisawa to get it working. Some minor hacking by me here and
there.
 1.15.4.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.16.4.1 27-Oct-1997  mellon Pull rev 1.17 up from trunk (briggs)
 1.19.10.1 27-Jun-2000  he Pull up revision 1.20 (requested by scottr):
Add support for the Macintosh LC Ethernet Adapter. This was
previously erroneously recognized as an 8390-based card, where
in fact it is using the 83932 (SONIC) controller.
 1.19.8.1 01-Nov-1999  scottr Sync with main branch.
 1.20.20.1 18-Oct-2002  nathanw Catch up to -current.
 1.20.16.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.22.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.22.6.4 17-Jan-2005  skrll Sync with HEAD.
 1.22.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.22.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.22.6.1 03-Aug-2004  skrll Sync with HEAD
 1.25.2.1 03-Sep-2007  yamt sync with head.
 1.26.38.1 26-Jun-2007  garbled Sync with HEAD.
 1.26.32.1 11-Jul-2007  mjf Sync with head.
 1.26.30.1 15-Jul-2007  ad Sync with head.
 1.27.10.1 06-Nov-2007  matt sync with HEAD
 1.28.18.1 18-May-2008  yamt sync with head.
 1.28.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.29.102.1 03-Apr-2021  thorpej Sync with HEAD.
 1.68 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.67 24-Apr-2021  thorpej branches: 1.67.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.66 08-Jan-2019  jdolecek branches: 1.66.14;
no need to include <machine/param.h> if <sys/param.h> already included
 1.65 18-Oct-2014  snj branches: 1.65.18; 1.65.20;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.64 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.63 17-Dec-2008  cegger branches: 1.63.14; 1.63.24;
kill MALLOC and FREE macros.
 1.62 07-Mar-2007  tsutsui branches: 1.62.40; 1.62.44; 1.62.52;
Change variables which are used to read byte stream data
from (void *) to (char *).
 1.61 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.60 11-Dec-2005  christos branches: 1.60.26;
merge ktrace-lwp.
 1.59 03-Jun-2005  rjs branches: 1.59.2;
Add const.
 1.58 15-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*.
 1.57 15-Jul-2003  lukem __KERNEL_RCSID()
 1.56 01-Jan-2003  thorpej branches: 1.56.2;
Use aprint_normal() for cfprint routines.
 1.55 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.54 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.53 13-Apr-2002  briggs Fixes and changes from Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>.
* Clean up after briggs@ changes to support bus_dma.
* Add support for reading sMemory resources from nubus cards.
* Add support for old cards with only the board rsrc (NatSemi NB-GPIB, e.g.)
* Add a few more card identifiers.
 1.52 10-Apr-2002  briggs Use m68k/m68k/cacheops.[ch]
Use m68k/m68k/bus_dma.c
- Add mainbus_attach_args with bus_space_tag_t and bus_dma_tag_t.
- Use passed-in tags for nubus scan.
 1.51 20-Aug-2001  wiz branches: 1.51.6;
"wierd" is weird.
 1.50 31-Jul-2000  briggs branches: 1.50.4;
Fix code to read a string from the nubus board--it was not terminating
the string properly when the string on the board is longer than the
pre-allocated space.
 1.49 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.48 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.47 23-Aug-1999  thorpej branches: 1.47.2;
Garbage-collect reference to <sys/dmap.h>.
 1.46 01-Jun-1999  briggs Add debug routine as an aid for working out new nubus cards.
 1.45 02-Jun-1998  scottr branches: 1.45.8; 1.45.12;
An inability to map a slot's address space may be a normal condition --
for instance, on-board video may live here. Make the complaint about
this a DEBUG rather than a DIAGNOSTIC message.
 1.44 02-May-1998  scottr Move on-board I/O and NuBus drivers to their own directories
via repository copy, and make the necessary adjustments to reflect
the moved files.
 1.43 13-Jan-1998  scottr Update for bus.h changes.
 1.42 12-Jan-1998  thorpej Update for changes to config.
 1.41 11-Aug-1997  scottr Make #include directives consistent. All MD headers are of the form:

#include <mac68k/{dev,mac68k}/foo.h>
 1.40 15-Jul-1997  scottr branches: 1.40.2;
In nubus_print(), always print the NuBus slot number. Also, refine it so
that when no driver matches, our output is a little more consistent with
existing practice.
 1.39 14-Jul-1997  scottr Clean up some DIAGNOSTIC messages: use %x to display the slot number.
 1.38 13-May-1997  scottr Update a recently-added comment re: bytelanes values.
 1.37 11-May-1997  scottr Implement new NuBus slot space mapping/probing code, utilizing bus.h (and
our MD bus_space_probe() extension). This has several side effects:

- NuBus drivers must map and unmap slot space, rather than relying
on this happening before they are attached.
- Functions exported to NuBus drivers from nubus.c now need to be
supplied with a bus space tag/handle pair.
- Old bus map/peek functions can be garbage collected, as can pmap
support for the same.

Because of some current limitations of the bus space specification, we
are violating the abstraction in grf_mv (NuBus grf driver). All such
violations are clearly marked /* XXX */, and must be addressed when
the specification is updated.
 1.36 23-Apr-1997  briggs On video devices, if we're loading non-default resource values, save the
resource ID. Thanks to Paul Goyette <paul@pgoyette.bdt.com> for spotting
this one.
 1.35 22-Apr-1997  scottr #ifdef DIAGNOSTIC, print the NuBus type fields for unrecognized boards.
 1.34 10-Apr-1997  briggs Some patches from Bob Nestor <rnestor@metronet.com> and myself to edge
toward support for an Apple SONIC-based ethernet card. Some cards, like
his, were being missed and/or probed like video cards!
 1.33 15-Mar-1997  scottr Defer enabling NuBus slot interrupts until all slots have been probed
and drivers attached. This removes the need for the MAC68K_BROKEN_VIDEO
option. From Allen Briggs.
 1.32 28-Feb-1997  scottr Remove duplicate <machine/bus.h> include that crept in.
 1.31 24-Feb-1997  scottr NUBUS_SLOT_TO_PADDR -> NUBUS_SLOT2PA
 1.30 22-Feb-1997  scottr Make this compile again; missed this file when fixing nubus.h errors.
 1.29 17-Dec-1996  scottr branches: 1.29.6;
Revamp mainbus and obio autoconfiguration, with some direction (and the
indirect bus code framework) from Jason Thorpe. This allows us to dump
bus_scan() and bus_print(), and move bus_peek() and bus_mapin() to the
NuBus code (since they'll eventually go away, anyway).
 1.28 16-Dec-1996  scottr Convert all foo_match() functions to use a `struct cfdata *' for their
second argument. The NuBus autoconfig code had to be reorganized as a
result of this, and looks much more like a directly-attached bus now.
These changes eliminate __BROKEN_INDIRECT_CONFIG.
 1.27 21-Oct-1996  scottr Fix a raft of printf format strings and some declaration problems for
the case where we define DEBUG. From Erik Bertelsen, closes PR 2871.
 1.26 13-Oct-1996  christos backout previous kprintf change
 1.25 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.24 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.23 08-May-1996  scottr Make this compile if DEBUG is defined.
 1.22 07-May-1996  briggs Clean up an error printf() and use proper macro.
 1.21 06-May-1996  briggs Ooops. Remove debugging printf().
 1.20 06-May-1996  briggs Do not depend on the nubus being mapped in one huge segment.
 1.19 05-May-1996  briggs Prototype for -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-uninitialized
Also change the device probing scheme to use something a bit more rational.
A current side-effect is that nubus cards are double-mapped. I expect
to fix that shortly.
Also change splclock() to block everything but serial hardware interrupts.
 1.18 04-Apr-1996  scottr Make this compile again; will need to deal with matchbyname() later, though.
 1.17 01-Apr-1996  briggs Clean up for higher warning level.
 1.16 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.15 12-Jan-1996  briggs Fixes from PR #1931 w/ minor mod in vm_machdep.c
 1.14 04-Aug-1995  briggs Nuke int_video_start in favor of consistent use of mac68k_vidlog.
Don't find the internal video more than once.
Probe for internal video before nubus instead of after.
 1.13 30-Jul-1995  briggs Fix the internal video probe again.
 1.12 21-Jun-1995  briggs Add some debugging (conditional on DEBUG). Add a more correct probe for
internal video. Clean up nubusprint() a bit.
 1.11 29-Apr-1995  briggs Add new nubus handling that's much more robust.
Update via, if_ae, and grf accordingly.
Revamp grf.
 1.10 21-Apr-1995  briggs First pass of KNFication. Needs more.
 1.9 12-Apr-1995  briggs Make nubus indirect. Duh.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 26-Jun-1994  briggs Don't assume NuBus is at NBBASE. We might remap it.
 1.6 23-Feb-1994  briggs Do a cleaner probe. This still needs lots of work, but will work on
reasonable cards...
 1.5 22-Feb-1994  briggs Minor tweaks to prevent hangs and other bad behavior... Needs much more
work now that we have more info (Designing Cards and Drivers for the
Macintosh Family Hardware.
 1.4 30-Jan-1994  briggs Just playing include-cop.
 1.3 21-Dec-1993  briggs Update ethernet driver to use config.new. At least, it's a first stab
working from mycroft's magnum changes to if_ed.c.
 1.2 29-Nov-1993  briggs Update to current work in progress. This includes an update to
use config.new.
Numerous updates to console so it works better on the SE/30 screen.
Some nice changes from Brad Parker for handling NuBUS and an ethernet
driver that I haven't worked on, yet.
 1.1 29-Sep-1993  briggs branches: 1.1.1;
Initial revision
 1.1.1.1 29-Sep-1993  briggs The current MacBSD architecture sub-directory for NetBSD-0.9--more or
less. It needs some help to get to be -current. Support for minimal
hardware on the SE/30, II, IIx, and IIcx exists.
 1.29.6.1 12-Mar-1997  is Merge in changes from The Trunk, partially just reimplementing newarp.
 1.40.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.45.12.1 21-Jun-1999  thorpej Sync w/ -current.
 1.45.8.2 01-Nov-1999  scottr Repair merge-related damage
 1.45.8.1 01-Nov-1999  scottr Sync with main branch.
 1.47.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.50.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.50.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.50.4.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.51.6.4 03-Jan-2003  thorpej Sync with HEAD.
 1.51.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.51.6.2 17-Apr-2002  nathanw Catch up to -current.
 1.51.6.1 20-Aug-2001  nathanw file nubus.c was added on branch nathanw_sa on 2002-04-17 00:03:39 +0000
 1.56.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.56.2.4 17-Jan-2005  skrll Sync with HEAD.
 1.56.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.56.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.56.2.1 03-Aug-2004  skrll Sync with HEAD
 1.59.2.1 03-Sep-2007  yamt sync with head.
 1.60.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.62.52.1 19-Jan-2009  skrll Sync with HEAD.
 1.62.44.1 04-May-2009  yamt sync with head.
 1.62.40.1 17-Jan-2009  mjf Sync with HEAD.
 1.63.24.2 03-Dec-2017  jdolecek update from HEAD
 1.63.24.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.63.14.1 30-Oct-2012  yamt sync with head
 1.65.20.1 10-Jun-2019  christos Sync with HEAD
 1.65.18.1 18-Jan-2019  pgoyette Synch with HEAD
 1.66.14.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.67.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.66 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.65 04-Mar-2009  hauke branches: 1.65.12; 1.65.22;
Add Nubus IDs for the Atto SiliconExpress IV, an isp1000 based
fast/wide SCSI adapter.
 1.64 07-Mar-2007  tsutsui branches: 1.64.44; 1.64.52; 1.64.58;
Change variables which are used to read byte stream data
from (void *) to (char *).
 1.63 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.62 06-Dec-2006  hauke branches: 1.62.2;
Support for four nubus video cards:

Formac ProNitron 80.IVb (1024x768/8)
Relax 19" Model 200 (1024x768/8)
Apple Monochrome Video Card (640x480/1)
VillageTronic Mac Picasso 320 (up to 1920x1080/up to 24)

Nubus identifiers for Creative Solutions parallel & serial cards,
and a Becton Dickinson data acquisition card.
 1.61 11-Dec-2005  christos branches: 1.61.20; 1.61.22;
merge ktrace-lwp.
 1.60 03-Jun-2005  rjs branches: 1.60.2;
Add const.
 1.59 15-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*.
 1.58 25-Apr-2004  rjs Add the TI microExplorer card.
 1.57 13-Apr-2002  briggs branches: 1.57.10;
Fixes and changes from Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>.
* Clean up after briggs@ changes to support bus_dma.
* Add support for reading sMemory resources from nubus cards.
* Add support for old cards with only the board rsrc (NatSemi NB-GPIB, e.g.)
* Add a few more card identifiers.
 1.56 10-Apr-2002  briggs Use m68k/m68k/cacheops.[ch]
Use m68k/m68k/bus_dma.c
- Add mainbus_attach_args with bus_space_tag_t and bus_dma_tag_t.
- Use passed-in tags for nubus scan.
 1.55 22-Jan-2001  briggs branches: 1.55.4; 1.55.8;
Clear interrupts on the RasterOps PaintBoard Prism GT 1.0. From
Alastair Bridgewater <nyef@softhome.net>.
 1.54 22-Jan-2001  briggs Handle interrupts on the Radius DirectColor/GX (id 0x27c). From
Alastair Bridgewater <nyef@softhome.net>.
 1.53 08-Dec-2000  briggs Do not define the same symbol with two different values. PR#11664.
 1.52 05-Dec-2000  briggs Add the DrHw Apple 24AC "Boogie" video card.
Thanks to Lucas Lay <segfault@mac.com> for digging it up.
 1.51 05-Dec-2000  briggs Add defines for:
Apple WGS SCSI / cache card
FWB JackHammer SCSI card
 1.50 26-Jul-2000  briggs Add Sigma Designs L-View and AsanteFAST product codes.
 1.49 18-Mar-2000  scottr branches: 1.49.4;
Add the RasterOps 24MxTV; this card operates in the same manner as two
other RasterOps boards we already handle. Information provided by
Greg Kerr.
 1.48 14-Jun-1999  briggs branches: 1.48.2;
Clear interrupts on a Radius GS/C card. Thanks go to Yasufumi Suzuki
<yattin@sco.bekkoame.ne.jp> for doing the MacsBug "leg"work for me.
 1.47 10-Jun-1999  briggs Note that 0x146 is a Micron Exceed.
 1.46 01-Jun-1999  briggs Add define for another ethernet card (Nuvolink)
Wrap nubus_scan_slot() prototype in #ifdef DEBUG.
 1.45 30-May-1999  briggs PR 7021 from Yoshihisa Sugimoto <sugimoto@sums.shiga-med.ac.jp>:
Clear interrupt properly on the RasterOps 24XLTV. Same as the 24LX.
 1.44 27-Sep-1998  scottr branches: 1.44.6; 1.44.8; 1.44.10; 1.44.12;
Add support for the TFL LAN Inc. E410/E420 PDS cards. Based on code
from Ken Nakata in PR 6199, which was in turn derived from code from
Haru Maruyama <h-maru @ da2.so-net.ne.jp>.
 1.43 15-Sep-1998  scottr Add the DrHw value for the MicroConversions 2124NB II display adapter,
from Paul Goyette.
 1.42 17-Aug-1998  briggs Update comment after cut and paste.
 1.41 12-Aug-1998  scottr Support Cabletron Ethernet card, from John Marohn in PR 5762.
 1.40 09-Aug-1998  briggs Support video interrupt for GrandVimage 17iL video card.
 1.39 23-May-1998  briggs Handle video interrupts for the Radius PrecisionColor 24X card. Thanks for
sleuthing and testing go to Robert Oelkers <windcatcher@earthlink.net>.
 1.38 07-May-1998  briggs New video card: Vimage by Interware Co., Ltd.
Define constants for the PLI QuickSCSI nubus board.
 1.37 26-Apr-1998  briggs Deal with the video interrupt for the RasterOps 8/24XLi. Thanks for the
information go to Tadashi Ueda <ng6t-ued@asahi-net.or.jp>.
 1.36 24-Apr-1998  briggs Add interrupt support for two more video cards: the Formac color card II
and the Radius PrecisionColor 24Xp. Thanks to <falk.stern@luene.net> and
<Mario_Magliocco@broder.com> for their remote sleuthing and testing.
 1.35 03-Dec-1997  briggs Thanks to Paul Goyette <paul@whooppee.com> for a patch to clear the
interrupt properly on a SuperMac Spectrum/8 Series III, and thanks
to Dan McMahill for loaning the card to Paul.
I modified Paul's patch somewhat to change grfmv_intr_generic_{1,4}
to grfmv_intr_generic_write{1,4} and added grfmv_intr_generic_or4 to
handle this card.
 1.34 30-Nov-1997  briggs Support for the Lapis ProColorServer 8 PDS on the SE/30. This prevents
hangs when trying to use this video card in conjunction with an ethernet
card. Thanks to David Condon <david@apk.net> for information and testing.
 1.33 25-Oct-1997  briggs Handle interrupts on E-Machines Futura-SX. From Paul Goyette, PR 4348.
 1.32 09-Oct-1997  briggs branches: 1.32.2;
Clear interrupts properly on the Radius PrecisionColor 8.
Thanks for the info go to Andrew MacGibbon <andrew-m@cs.auckland.ac.nz>
 1.31 26-Sep-1997  briggs Add another Dayna card to the Apple-compa. list.
Define a constant for the SuperMac Spectrum/24 series III display card.
Thanks go to Luca Falzoni <falzoni@jetai.unipv.it> for trying out the
code for the Dayna ethernet support.
 1.30 15-Aug-1997  briggs Add interrupt handler for SuperMac GFX.
Tested by Kai-Yew Lum <kaiyewl@engin.umich.edu> back in May.
 1.29 14-Aug-1997  scottr Recognize the Sigma Designs ColorMax card, and handle the interrupt. Code
provided by Brian Foley <bfoley@gpo.iol.ie> via Allen Briggs, updated for
bus.h by me.
 1.28 15-Jul-1997  scottr branches: 1.28.2;
Add DrHw value for the Macintosh Display Card
 1.27 01-Jul-1997  scottr Add support for Portrait Video Card. From SUNAGAWA Keiki
<kei_sun@ba2.so-net.or.jp> in PR 3821.
 1.26 11-May-1997  scottr Implement new NuBus slot space mapping/probing code, utilizing bus.h (and
our MD bus_space_probe() extension). This has several side effects:

- NuBus drivers must map and unmap slot space, rather than relying
on this happening before they are attached.
- Functions exported to NuBus drivers from nubus.c now need to be
supplied with a bus space tag/handle pair.
- Old bus map/peek functions can be garbage collected, as can pmap
support for the same.

Because of some current limitations of the bus space specification, we
are violating the abstraction in grf_mv (NuBus grf driver). All such
violations are clearly marked /* XXX */, and must be addressed when
the specification is updated.
 1.25 02-May-1997  briggs Thanks to Tobias Beal <tbeal41@maine.maine.edu>, we can clear interrupts
on at least one Radius Precisioncolor 8 board.
 1.24 01-May-1997  briggs Treat drhw 118 and 119 the same for Apple ethernet cards.
 1.23 01-May-1997  briggs Add in a couple more board types.
 1.22 10-Apr-1997  briggs Ignore SE/30 faux-video card.
 1.21 10-Apr-1997  briggs Comment video cards and add define for SuperMac Thunder/24.
 1.20 10-Apr-1997  briggs Changes from Bob Nestor to come closer to supporting his Apple SONIC-based
nubus card.
 1.19 01-Apr-1997  briggs Add DrHW for RasterOps CB264--From Scott Reynolds--and link it in to the
proper interrupt routine.
 1.18 30-Mar-1997  briggs Some new SONIC code from Denny Gentry <denny1@home.com> with a couple of
tweaks and bug fixes by yours truly.

Here's what Denny had to say:

nubus.h:
- add a drsw entry for my card
[ I also added a couple of constants for more display cards ]
if_sn.c:
- allocate sc->space using malloc (Scott wanted this).
- make csr accesses use NIC_PUT/GET, remove sc->sc_csr.
- add multicast and IFF_PROMISC support. multicast isn't
well tested, but I made sure the unicast case still
works.
- finish the new arp interface, remove sc->sc_enaddr
if_snreg.h:
- remove struct sonic_reg
if_snvar.h:
- add NIC_PUT and NIC_GET macros a la if_ae
- remove sc_txhead, it isn't used.
if_sn_nubus.c:
- clean up support for my SE/30 card.
- Move add_nubus_intr from if_sn.c (to keep if_sn.c MI)
if_sn_obio.c:
- make Q610, C610, Q650, C650, Q800 use EXBUS.
- PB500 had a "return" where "break" was intended. PB500
probably wasn't working.
- move add_nubus_intr from if_sn.c.
- add an "explanation" why Apple's ethernet addr is encoded
in token ring format in the PROM.
 1.17 24-Feb-1997  scottr NUBUS_SLOT_TO_PADDR -> NUBUS_SLOT2PA
 1.16 19-Feb-1997  scottr Add a bus space tag field to nubus_attach_args
 1.15 17-Dec-1996  scottr branches: 1.15.6;
Define struct nubus_attach_args
 1.14 07-May-1996  briggs Get rid of some old, now meaningless macros.
 1.13 05-May-1996  briggs Prototype for -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-uninitialized
Also change the device probing scheme to use something a bit more rational.
A current side-effect is that nubus cards are double-mapped. I expect
to fix that shortly.
Also change splclock() to block everything but serial hardware interrupts.
 1.12 12-Jan-1996  briggs Patch to at least recognise FOCUS EtherLAN. From Erik Bertelson
<erik@sockdev.uni-c.dk>
 1.11 24-Sep-1995  briggs Add Technology Works ethernet card. From
Kazunari Nakamura <kazu@nkk.co.jp>.
 1.10 25-Aug-1995  briggs Add constants for CSI's communications card.
 1.9 30-Jul-1995  briggs Fix the internal video probe again.
 1.8 01-Jul-1995  briggs Fix buglet that was missed when converting nubus to non pa==va mapping.
 1.7 21-Jun-1995  briggs Make NUBUS_BASE_TO_SLOT and reverse not depend on VA==PA for NuBus.
Add constant for DRSW_FARALLON.
 1.6 05-May-1995  briggs Add some code/defines to differentiate Asante and Interlan/Gator cards
correctly with the new nubus code.
 1.5 29-Apr-1995  briggs Add new nubus handling that's much more robust.
Update via, if_ae, and grf accordingly.
Revamp grf.
 1.4 21-Apr-1995  briggs First pass of KNFication. Needs more.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 29-Nov-1993  briggs Update to current work in progress. This includes an update to
use config.new.
Numerous updates to console so it works better on the SE/30 screen.
Some nice changes from Brad Parker for handling NuBUS and an ethernet
driver that I haven't worked on, yet.
 1.1 29-Sep-1993  briggs branches: 1.1.1;
Initial revision
 1.1.1.1 29-Sep-1993  briggs The current MacBSD architecture sub-directory for NetBSD-0.9--more or
less. It needs some help to get to be -current. Support for minimal
hardware on the SE/30, II, IIx, and IIcx exists.
 1.15.6.1 12-Mar-1997  is Merge in changes from The Trunk, partially just reimplementing newarp.
 1.28.2.3 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.28.2.2 29-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.28.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.32.2.2 01-Dec-1997  mellon Pull rev 1.34 up from trunk (briggs) (reviewed by mellon)
 1.32.2.1 26-Oct-1997  mellon Pull rev 1.33 up from trunk (briggs)
 1.44.12.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.44.10.1 21-Jun-1999  thorpej Sync w/ -current.
 1.44.8.2 14-Dec-2000  he Pull up revision 1.52 (requested by briggs):
Add the DrHw Apple 24AC "Boogie" video card.
 1.44.8.1 21-Jun-1999  perry pullup 1.44->1.45 (briggs)
 1.44.6.1 01-Nov-1999  scottr Repair merge-related damage
 1.48.2.4 11-Feb-2001  bouyer Sync with HEAD.
 1.48.2.3 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.48.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.48.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.49.4.2 14-Dec-2000  he Pull up revision 1.52 (requested by briggs):
Add the DrHw Apple 24AC "Boogie" video card.
 1.49.4.1 07-Aug-2000  briggs pullup revision 1.50, approved by thorpej.
Define constants for AsanteFAST and Sigma Designs L*View cards.
 1.55.8.1 17-Apr-2002  nathanw Catch up to -current.
 1.55.4.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.57.10.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.57.10.4 17-Jan-2005  skrll Sync with HEAD.
 1.57.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.57.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.57.10.1 03-Aug-2004  skrll Sync with HEAD
 1.60.2.2 03-Sep-2007  yamt sync with head.
 1.60.2.1 30-Dec-2006  yamt sync with head.
 1.61.22.1 10-Dec-2006  yamt sync with head.
 1.61.20.1 12-Jan-2007  ad Sync with head.
 1.62.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.64.58.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.64.52.1 28-Apr-2009  skrll Sync with HEAD.
 1.64.44.1 04-May-2009  yamt sync with head.
 1.65.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.65.12.1 30-Oct-2012  yamt sync with head

RSS XML Feed