Home | History | Annotate | only in /src/sys/arch/mips/sibyte/dev
History log of /src/sys/arch/mips/sibyte/dev
RevisionDateAuthorComments
 1.4 24-Jul-2017  mrg mostly converted sbmips -> evbmips. the SBMIPS kernel builds fully
sans disksubr.c. intr.h does not need any additional fixes now,
only disklabel.h.

also test-built some other mips kernels.
 1.3 21-Jul-2016  christos branches: 1.3.8;
make this compile
 1.2 20-Feb-2011  matt branches: 1.2.2; 1.2.16; 1.2.34; 1.2.38;
Merge from matt-nb5-mips64.
Add pci support.
new interrupt code.
Adapt to new world order for MIPS
 1.1 10-Jun-2010  cliff branches: 1.1.2; 1.1.4; 1.1.6;
file sbbuswatch.c was initially added on branch matt-nb5-mips64.
 1.1.6.1 05-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.2.2 10-Jun-2010  cliff insert missing */
thanks matt
 1.1.2.1 10-Jun-2010  cliff add bus watcher support for sibyte
 1.2.38.1 26-Jul-2016  pgoyette Sync with HEAD
 1.2.34.2 28-Aug-2017  skrll Sync with HEAD
 1.2.34.1 05-Oct-2016  skrll Sync with HEAD
 1.2.16.1 03-Dec-2017  jdolecek update from HEAD
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 20-Feb-2011  rmind file sbbuswatch.c was added on branch rmind-uvmplock on 2011-03-05 20:51:11 +0000
 1.3.8.1 30-Aug-2017  martin Pull up following revision(s) (requested by mrg in ticket #231):
distrib/sets/lists/base/md.evbmips 1.3
doc/CHANGES 1.2303-1.2304
etc/etc.evbmips/MAKEDEV.conf 1.8
etc/etc.evbmips/Makefile.inc 1.22
etc/mtree/Makefile 1.37
etc/mtree/NetBSD.dist.evbmips 1.1
sys/arch/evbmips/Makefile 1.9
sys/arch/evbmips/conf/SBMIPS upto 1.2
sys/arch/evbmips/conf/SBMIPS.MP upto 1.2
sys/arch/evbmips/conf/SBMIPS64 upto 1.2
sys/arch/evbmips/conf/SBMIPS64.MP upto 1.2
sys/arch/evbmips/conf/files.sbmips upto 1.2
sys/arch/evbmips/conf/std.sbmips upto 1.2
sys/arch/evbmips/include/disklabel.h 1.6
sys/arch/evbmips/include/loadfile_machdep.h
sys/arch/evbmips/include/param.h 1.10
sys/arch/evbmips/include/pci_machdep.h 1.3
sys/arch/evbmips/sbmips/TODO
sys/arch/evbmips/sbmips/autoconf.c
sys/arch/evbmips/sbmips/autoconf.h
sys/arch/evbmips/sbmips/console.c
sys/arch/evbmips/sbmips/cpu.c upto 1.3
sys/arch/evbmips/sbmips/cpuvar.h
sys/arch/evbmips/sbmips/disksubr.c
sys/arch/evbmips/sbmips/leds.h
sys/arch/evbmips/sbmips/locore_machdep.S
sys/arch/evbmips/sbmips/machdep.c upto 1.2
sys/arch/evbmips/sbmips/rtc.c upto 1.2
sys/arch/evbmips/sbmips/sb1250_icu.c upto 1.2
sys/arch/evbmips/sbmips/swarm.h
sys/arch/evbmips/sbmips/systemsw.c upto 1.2
sys/arch/evbmips/sbmips/systemsw.h
sys/arch/evbmips/sbmips/zbbus.c upto 1.2
sys/arch/evbmips/stand/Makefile 1.1
sys/arch/evbmips/stand/sbmips/Makefile
sys/arch/evbmips/stand/sbmips/Makefile.bootprogs upto 1.2
sys/arch/evbmips/stand/sbmips/Makefile.bootprogs 1.3
sys/arch/evbmips/stand/sbmips/Makefile.bootxx
sys/arch/evbmips/stand/sbmips/Makefile.inc upto 1.3
sys/arch/evbmips/stand/sbmips/boot/Makefile
sys/arch/evbmips/stand/sbmips/boot/filesystem.c
sys/arch/evbmips/stand/sbmips/boot/version
sys/arch/evbmips/stand/sbmips/bootxx_cd9660/Makefile
sys/arch/evbmips/stand/sbmips/bootxx_ffs/Makefile
sys/arch/evbmips/stand/sbmips/bootxx_lfs/Makefile
sys/arch/evbmips/stand/sbmips/common/bbinfo.h
sys/arch/evbmips/stand/sbmips/common/blkdev.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/blkdev.h
sys/arch/evbmips/stand/sbmips/common/boot.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/boot.ldscript
sys/arch/evbmips/stand/sbmips/common/booted_dev.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/bootxx.c
sys/arch/evbmips/stand/sbmips/common/cfe.c
sys/arch/evbmips/stand/sbmips/common/cfe_api.c
sys/arch/evbmips/stand/sbmips/common/cfe_api.h
sys/arch/evbmips/stand/sbmips/common/cfe_api_int.h
sys/arch/evbmips/stand/sbmips/common/cfe_error.h
sys/arch/evbmips/stand/sbmips/common/cfe_ioctl.h
sys/arch/evbmips/stand/sbmips/common/checksize.sh
sys/arch/evbmips/stand/sbmips/common/common.h
sys/arch/evbmips/stand/sbmips/common/panic_putstr.c
sys/arch/evbmips/stand/sbmips/common/putstr.c
sys/arch/evbmips/stand/sbmips/common/start.S
sys/arch/evbmips/stand/sbmips/netboot/Makefile
sys/arch/evbmips/stand/sbmips/netboot/conf.c
sys/arch/evbmips/stand/sbmips/netboot/dev_net.c
sys/arch/evbmips/stand/sbmips/netboot/devopen.c
sys/arch/evbmips/stand/sbmips/netboot/getsecs.c upto 1.2
sys/arch/evbmips/stand/sbmips/netboot/if_cfe.c upto 1.2
sys/arch/evbmips/stand/sbmips/netboot/version
sys/arch/mips/conf/files.sibyte 1.8
sys/arch/mips/include/pmap.h 1.70
sys/arch/mips/sibyte/dev/sbbuswatch.c 1.4
sys/arch/mips/sibyte/dev/sbmac.c 1.49
sys/arch/mips/sibyte/dev/sbscn.c 1.43
sys/arch/mips/sibyte/dev/sbsmbus.c 1.17
sys/arch/mips/sibyte/dev/sbtimer.c 1.21
sys/arch/mips/sibyte/dev/sbwdog.c 1.15
sys/arch/mips/sibyte/pci/sbbrz_pci.c 1.8
usr.sbin/installboot/installboot.8 1.94

Move sys/arch/sbmips/* into sys/arch/evbmips/*/sbmips.
 1.2 20-Feb-2011  matt branches: 1.2.2;
Merge from matt-nb5-mips64.
Add pci support.
new interrupt code.
Adapt to new world order for MIPS
 1.1 10-Jun-2010  cliff branches: 1.1.2; 1.1.4; 1.1.6;
file sbbuswatchvar.h was initially added on branch matt-nb5-mips64.
 1.1.6.1 05-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.2.2 10-Jun-2010  cliff insert missing */
thanks matt
 1.1.2.1 10-Jun-2010  cliff add bus watcher support for sibyte
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 20-Feb-2011  rmind file sbbuswatchvar.h was added on branch rmind-uvmplock on 2011-03-05 20:51:11 +0000
 1.15 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.14 24-Apr-2021  thorpej branches: 1.14.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.13 10-Jul-2011  matt branches: 1.13.68;
cleanup <machine/*.h> includes
 1.12 01-Feb-2011  matt Update to CFATTACH_DECL_NEW.
 1.11 14-Dec-2009  matt branches: 1.11.4; 1.11.6; 1.11.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.10 11-Dec-2005  christos branches: 1.10.78; 1.10.96;
merge ktrace-lwp.
 1.9 26-Aug-2005  drochner s/locdesc_t/int/g
 1.8 13-Sep-2004  drochner branches: 1.8.12;
autoconf cleanup: turn xxxsubmatch() functions into the locator
passing variants
 1.7 15-Jul-2003  lukem __KERNEL_RCSID()
 1.6 07-Feb-2003  cgd branches: 1.6.2;
Update to consistently use Broadcom GPL-compatible license on all SiByte code.
 1.5 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.4 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.3 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.1 05-Mar-2002  simonb branches: 1.1.10; 1.1.12;
Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.12.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.12.1 05-Mar-2002  nathanw file sbgbus.c was added on branch nathanw_sa on 2002-10-18 02:38:48 +0000
 1.1.10.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 05-Mar-2002  jdolecek file sbgbus.c was added on branch kqueue on 2002-06-23 17:38:06 +0000
 1.6.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.12.1 21-Jun-2006  yamt sync with head.
 1.10.96.2 09-Jun-2010  matt Update to the device NWO:
Use CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_normal_*
Use device_* accessors
 1.10.96.1 23-Nov-2009  matt mips3_ld/mips3_sd need to be passed a volatile uint64_t *
 1.10.78.1 11-Mar-2010  yamt sync with head
 1.11.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.11.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.11.4.1 05-Mar-2011  rmind sync with head
 1.13.68.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.13.68.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.13.68.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.13.68.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.13.68.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

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

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.14.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 01-Feb-2011  matt Use aprint_* and misc cleanup.
 1.2 07-Feb-2003  cgd branches: 1.2.130; 1.2.136; 1.2.138;
Update to consistently use Broadcom GPL-compatible license on all SiByte code.
 1.1 05-Mar-2002  simonb branches: 1.1.10; 1.1.12;
Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.2 05-Mar-2002  simonb Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.1 05-Mar-2002  simonb file sbgbusvar.h was added on branch nathanw_sa on 2002-03-05 23:46:43 +0000
 1.1.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 05-Mar-2002  jdolecek file sbgbusvar.h was added on branch kqueue on 2002-06-23 17:38:07 +0000
 1.2.138.1 08-Feb-2011  bouyer Sync with HEAD
 1.2.136.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.130.1 05-Mar-2011  rmind sync with head
 1.32 04-Jan-2021  thorpej malloc(9) -> kmem(9)
 1.31 10-Nov-2019  chs branches: 1.31.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.30 25-Jul-2014  dholland branches: 1.30.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.29 16-Mar-2014  dholland branches: 1.29.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.28 10-Jul-2011  matt branches: 1.28.2; 1.28.12; 1.28.16;
cleanup <machine/*.h> includes
 1.27 24-Apr-2011  rmind Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.26 01-Feb-2011  matt Use aprint_* and misc cleanup.
 1.25 01-Feb-2011  matt Update to CFATTACH_DECL_NEW.
 1.24 14-Dec-2009  matt branches: 1.24.4; 1.24.6; 1.24.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.23 21-Nov-2009  rmind Use lwp_getpcb() on mips, powerpc and sh3, clean from struct user usage.
 1.22 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.21 13-Jun-2008  cegger branches: 1.21.4; 1.21.10; 1.21.14;
use device_lookup_private to get softc
 1.20 28-Apr-2008  martin branches: 1.20.2; 1.20.4;
Remove clause 3 and 4 from TNF licenses
 1.19 19-Nov-2007  ad branches: 1.19.14; 1.19.16; 1.19.18;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.18 17-Oct-2007  garbled branches: 1.18.2;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.17 12-Jul-2007  he branches: 1.17.8; 1.17.10; 1.17.14;
Adapt to the new signature of callout_init().
 1.16 04-Mar-2007  christos branches: 1.16.2; 1.16.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.15 01-Oct-2006  elad branches: 1.15.4;
More from Matt Fleming:

Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
 1.14 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.13 23-Jul-2006  ad branches: 1.13.4; 1.13.6;
Use the LWP cached credentials where sane.
 1.12 14-May-2006  elad integrate kauth.
 1.11 28-Mar-2006  thorpej Use device_unit().
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.6; 1.10.8; 1.10.10; 1.10.12;
merge ktrace-lwp.
 1.9 06-Sep-2005  kleink Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
 1.8 07-Aug-2003  agc branches: 1.8.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.7 15-Jul-2003  lukem __KERNEL_RCSID()
 1.6 07-Feb-2003  cgd branches: 1.6.2;
Update to consistently use Broadcom GPL-compatible license on all SiByte code.
 1.5 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.4 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.3 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.2 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.1 05-Mar-2002  simonb branches: 1.1.6; 1.1.10; 1.1.12;
Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.4 11-Nov-2002  nathanw Catch up to -current
 1.1.12.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.12.2 17-Sep-2002  nathanw Catch up to -current.
 1.1.12.1 05-Mar-2002  nathanw file sbjcn.c was added on branch nathanw_sa on 2002-09-17 21:15:52 +0000
 1.1.10.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 05-Mar-2002  jdolecek file sbjcn.c was added on branch kqueue on 2002-06-23 17:38:07 +0000
 1.1.6.1 19-May-2002  gehenna Add device switch.
Replace the access to devsw table and the hard-coded majors with devsw API.
 1.6.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.4 07-Dec-2007  yamt sync with head
 1.8.16.3 03-Sep-2007  yamt sync with head.
 1.8.16.2 30-Dec-2006  yamt sync with head.
 1.8.16.1 21-Jun-2006  yamt sync with head.
 1.10.12.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.10.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.10.10.4 13-May-2006  elad sprinkle some #include <sys/kauth.h> in files that use kauth kpi but
don't include it yet. hopefully this will prevent some fallout.
 1.10.10.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.10.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.10.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.10.8.3 11-Aug-2006  yamt sync with head
 1.10.8.2 24-May-2006  yamt sync with head.
 1.10.8.1 01-Apr-2006  yamt sync with head.
 1.10.6.2 01-Jun-2006  kardel Sync with head.
 1.10.6.1 22-Apr-2006  simonb Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.13.6.1 22-Oct-2006  yamt sync with head
 1.13.4.1 18-Nov-2006  ad Sync with head.
 1.15.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.16.10.1 03-Oct-2007  garbled Sync with HEAD
 1.16.2.2 03-Dec-2007  ad Sync with HEAD.
 1.16.2.1 15-Jul-2007  ad Sync with head.
 1.17.14.1 21-Nov-2007  bouyer Sync with HEAD
 1.17.10.2 09-Jan-2008  matt sync with HEAD
 1.17.10.1 06-Nov-2007  matt sync with HEAD
 1.17.8.1 21-Nov-2007  joerg Sync with HEAD.
 1.18.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.19.18.3 11-Mar-2010  yamt sync with head
 1.19.18.2 04-May-2009  yamt sync with head.
 1.19.18.1 16-May-2008  yamt sync with head.
 1.19.16.2 17-Jun-2008  yamt sync with head.
 1.19.16.1 18-May-2008  yamt sync with head.
 1.19.14.2 29-Jun-2008  mjf Sync with HEAD.
 1.19.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.20.4.1 18-Jun-2008  simonb Sync with head.
 1.20.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.21.14.2 09-Jun-2010  matt Update to the device NWO:
Use CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_normal_*
Use device_* accessors
 1.21.14.1 23-Nov-2009  matt mips3_ld/mips3_sd need to be passed a volatile uint64_t *
 1.21.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.21.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.24.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.24.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.24.4.2 31-May-2011  rmind sync with head
 1.24.4.1 05-Mar-2011  rmind sync with head
 1.28.16.1 18-May-2014  rmind sync with head
 1.28.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.28.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.29.2.1 10-Aug-2014  tls Rebase.
 1.30.28.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.31.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.9 13-May-2023  andvar fix typos in comments.
 1.8 09-Jul-2018  christos Remove duplicate copies of the SET/CLR/ISSET macros.
 1.7 09-Jul-2018  kre Avoid redefining SET/CLR/ISSET (which in the kernel are normally
defined in <sys/types.h>). These redefinitions (when they are,
that is, when types.h is included) were sneaking through because
they were defined identically ... until CLR in <sys/types.h> was
changed... Avoid that issue arising again.
 1.6 13-Apr-2015  riastradh branches: 1.6.16; 1.6.18;
MD rnd.h cleanups. Please let me know if I broke anything!
 1.5 15-Nov-2014  christos branches: 1.5.2;
centralize the call unit / dialout macros
 1.4 02-Feb-2012  tls branches: 1.4.6;
Entropy-pool implementation move and cleanup.

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

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

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

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

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

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.3 01-Feb-2011  matt branches: 1.3.4; 1.3.8;
Update to CFATTACH_DECL_NEW.
 1.2 07-Feb-2003  cgd branches: 1.2.126; 1.2.130; 1.2.136; 1.2.138;
Update to consistently use Broadcom GPL-compatible license on all SiByte code.
 1.1 05-Mar-2002  simonb branches: 1.1.10; 1.1.12;
Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.2 05-Mar-2002  simonb Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.1 05-Mar-2002  simonb file sbjcnvar.h was added on branch nathanw_sa on 2002-03-05 23:46:43 +0000
 1.1.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 05-Mar-2002  jdolecek file sbjcnvar.h was added on branch kqueue on 2002-06-23 17:38:07 +0000
 1.2.138.1 08-Feb-2011  bouyer Sync with HEAD
 1.2.136.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.130.1 05-Mar-2011  rmind sync with head
 1.2.126.1 09-Jun-2010  matt Update to the device NWO:
Use CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_normal_*
Use device_* accessors
 1.3.8.1 18-Feb-2012  mrg merge to -current.
 1.3.4.1 17-Apr-2012  yamt sync with head
 1.4.6.1 03-Dec-2017  jdolecek update from HEAD
 1.5.2.1 06-Jun-2015  skrll Sync with HEAD
 1.6.18.1 10-Jun-2019  christos Sync with HEAD
 1.6.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.66 09-Feb-2024  andvar s/firwmare/firmware/ in comments.
 1.65 18-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.64 20-Aug-2022  thorpej sbmac_start(): Replace "IF_DEQUEUE() -> IF_PREPEND() on failure" with
"IF_POLL() -> IF_DEQUEUE() on success".
 1.63 05-Dec-2021  msaitoh s/progam/program/ in comment.
 1.62 29-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.61 13-Sep-2019  msaitoh branches: 1.61.2;
if_flags is neither int nor short. It's unsigned short.
 1.60 28-May-2019  msaitoh Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.59 23-May-2019  msaitoh Whitespace fix (mainly tabify).
 1.58 23-May-2019  msaitoh -No functional change:
- Simplify struct ethercom's pointer near ETHER_FIRST_MULTI().
- Simplify MII structure initialization.
- u_int*_t -> uint*_t.
- KNF
 1.57 22-Apr-2019  msaitoh This driver does ether_ioctl() on SIOC{ADD,DEL}MULTI, SIOC{G,S}IFMEDIA and
default case in the switch statement. Only the default case didn't check the
return value with ENETRESET. Integrate them to one ether_ioctl() call with
ENETRESET test. This driver might require some additional fixes for SIOCSIFMTU
and other ioctl()s.
 1.56 31-Mar-2019  simonb Allocate memory for for the ethernet DMA descriptor rings aligned to a
cache line boundary, as documented in the chip documentation.

Fixes SiByte ethernet which hasn't worked since the 8kB page size switch
(and just happened to work previously because the descriptor rings were
the same size as a page and so were allocated on a page boundary).
 1.55 05-Mar-2019  msaitoh Centralize ETHER_ALIGN into net/if_ether.h. Note that this commit also changes
if_upgt.c's ETHER_ALIGN from 0 to 2.
 1.54 05-Feb-2019  msaitoh Remove very old IFF_NOTRAILERS flag.
 1.53 23-Jan-2019  msaitoh Fix build break (return type of mii_writereg).
 1.52 22-Jan-2019  msaitoh Change MII PHY read/write API from:

int (*mii_readreg_t)(device_t, int, int);
void (*mii_writereg_t)(device_t, int, int, int);
to:

int (*mii_readreg_t)(device_t, int, int, uint16_t *);
int (*mii_writereg_t)(device_t, int, int, uint16_t);

Now we can test if a read/write operation failed or not by the return value.

In 802.3 spec says that the PHY shall not respond to read/write transaction
to the unimplemented register(22.2.4.3). Detecting timeout can be used to
check whether a register is implemented or not (if the register conforms to
the spec). ukphy(4) can be used this for MII_MMDACR and MII_MMDAADR.

Note that I noticed that the following code do infinite loop in the
read/wirte function. If it accesses unimplemented PHY register, it will hang.
It should be fixed:

arm/at91/at91emac.c
arm/ep93xx/epe.c
arm/omap/omapl1x_emac.c
mips/ralink/ralink_eth.c
arch/powerpc/booke/dev/pq3etsec.c(read)
dev/cadence/if_cemac.c <- hkenken
dev/ic/lan9118.c


Tested with the following device:

axe+ukphy
axe+rgephy
axen+rgephy (tested by Andrius V)
wm+atphy
wm+ukphy
wm+igphy
wm+ihphy
wm+makphy
sk+makphy
sk+brgphy
sk+gentbi
msk+makphy
sip+icsphy
sip+ukphy
re+rgephy
bge+brgphy
bnx+brgphy
gsip+gphyter
rtk+rlphy
fxp+inphy (tested by Andrius V)
tlp+acphy
ex+exphy
epic+qsphy
vge+ciphy (tested by Andrius V)
vr+ukphy (tested by Andrius V)
vte+ukphy (tested by Andrius V)

Not tested (MAC):
arm:at91emac
arm:cemac
arm:epe
arm:geminigmac
arm:enet
arm:cpsw
arm:emac(omac)
arm:emac(sunxi)
arm:npe
evbppc:temac
macppc:bm
macppc:gm
mips:aumac
mips:ae
mips:cnmac
mips:reth
mips:sbmac
playstation2:smap
powerpc:tsec
powerpc:emac(ibm4xx)
sgimips:mec
sparc:be
sf
ne(ax88190, dl10019)
awge
ep
gem
hme
smsh
mtd
sm
age
alc
ale
bce
cas
et
jme
lii
nfe
pcn
ste
stge
tl
xi
aue
mue
smsc
udav
url

Not tested (PHY):
amhphy
bmtphy
dmphy
etphy
glxtphy
ikphy
iophy
lxtphy
nsphyter
pnaphy
rdcphy
sqphy
tlphy
tqphy
urlphy
 1.51 18-Jul-2018  sevan Be consistent among ethernet drivers on the convention for printing ethernet
addresses.

NFC
 1.50 26-Jun-2018  msaitoh branches: 1.50.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.49 24-Jul-2017  mrg branches: 1.49.2;
mostly converted sbmips -> evbmips. the SBMIPS kernel builds fully
sans disksubr.c. intr.h does not need any additional fixes now,
only disklabel.h.

also test-built some other mips kernels.
 1.48 20-Feb-2017  ozaki-r branches: 1.48.6;
Apply deferred if_start to more drivers...
 1.47 15-Dec-2016  ozaki-r branches: 1.47.2;
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.46 21-Jul-2016  christos make this compile
 1.45 10-Jun-2016  ozaki-r branches: 1.45.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.44 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.43 18-Oct-2014  snj branches: 1.43.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.42 22-Jul-2012  matt branches: 1.42.2;
Fix mii_statchg to take a 'struct ifnet *' instead of device_t. This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.
 1.41 10-Jul-2011  matt branches: 1.41.2;
cleanup <machine/*.h> includes
 1.40 20-Feb-2011  matt Merge from matt-nb5-mips64.
Add pci support.
new interrupt code.
Adapt to new world order for MIPS
 1.39 01-Feb-2011  matt Use aprint_* and misc cleanup.
 1.38 01-Feb-2011  matt Update to CFATTACH_DECL_NEW.
 1.37 05-Apr-2010  joerg branches: 1.37.2; 1.37.4;
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.36 19-Jan-2010  pooka branches: 1.36.2; 1.36.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.35 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.34 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.33 12-Aug-2009  simonb Remove many magic numbers for addresses and interrupt numbers, and use
constants defined in SiByte/Broadcom standard header files. Switch from
using offsets for locators to actual addresses.

Tested on a swarm (my rhone is dead, but should be OK there too).
 1.32 18-Mar-2009  cegger bcopy -> memcpy
 1.31 18-Mar-2009  cegger bzero -> memset
 1.30 13-Nov-2008  dyoung branches: 1.30.4;
To fix compilation, consistently use 'cmd' instead of 'command'
for the ioctl command code. Thanks he@.
 1.29 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.28 07-Feb-2008  dyoung branches: 1.28.6; 1.28.10; 1.28.16; 1.28.18; 1.28.24;
Start patching up the kernel so that a network driver always has
the opportunity to handle an ioctl before generic ifioctl handling
occurs. This will ease extending the kernel and sharing of code
between drivers.

First steps: Make the signature of ifioctl_common() match struct
ifinet->if_ioctl. Convert SIOCSIFCAP and SIOCSIFMTU to the new
ifioctl() regime, throughout the kernel.
 1.27 19-Jan-2008  dyoung Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange(). Check for
a non-ENXIO error return from mii_mediachg(). (ENXIO indicates
that a PHY is suspended.)

This patch shrinks the source code size by 979 lines. There was
a 5100-byte savings on the NetBSD/i386 kernel configuration, ALL.

I have made a few miscellaneous changes, too:

gem(4): use LIST_EMPTY(), LIST_FOREACH().
mtd(4): handle media ioctls, for a change!
axe(4): do not track link status in sc->axe_link any longer
nfe(4), aue(4), axe(4), udav(4), url(4): do not reset all PHYs
on a change of media

Except for the change to mtd(4), no functional changes are intended.

XXX This patch affects more architectures than I can feasibly
XXX compile and run. I have compiled macppc, sparc64, i386. I
XXX have run the patches on i386 boxen with bnx(4) and sip(4).
XXX Compiling and running on evbmips (MERAKI, ADM5120) is in
XXX progress.
 1.26 17-Oct-2007  garbled branches: 1.26.2; 1.26.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.25 09-Jul-2007  ad branches: 1.25.2; 1.25.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.24 07-Mar-2007  christos branches: 1.24.2; 1.24.4; 1.24.10;
count outgoing packets. from Markus Mayer
 1.23 06-Mar-2007  simonb Fix some caddr_t rototill fallout.
 1.22 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.21 11-Dec-2005  christos branches: 1.21.26;
merge ktrace-lwp.
 1.20 09-Jun-2005  jmc branches: 1.20.2;
Fixes for -Wcast-qual. Add some needed const around char *'s,
__UNVOLATILE in READ/WRITE_REG and convert the rtc functions to properaly
take a volatile timeval
 1.19 19-Mar-2004  cgd convert descriptor add/remove pointers to integer array indices.
 1.18 19-Mar-2004  cgd recognize PERIPH_REV3 DMA for BCM1250, too
 1.17 18-Mar-2004  cgd bump RX and TX ring sizes to 256 entries each. would be better to make
them larger, but then i'd need to tweak the allocation mechanism so they
were *guaranteed* to be physically contiguous.
 1.16 18-Mar-2004  cgd in PERIPH_REV3 DMA code, fix calculation of pkt size (not that it matters
for <= 4k packets), and also interrupt on end of pkt only. cuts tx intrs
by a factor of >3 for simon's fave 100Mbps ttcp test.
 1.15 18-Mar-2004  simonb Fix pass3 Tx DMA - when an mbuf spans a page boundary, make sure that
it either is sitting in contiguous physical RAM or split the mbuf
into two Tx descriptors. Not the prettiest patch, but works well in
practice - gets about an 8% decrease on CPU time for a simple ttcp TCP
Tx benchmark. Thanks to Chris Demetriou for some debugging help.
Add some event counters.
Remove some #if 0'd debug code.
 1.14 14-Mar-2004  simonb Call sbmac_start() at the end of the interrupt service function to try
to send more packets. Fixes problems with high UDP Tx rates.
Thanks to Matt Thomas for applying clue.
 1.13 08-Mar-2004  simonb Wrap some long lines.
 1.12 31-Oct-2003  simonb Remove some assigned-to but otherwise unused variables.
 1.11 26-Sep-2003  simonb Disable pass3 DMA for now; booting a box to multi-user with root-on-nfs
reliably wedges during the dev_mkdb command in uvn_fp2.
 1.10 15-Jul-2003  lukem __KERNEL_RCSID()
 1.9 07-Feb-2003  cgd branches: 1.9.2;
Update to consistently use Broadcom GPL-compatible license on all SiByte code.
 1.8 19-Nov-2002  cgd initial support for mac features in new chip revs
 1.7 08-Nov-2002  cgd fix long-standing pasto in DMA config1 register address setting
 1.6 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.5 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.3 01-Jun-2002  simonb branches: 1.3.2; 1.3.4;
KNF; make some function static; other minor cleanups.
 1.2 06-Mar-2002  simonb branches: 1.2.6;
Remove a few unneeded include files.
 1.1 05-Mar-2002  simonb Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.2.6.1 14-Jul-2002  gehenna catch up with -current.
 1.3.4.4 11-Dec-2002  thorpej Sync with HEAD.
 1.3.4.3 11-Nov-2002  nathanw Catch up to -current
 1.3.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.3.4.1 01-Jun-2002  nathanw file sbmac.c was added on branch nathanw_sa on 2002-10-18 02:38:48 +0000
 1.3.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.1 01-Jun-2002  jdolecek file sbmac.c was added on branch kqueue on 2002-06-23 17:38:07 +0000
 1.9.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.20.2.3 11-Feb-2008  yamt sync with head.
 1.20.2.2 21-Jan-2008  yamt sync with head
 1.20.2.1 03-Sep-2007  yamt sync with head.
 1.21.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.24.10.1 03-Oct-2007  garbled Sync with HEAD
 1.24.4.1 11-Jul-2007  mjf Sync with head.
 1.24.2.1 15-Jul-2007  ad Sync with head.
 1.25.10.2 23-Mar-2008  matt sync with HEAD
 1.25.10.1 06-Nov-2007  matt sync with HEAD
 1.25.2.1 18-Jul-2007  matt Fix LP64 bug.
 1.26.8.1 20-Jan-2008  bouyer Sync with HEAD
 1.26.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.28.24.4 18-Mar-2010  matt Convert to using mutex instead of spl.
 1.28.24.3 23-Nov-2009  matt Use vaddr_t instead uint32_t for storing a pc since the latter won't work in
a LP64 kernel.
 1.28.24.2 23-Nov-2009  matt mips3_ld/mips3_sd need to be passed a volatile uint64_t *
 1.28.24.1 19-Aug-2009  matt mtod(m, unsigned int) makes gcc unhappy on _LP64. Use uintptr_t instead.
 1.28.18.2 28-Apr-2009  skrll Sync with HEAD.
 1.28.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.28.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.28.10.4 11-Aug-2010  yamt sync with head.
 1.28.10.3 11-Mar-2010  yamt sync with head
 1.28.10.2 19-Aug-2009  yamt sync with head.
 1.28.10.1 04-May-2009  yamt sync with head.
 1.28.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.30.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.36.4.2 05-Mar-2011  rmind sync with head
 1.36.4.1 30-May-2010  rmind sync with head
 1.36.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.37.4.2 05-Mar-2011  bouyer Sync with HEAD
 1.37.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.37.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.41.2.1 30-Oct-2012  yamt sync with head
 1.42.2.1 03-Dec-2017  jdolecek update from HEAD
 1.43.2.5 28-Aug-2017  skrll Sync with HEAD
 1.43.2.4 05-Feb-2017  skrll Sync with HEAD
 1.43.2.3 05-Oct-2016  skrll Sync with HEAD
 1.43.2.2 09-Jul-2016  skrll Sync with HEAD
 1.43.2.1 19-Mar-2016  skrll Sync with HEAD
 1.45.2.3 20-Mar-2017  pgoyette Sync with HEAD
 1.45.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.45.2.1 26-Jul-2016  pgoyette Sync with HEAD
 1.47.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.48.6.1 30-Aug-2017  martin Pull up following revision(s) (requested by mrg in ticket #231):
distrib/sets/lists/base/md.evbmips 1.3
doc/CHANGES 1.2303-1.2304
etc/etc.evbmips/MAKEDEV.conf 1.8
etc/etc.evbmips/Makefile.inc 1.22
etc/mtree/Makefile 1.37
etc/mtree/NetBSD.dist.evbmips 1.1
sys/arch/evbmips/Makefile 1.9
sys/arch/evbmips/conf/SBMIPS upto 1.2
sys/arch/evbmips/conf/SBMIPS.MP upto 1.2
sys/arch/evbmips/conf/SBMIPS64 upto 1.2
sys/arch/evbmips/conf/SBMIPS64.MP upto 1.2
sys/arch/evbmips/conf/files.sbmips upto 1.2
sys/arch/evbmips/conf/std.sbmips upto 1.2
sys/arch/evbmips/include/disklabel.h 1.6
sys/arch/evbmips/include/loadfile_machdep.h
sys/arch/evbmips/include/param.h 1.10
sys/arch/evbmips/include/pci_machdep.h 1.3
sys/arch/evbmips/sbmips/TODO
sys/arch/evbmips/sbmips/autoconf.c
sys/arch/evbmips/sbmips/autoconf.h
sys/arch/evbmips/sbmips/console.c
sys/arch/evbmips/sbmips/cpu.c upto 1.3
sys/arch/evbmips/sbmips/cpuvar.h
sys/arch/evbmips/sbmips/disksubr.c
sys/arch/evbmips/sbmips/leds.h
sys/arch/evbmips/sbmips/locore_machdep.S
sys/arch/evbmips/sbmips/machdep.c upto 1.2
sys/arch/evbmips/sbmips/rtc.c upto 1.2
sys/arch/evbmips/sbmips/sb1250_icu.c upto 1.2
sys/arch/evbmips/sbmips/swarm.h
sys/arch/evbmips/sbmips/systemsw.c upto 1.2
sys/arch/evbmips/sbmips/systemsw.h
sys/arch/evbmips/sbmips/zbbus.c upto 1.2
sys/arch/evbmips/stand/Makefile 1.1
sys/arch/evbmips/stand/sbmips/Makefile
sys/arch/evbmips/stand/sbmips/Makefile.bootprogs upto 1.2
sys/arch/evbmips/stand/sbmips/Makefile.bootprogs 1.3
sys/arch/evbmips/stand/sbmips/Makefile.bootxx
sys/arch/evbmips/stand/sbmips/Makefile.inc upto 1.3
sys/arch/evbmips/stand/sbmips/boot/Makefile
sys/arch/evbmips/stand/sbmips/boot/filesystem.c
sys/arch/evbmips/stand/sbmips/boot/version
sys/arch/evbmips/stand/sbmips/bootxx_cd9660/Makefile
sys/arch/evbmips/stand/sbmips/bootxx_ffs/Makefile
sys/arch/evbmips/stand/sbmips/bootxx_lfs/Makefile
sys/arch/evbmips/stand/sbmips/common/bbinfo.h
sys/arch/evbmips/stand/sbmips/common/blkdev.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/blkdev.h
sys/arch/evbmips/stand/sbmips/common/boot.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/boot.ldscript
sys/arch/evbmips/stand/sbmips/common/booted_dev.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/bootxx.c
sys/arch/evbmips/stand/sbmips/common/cfe.c
sys/arch/evbmips/stand/sbmips/common/cfe_api.c
sys/arch/evbmips/stand/sbmips/common/cfe_api.h
sys/arch/evbmips/stand/sbmips/common/cfe_api_int.h
sys/arch/evbmips/stand/sbmips/common/cfe_error.h
sys/arch/evbmips/stand/sbmips/common/cfe_ioctl.h
sys/arch/evbmips/stand/sbmips/common/checksize.sh
sys/arch/evbmips/stand/sbmips/common/common.h
sys/arch/evbmips/stand/sbmips/common/panic_putstr.c
sys/arch/evbmips/stand/sbmips/common/putstr.c
sys/arch/evbmips/stand/sbmips/common/start.S
sys/arch/evbmips/stand/sbmips/netboot/Makefile
sys/arch/evbmips/stand/sbmips/netboot/conf.c
sys/arch/evbmips/stand/sbmips/netboot/dev_net.c
sys/arch/evbmips/stand/sbmips/netboot/devopen.c
sys/arch/evbmips/stand/sbmips/netboot/getsecs.c upto 1.2
sys/arch/evbmips/stand/sbmips/netboot/if_cfe.c upto 1.2
sys/arch/evbmips/stand/sbmips/netboot/version
sys/arch/mips/conf/files.sibyte 1.8
sys/arch/mips/include/pmap.h 1.70
sys/arch/mips/sibyte/dev/sbbuswatch.c 1.4
sys/arch/mips/sibyte/dev/sbmac.c 1.49
sys/arch/mips/sibyte/dev/sbscn.c 1.43
sys/arch/mips/sibyte/dev/sbsmbus.c 1.17
sys/arch/mips/sibyte/dev/sbtimer.c 1.21
sys/arch/mips/sibyte/dev/sbwdog.c 1.15
sys/arch/mips/sibyte/pci/sbbrz_pci.c 1.8
usr.sbin/installboot/installboot.8 1.94

Move sys/arch/sbmips/* into sys/arch/evbmips/*/sbmips.
 1.49.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.49.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.50.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.50.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.50.2.1 10-Jun-2019  christos Sync with HEAD
 1.61.2.1 29-Feb-2020  ad Sync with head.
 1.25 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.24 24-Apr-2021  thorpej branches: 1.24.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.23 21-Jul-2016  christos branches: 1.23.30;
make this compile
 1.22 10-Jul-2011  matt branches: 1.22.12; 1.22.30; 1.22.34;
cleanup <machine/*.h> includes
 1.21 20-Feb-2011  matt Merge from matt-nb5-mips64.
Add pci support.
new interrupt code.
Adapt to new world order for MIPS
 1.20 01-Feb-2011  matt Use aprint_* and misc cleanup.
 1.19 01-Feb-2011  matt Update to CFATTACH_DECL_NEW.
 1.18 14-Dec-2009  matt branches: 1.18.4; 1.18.6; 1.18.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.17 12-Aug-2009  simonb Remove many magic numbers for addresses and interrupt numbers, and use
constants defined in SiByte/Broadcom standard header files. Switch from
using offsets for locators to actual addresses.

Tested on a swarm (my rhone is dead, but should be OK there too).
 1.16 11-Nov-2005  simonb branches: 1.16.80; 1.16.98;
Don't hide the panic if the CPU devices present can't be figured out
in sbobio_attach(). We really want to know if this is the case all
the time, and also fixes GCC warnings about possibly uninitialised
variables.
 1.15 26-Aug-2005  drochner kill some more simple submatch() functions, use config_stdsubmatch()
 1.14 25-Aug-2005  drochner replace the "locdesc_t" structure carrying the number of locators
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
 1.13 13-Sep-2004  drochner branches: 1.13.10; 1.13.12;
autoconf cleanup: turn xxxsubmatch() functions into the locator
passing variants
 1.12 15-Jul-2003  lukem __KERNEL_RCSID()
 1.11 29-Jun-2003  fvdl branches: 1.11.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.10 29-Jun-2003  simonb KNF nit (parentheses around return value).
 1.9 07-Feb-2003  cgd Update to consistently use Broadcom GPL-compatible license on all SiByte code.
 1.8 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.7 08-Nov-2002  cgd handle different SOC types and features a little better
 1.6 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.5 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.2 01-Jun-2002  simonb branches: 1.2.2; 1.2.4;
There's two SMBuses in the BCM1250; list them both on the on-board device
list.
Get rid of some magic numbers.
 1.1 05-Mar-2002  simonb branches: 1.1.6;
Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.6.1 14-Jul-2002  gehenna catch up with -current.
 1.2.4.4 03-Jan-2003  thorpej Sync with HEAD.
 1.2.4.3 11-Nov-2002  nathanw Catch up to -current
 1.2.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.1 01-Jun-2002  nathanw file sbobio.c was added on branch nathanw_sa on 2002-10-18 02:38:49 +0000
 1.2.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.1 01-Jun-2002  jdolecek file sbobio.c was added on branch kqueue on 2002-06-23 17:38:07 +0000
 1.11.2.5 11-Dec-2005  christos Sync with head.
 1.11.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.12.1 21-Jun-2006  yamt sync with head.
 1.13.10.1 21-Nov-2005  tron Pull up following revision(s) (requested by simonb in ticket #971):
sys/arch/mips/sibyte/dev/sbobio.c: revision 1.16
Don't hide the panic if the CPU devices present can't be figured out
in sbobio_attach(). We really want to know if this is the case all
the time, and also fixes GCC warnings about possibly uninitialised
variables.
 1.16.98.2 09-Jun-2010  matt Update to the device NWO:
Use CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_normal_*
Use device_* accessors
 1.16.98.1 23-Nov-2009  matt mips3_ld/mips3_sd need to be passed a volatile uint64_t *
 1.16.80.2 11-Mar-2010  yamt sync with head
 1.16.80.1 19-Aug-2009  yamt sync with head.
 1.18.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.18.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.18.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.18.4.1 05-Mar-2011  rmind sync with head
 1.22.34.1 26-Jul-2016  pgoyette Sync with HEAD
 1.22.30.1 05-Oct-2016  skrll Sync with HEAD
 1.22.12.1 03-Dec-2017  jdolecek update from HEAD
 1.23.30.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.23.30.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.24.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 20-Feb-2011  matt Merge from matt-nb5-mips64.
Add pci support.
new interrupt code.
Adapt to new world order for MIPS
 1.3 12-Aug-2009  simonb branches: 1.3.4; 1.3.6; 1.3.8;
Remove many magic numbers for addresses and interrupt numbers, and use
constants defined in SiByte/Broadcom standard header files. Switch from
using offsets for locators to actual addresses.

Tested on a swarm (my rhone is dead, but should be OK there too).
 1.2 07-Feb-2003  cgd branches: 1.2.108;
Update to consistently use Broadcom GPL-compatible license on all SiByte code.
 1.1 05-Mar-2002  simonb branches: 1.1.10; 1.1.12;
Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.2 05-Mar-2002  simonb Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.1 05-Mar-2002  simonb file sbobiovar.h was added on branch nathanw_sa on 2002-03-05 23:46:43 +0000
 1.1.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 05-Mar-2002  jdolecek file sbobiovar.h was added on branch kqueue on 2002-06-23 17:38:07 +0000
 1.2.108.1 19-Aug-2009  yamt sync with head.
 1.3.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.3.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.4.1 05-Mar-2011  rmind sync with head
 1.20 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.19 24-Apr-2021  thorpej branches: 1.19.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.18 20-Feb-2011  matt branches: 1.18.70;
Merge from matt-nb5-mips64.
Add pci support.
new interrupt code.
Adapt to new world order for MIPS
 1.17 01-Feb-2011  matt Use aprint_* and misc cleanup.
 1.16 01-Feb-2011  matt Update to CFATTACH_DECL_NEW.
 1.15 12-Aug-2009  simonb branches: 1.15.4; 1.15.6; 1.15.8;
Remove many magic numbers for addresses and interrupt numbers, and use
constants defined in SiByte/Broadcom standard header files. Switch from
using offsets for locators to actual addresses.

Tested on a swarm (my rhone is dead, but should be OK there too).
 1.14 16-Jun-2008  cegger branches: 1.14.14;
fix typo. should compile again.
 1.13 13-Jun-2008  cegger use __array_count
 1.12 11-Dec-2005  christos branches: 1.12.74; 1.12.76; 1.12.78; 1.12.80; 1.12.82;
merge ktrace-lwp.
 1.11 26-Aug-2005  drochner kill some more simple submatch() functions, use config_stdsubmatch()
 1.10 25-Aug-2005  drochner replace the "locdesc_t" structure carrying the number of locators
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
 1.9 13-Sep-2004  drochner branches: 1.9.12;
autoconf cleanup: turn xxxsubmatch() functions into the locator
passing variants
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 07-Feb-2003  cgd branches: 1.7.2;
Update to consistently use Broadcom GPL-compatible license on all SiByte code.
 1.6 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.5 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.4 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.1 05-Mar-2002  simonb branches: 1.1.10; 1.1.12;
Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.12.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.12.1 05-Mar-2002  nathanw file sbscd.c was added on branch nathanw_sa on 2002-10-18 02:38:49 +0000
 1.1.10.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 05-Mar-2002  jdolecek file sbscd.c was added on branch kqueue on 2002-06-23 17:38:07 +0000
 1.7.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.12.1 21-Jun-2006  yamt sync with head.
 1.12.82.1 18-Jun-2008  simonb Sync with head.
 1.12.80.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.12.78.2 19-Aug-2009  yamt sync with head.
 1.12.78.1 04-May-2009  yamt sync with head.
 1.12.76.1 17-Jun-2008  yamt sync with head.
 1.12.74.1 29-Jun-2008  mjf Sync with HEAD.
 1.14.14.1 09-Jun-2010  matt Update to the device NWO:
Use CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_normal_*
Use device_* accessors
 1.15.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.15.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.15.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.15.4.1 05-Mar-2011  rmind sync with head
 1.18.70.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.18.70.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.19.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 20-Feb-2011  matt Merge from matt-nb5-mips64.
Add pci support.
new interrupt code.
Adapt to new world order for MIPS
 1.3 12-Aug-2009  simonb branches: 1.3.4; 1.3.6; 1.3.8;
Remove many magic numbers for addresses and interrupt numbers, and use
constants defined in SiByte/Broadcom standard header files. Switch from
using offsets for locators to actual addresses.

Tested on a swarm (my rhone is dead, but should be OK there too).
 1.2 07-Feb-2003  cgd branches: 1.2.108;
Update to consistently use Broadcom GPL-compatible license on all SiByte code.
 1.1 05-Mar-2002  simonb branches: 1.1.10; 1.1.12;
Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.2 05-Mar-2002  simonb Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.1 05-Mar-2002  simonb file sbscdvar.h was added on branch nathanw_sa on 2002-03-05 23:46:44 +0000
 1.1.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 05-Mar-2002  jdolecek file sbscdvar.h was added on branch kqueue on 2002-06-23 17:38:08 +0000
 1.2.108.1 19-Aug-2009  yamt sync with head.
 1.3.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.3.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.4.1 05-Mar-2011  rmind sync with head
 1.45 04-Jan-2021  thorpej malloc(9) -> kmem(9)
 1.44 10-Nov-2019  chs branches: 1.44.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.43 24-Jul-2017  mrg branches: 1.43.4;
mostly converted sbmips -> evbmips. the SBMIPS kernel builds fully
sans disksubr.c. intr.h does not need any additional fixes now,
only disklabel.h.

also test-built some other mips kernels.
 1.42 21-Jul-2016  christos branches: 1.42.8;
make this compile
 1.41 13-Apr-2015  riastradh branches: 1.41.2;
MD rnd.h cleanups. Please let me know if I broke anything!
 1.40 10-Aug-2014  tls branches: 1.40.4;
Merge tls-earlyentropy branch into HEAD.
 1.39 25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.38 16-Mar-2014  dholland branches: 1.38.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.37 02-Feb-2012  tls branches: 1.37.6; 1.37.10;
Entropy-pool implementation move and cleanup.

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

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

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

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

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

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.36 10-Jul-2011  matt branches: 1.36.2; 1.36.6;
cleanup <machine/*.h> includes
 1.35 24-Apr-2011  rmind Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.34 20-Feb-2011  matt Merge from matt-nb5-mips64.
Add pci support.
new interrupt code.
Adapt to new world order for MIPS
 1.33 01-Feb-2011  matt Use aprint_* and misc cleanup.
 1.32 01-Feb-2011  matt Update to CFATTACH_DECL_NEW.
 1.31 14-Dec-2009  matt branches: 1.31.4; 1.31.6; 1.31.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.30 21-Nov-2009  rmind Use lwp_getpcb() on mips, powerpc and sh3, clean from struct user usage.
 1.29 12-Aug-2009  simonb Remove many magic numbers for addresses and interrupt numbers, and use
constants defined in SiByte/Broadcom standard header files. Switch from
using offsets for locators to actual addresses.

Tested on a swarm (my rhone is dead, but should be OK there too).
 1.28 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.27 13-Jun-2008  cegger branches: 1.27.4; 1.27.10; 1.27.14;
use device_lookup_private to get softc
 1.26 28-Apr-2008  martin branches: 1.26.2; 1.26.4;
Remove clause 3 and 4 from TNF licenses
 1.25 26-Nov-2007  ad branches: 1.25.14; 1.25.16; 1.25.18;
Use the softint API.
 1.24 19-Nov-2007  ad - Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.23 17-Oct-2007  garbled branches: 1.23.2;
Merge the ppcoea-renovation branch to HEAD.

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

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

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

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.21 04-Mar-2007  christos branches: 1.21.2; 1.21.4; 1.21.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.20 01-Oct-2006  elad branches: 1.20.4;
More from Matt Fleming:

Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
 1.19 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.18 23-Jul-2006  ad branches: 1.18.4; 1.18.6;
Use the LWP cached credentials where sane.
 1.17 14-May-2006  elad integrate kauth.
 1.16 28-Mar-2006  thorpej Use device_unit().
 1.15 11-Dec-2005  christos branches: 1.15.4; 1.15.6; 1.15.8; 1.15.10; 1.15.12;
merge ktrace-lwp.
 1.14 06-Sep-2005  kleink Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
 1.13 09-Jun-2005  jmc branches: 1.13.2;
Fixes for -Wcast-qual. Add some needed const around char *'s,
__UNVOLATILE in READ/WRITE_REG and convert the rtc functions to properaly
take a volatile timeval
 1.12 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.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 29-Jun-2003  fvdl branches: 1.10.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.9 29-Jun-2003  simonb Fix more needless 'struct proc *' to 'struct lwp *' fallout.
 1.8 28-Mar-2003  he Initialize new members (cn_halt and cn_flush) in consdev to NULL to
allow this to compile again.
 1.7 07-Feb-2003  cgd Update to consistently use Broadcom GPL-compatible license on all SiByte code.
 1.6 10-Nov-2002  simonb Adapt for the ioctl ERESTART/EPASSTHROUGH changes.
Make sure we don't tsleep() at splhigh/splserial.
 1.5 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.4 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.3 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.2 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.1 05-Mar-2002  simonb branches: 1.1.6; 1.1.10; 1.1.12;
Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.4 11-Nov-2002  nathanw Catch up to -current
 1.1.12.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.12.2 17-Sep-2002  nathanw Catch up to -current.
 1.1.12.1 05-Mar-2002  nathanw file sbscn.c was added on branch nathanw_sa on 2002-09-17 21:15:53 +0000
 1.1.10.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 05-Mar-2002  jdolecek file sbscn.c was added on branch kqueue on 2002-06-23 17:38:08 +0000
 1.1.6.1 19-May-2002  gehenna Add device switch.
Replace the access to devsw table and the hard-coded majors with devsw API.
 1.10.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.2.4 24-Jan-2005  simonb Adapt to the ktrace-lwp branch.
 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.13.2.4 07-Dec-2007  yamt sync with head
 1.13.2.3 03-Sep-2007  yamt sync with head.
 1.13.2.2 30-Dec-2006  yamt sync with head.
 1.13.2.1 21-Jun-2006  yamt sync with head.
 1.15.12.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.15.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.15.10.4 13-May-2006  elad sprinkle some #include <sys/kauth.h> in files that use kauth kpi but
don't include it yet. hopefully this will prevent some fallout.
 1.15.10.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.15.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.15.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.15.8.3 11-Aug-2006  yamt sync with head
 1.15.8.2 24-May-2006  yamt sync with head.
 1.15.8.1 01-Apr-2006  yamt sync with head.
 1.15.6.2 01-Jun-2006  kardel Sync with head.
 1.15.6.1 22-Apr-2006  simonb Sync with head.
 1.15.4.1 09-Sep-2006  rpaulo sync with head
 1.18.6.1 22-Oct-2006  yamt sync with head
 1.18.4.1 18-Nov-2006  ad Sync with head.
 1.20.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.21.10.1 03-Oct-2007  garbled Sync with HEAD
 1.21.4.1 11-Jul-2007  mjf Sync with head.
 1.21.2.2 03-Dec-2007  ad Sync with HEAD.
 1.21.2.1 15-Jul-2007  ad Sync with head.
 1.22.14.1 21-Nov-2007  bouyer Sync with HEAD
 1.22.10.2 09-Jan-2008  matt sync with HEAD
 1.22.10.1 06-Nov-2007  matt sync with HEAD
 1.22.8.2 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.22.8.1 21-Nov-2007  joerg Sync with HEAD.
 1.23.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.25.18.4 11-Mar-2010  yamt sync with head
 1.25.18.3 19-Aug-2009  yamt sync with head.
 1.25.18.2 04-May-2009  yamt sync with head.
 1.25.18.1 16-May-2008  yamt sync with head.
 1.25.16.2 17-Jun-2008  yamt sync with head.
 1.25.16.1 18-May-2008  yamt sync with head.
 1.25.14.2 29-Jun-2008  mjf Sync with HEAD.
 1.25.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.26.4.1 18-Jun-2008  simonb Sync with head.
 1.26.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.27.14.3 09-Jun-2010  matt Update to the device NWO:
Use CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_normal_*
Use device_* accessors
 1.27.14.2 23-Nov-2009  matt Use vaddr_t instead uint32_t for storing a pc since the latter won't work in
a LP64 kernel.
 1.27.14.1 23-Nov-2009  matt mips3_ld/mips3_sd need to be passed a volatile uint64_t *
 1.27.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.27.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.31.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.31.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.31.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.31.4.2 31-May-2011  rmind sync with head
 1.31.4.1 05-Mar-2011  rmind sync with head
 1.36.6.1 18-Feb-2012  mrg merge to -current.
 1.36.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.36.2.1 17-Apr-2012  yamt sync with head
 1.37.10.1 18-May-2014  rmind sync with head
 1.37.6.2 03-Dec-2017  jdolecek update from HEAD
 1.37.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.38.2.2 10-Aug-2014  tls Rebase.
 1.38.2.1 07-Apr-2014  tls Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
that had stubbed out code, other minor cleanups.
 1.40.4.3 28-Aug-2017  skrll Sync with HEAD
 1.40.4.2 05-Oct-2016  skrll Sync with HEAD
 1.40.4.1 06-Jun-2015  skrll Sync with HEAD
 1.41.2.1 26-Jul-2016  pgoyette Sync with HEAD
 1.42.8.1 30-Aug-2017  martin Pull up following revision(s) (requested by mrg in ticket #231):
distrib/sets/lists/base/md.evbmips 1.3
doc/CHANGES 1.2303-1.2304
etc/etc.evbmips/MAKEDEV.conf 1.8
etc/etc.evbmips/Makefile.inc 1.22
etc/mtree/Makefile 1.37
etc/mtree/NetBSD.dist.evbmips 1.1
sys/arch/evbmips/Makefile 1.9
sys/arch/evbmips/conf/SBMIPS upto 1.2
sys/arch/evbmips/conf/SBMIPS.MP upto 1.2
sys/arch/evbmips/conf/SBMIPS64 upto 1.2
sys/arch/evbmips/conf/SBMIPS64.MP upto 1.2
sys/arch/evbmips/conf/files.sbmips upto 1.2
sys/arch/evbmips/conf/std.sbmips upto 1.2
sys/arch/evbmips/include/disklabel.h 1.6
sys/arch/evbmips/include/loadfile_machdep.h
sys/arch/evbmips/include/param.h 1.10
sys/arch/evbmips/include/pci_machdep.h 1.3
sys/arch/evbmips/sbmips/TODO
sys/arch/evbmips/sbmips/autoconf.c
sys/arch/evbmips/sbmips/autoconf.h
sys/arch/evbmips/sbmips/console.c
sys/arch/evbmips/sbmips/cpu.c upto 1.3
sys/arch/evbmips/sbmips/cpuvar.h
sys/arch/evbmips/sbmips/disksubr.c
sys/arch/evbmips/sbmips/leds.h
sys/arch/evbmips/sbmips/locore_machdep.S
sys/arch/evbmips/sbmips/machdep.c upto 1.2
sys/arch/evbmips/sbmips/rtc.c upto 1.2
sys/arch/evbmips/sbmips/sb1250_icu.c upto 1.2
sys/arch/evbmips/sbmips/swarm.h
sys/arch/evbmips/sbmips/systemsw.c upto 1.2
sys/arch/evbmips/sbmips/systemsw.h
sys/arch/evbmips/sbmips/zbbus.c upto 1.2
sys/arch/evbmips/stand/Makefile 1.1
sys/arch/evbmips/stand/sbmips/Makefile
sys/arch/evbmips/stand/sbmips/Makefile.bootprogs upto 1.2
sys/arch/evbmips/stand/sbmips/Makefile.bootprogs 1.3
sys/arch/evbmips/stand/sbmips/Makefile.bootxx
sys/arch/evbmips/stand/sbmips/Makefile.inc upto 1.3
sys/arch/evbmips/stand/sbmips/boot/Makefile
sys/arch/evbmips/stand/sbmips/boot/filesystem.c
sys/arch/evbmips/stand/sbmips/boot/version
sys/arch/evbmips/stand/sbmips/bootxx_cd9660/Makefile
sys/arch/evbmips/stand/sbmips/bootxx_ffs/Makefile
sys/arch/evbmips/stand/sbmips/bootxx_lfs/Makefile
sys/arch/evbmips/stand/sbmips/common/bbinfo.h
sys/arch/evbmips/stand/sbmips/common/blkdev.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/blkdev.h
sys/arch/evbmips/stand/sbmips/common/boot.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/boot.ldscript
sys/arch/evbmips/stand/sbmips/common/booted_dev.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/bootxx.c
sys/arch/evbmips/stand/sbmips/common/cfe.c
sys/arch/evbmips/stand/sbmips/common/cfe_api.c
sys/arch/evbmips/stand/sbmips/common/cfe_api.h
sys/arch/evbmips/stand/sbmips/common/cfe_api_int.h
sys/arch/evbmips/stand/sbmips/common/cfe_error.h
sys/arch/evbmips/stand/sbmips/common/cfe_ioctl.h
sys/arch/evbmips/stand/sbmips/common/checksize.sh
sys/arch/evbmips/stand/sbmips/common/common.h
sys/arch/evbmips/stand/sbmips/common/panic_putstr.c
sys/arch/evbmips/stand/sbmips/common/putstr.c
sys/arch/evbmips/stand/sbmips/common/start.S
sys/arch/evbmips/stand/sbmips/netboot/Makefile
sys/arch/evbmips/stand/sbmips/netboot/conf.c
sys/arch/evbmips/stand/sbmips/netboot/dev_net.c
sys/arch/evbmips/stand/sbmips/netboot/devopen.c
sys/arch/evbmips/stand/sbmips/netboot/getsecs.c upto 1.2
sys/arch/evbmips/stand/sbmips/netboot/if_cfe.c upto 1.2
sys/arch/evbmips/stand/sbmips/netboot/version
sys/arch/mips/conf/files.sibyte 1.8
sys/arch/mips/include/pmap.h 1.70
sys/arch/mips/sibyte/dev/sbbuswatch.c 1.4
sys/arch/mips/sibyte/dev/sbmac.c 1.49
sys/arch/mips/sibyte/dev/sbscn.c 1.43
sys/arch/mips/sibyte/dev/sbsmbus.c 1.17
sys/arch/mips/sibyte/dev/sbtimer.c 1.21
sys/arch/mips/sibyte/dev/sbwdog.c 1.15
sys/arch/mips/sibyte/pci/sbbrz_pci.c 1.8
usr.sbin/installboot/installboot.8 1.94

Move sys/arch/sbmips/* into sys/arch/evbmips/*/sbmips.
 1.43.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.44.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.8 13-Apr-2015  riastradh MD rnd.h cleanups. Please let me know if I broke anything!
 1.7 15-Nov-2014  christos branches: 1.7.2;
centralize the call unit / dialout macros
 1.6 02-Feb-2012  tls branches: 1.6.6;
Entropy-pool implementation move and cleanup.

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

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

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

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

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

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.5 19-Nov-2011  tls branches: 1.5.2;
First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>. This change includes
the following:

An initial cleanup and minor reorganization of the entropy pool
code in sys/dev/rnd.c and sys/dev/rndpool.c. Several bugs are
fixed. Some effort is made to accumulate entropy more quickly at
boot time.

A generic interface, "rndsink", is added, for stream generators to
request that they be re-keyed with good quality entropy from the pool
as soon as it is available.

The arc4random()/arc4randbytes() implementation in libkern is
adjusted to use the rndsink interface for rekeying, which helps
address the problem of low-quality keys at boot time.

An implementation of the FIPS 140-2 statistical tests for random
number generator quality is provided (libkern/rngtest.c). This
is based on Greg Rose's implementation from Qualcomm.

A new random stream generator, nist_ctr_drbg, is provided. It is
based on an implementation of the NIST SP800-90 CTR_DRBG by
Henric Jungheim. This generator users AES in a modified counter
mode to generate a backtracking-resistant random stream.

An abstraction layer, "cprng", is provided for in-kernel consumers
of randomness. The arc4random/arc4randbytes API is deprecated for
in-kernel use. It is replaced by "cprng_strong". The current
cprng_fast implementation wraps the existing arc4random
implementation. The current cprng_strong implementation wraps the
new CTR_DRBG implementation. Both interfaces are rekeyed from
the entropy pool automatically at intervals justifiable from best
current cryptographic practice.

In some quick tests, cprng_fast() is about the same speed as
the old arc4randbytes(), and cprng_strong() is about 20% faster
than rnd_extract_data(). Performance is expected to improve.

The AES code in src/crypto/rijndael is no longer an optional
kernel component, as it is required by cprng_strong, which is
not an optional kernel component.

The entropy pool output is subjected to the rngtest tests at
startup time; if it fails, the system will reboot. There is
approximately a 3/10000 chance of a false positive from these
tests. Entropy pool _input_ from hardware random numbers is
subjected to the rngtest tests at attach time, as well as the
FIPS continuous-output test, to detect bad or stuck hardware
RNGs; if any are detected, they are detached, but the system
continues to run.

A problem with rndctl(8) is fixed -- datastructures with
pointers in arrays are no longer passed to userspace (this
was not a security problem, but rather a major issue for
compat32). A new kernel will require a new rndctl.

The sysctl kern.arandom() and kern.urandom() nodes are hooked
up to the new generators, but the /dev/*random pseudodevices
are not, yet.

Manual pages for the new kernel interfaces are forthcoming.
 1.4 01-Feb-2011  matt branches: 1.4.4;
Update to CFATTACH_DECL_NEW.
 1.3 07-Mar-2006  he branches: 1.3.2; 1.3.88; 1.3.92; 1.3.98; 1.3.100;
Remove another instance of the macro triplet SET/CLR/ISSET, now
to be found in <sys/types.h>.
 1.2 07-Feb-2003  cgd branches: 1.2.18; 1.2.32; 1.2.34; 1.2.36;
Update to consistently use Broadcom GPL-compatible license on all SiByte code.
 1.1 05-Mar-2002  simonb branches: 1.1.10; 1.1.12;
Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.2 05-Mar-2002  simonb Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.1.12.1 05-Mar-2002  simonb file sbscnvar.h was added on branch nathanw_sa on 2002-03-05 23:46:44 +0000
 1.1.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 05-Mar-2002  jdolecek file sbscnvar.h was added on branch kqueue on 2002-06-23 17:38:08 +0000
 1.2.36.1 13-Mar-2006  yamt sync with head.
 1.2.34.1 22-Apr-2006  simonb Sync with head.
 1.2.32.1 09-Sep-2006  rpaulo sync with head
 1.2.18.1 21-Jun-2006  yamt sync with head.
 1.3.100.1 08-Feb-2011  bouyer Sync with HEAD
 1.3.98.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.92.1 05-Mar-2011  rmind sync with head
 1.3.88.1 09-Jun-2010  matt Update to the device NWO:
Use CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_normal_*
Use device_* accessors
 1.3.2.2 07-Mar-2006  he Remove another instance of the macro triplet SET/CLR/ISSET, now
to be found in <sys/types.h>.
 1.3.2.1 07-Mar-2006  he file sbscnvar.h was added on branch elad-kernelauth on 2006-03-07 14:01:42 +0000
 1.4.4.1 17-Apr-2012  yamt sync with head
 1.5.2.1 18-Feb-2012  mrg merge to -current.
 1.6.6.1 03-Dec-2017  jdolecek update from HEAD
 1.7.2.1 06-Jun-2015  skrll Sync with HEAD
 1.19 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.18 24-Apr-2021  thorpej branches: 1.18.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.17 24-Jul-2017  mrg branches: 1.17.18;
mostly converted sbmips -> evbmips. the SBMIPS kernel builds fully
sans disksubr.c. intr.h does not need any additional fixes now,
only disklabel.h.

also test-built some other mips kernels.
 1.16 10-Jul-2011  matt branches: 1.16.12; 1.16.30; 1.16.46;
cleanup <machine/*.h> includes
 1.15 01-Feb-2011  matt Use aprint_* and misc cleanup.
 1.14 01-Feb-2011  matt Update to CFATTACH_DECL_NEW.
 1.13 28-Mar-2006  thorpej branches: 1.13.84; 1.13.88; 1.13.94; 1.13.96;
Use device_unit().
 1.12 11-Dec-2005  christos branches: 1.12.4; 1.12.6; 1.12.8; 1.12.10; 1.12.12;
merge ktrace-lwp.
 1.11 26-Aug-2005  drochner kill some more simple submatch() functions, use config_stdsubmatch()
 1.10 25-Aug-2005  drochner replace the "locdesc_t" structure carrying the number of locators
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
 1.9 13-Sep-2004  drochner branches: 1.9.12;
autoconf cleanup: turn xxxsubmatch() functions into the locator
passing variants
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 01-Jan-2003  thorpej branches: 1.7.2;
Use aprint_normal() for cfprint routines.
 1.6 12-Nov-2002  simonb Add support for the ST M41T81 RTC found on pass 2 swarm boards.
XXX: Much of this should live in arch/sbmips instead of arch/mips/sibyte.
XXX: These should be replaced with MI SMBus drivers one day.
 1.5 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.4 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.1 04-Jun-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6;
Add an extremely rough SMBus handler and RTC driver. This will be
cleaned up significantly when we have an MI SMBus framework, but at
least we can see the RTC on the swarm now.
 1.1.6.4 03-Jan-2003  thorpej Sync with HEAD.
 1.1.6.3 11-Dec-2002  thorpej Sync with HEAD.
 1.1.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.6.1 04-Jun-2002  nathanw file sbsmbus.c was added on branch nathanw_sa on 2002-10-18 02:38:50 +0000
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 04-Jun-2002  gehenna file sbsmbus.c was added on branch gehenna-devsw on 2002-07-14 18:37:16 +0000
 1.1.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.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 04-Jun-2002  jdolecek file sbsmbus.c was added on branch kqueue on 2002-06-23 17:38:08 +0000
 1.7.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.12.1 21-Jun-2006  yamt sync with head.
 1.12.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.12.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.12.8.1 01-Apr-2006  yamt sync with head.
 1.12.6.1 22-Apr-2006  simonb Sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.96.1 08-Feb-2011  bouyer Sync with HEAD
 1.13.94.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.88.1 05-Mar-2011  rmind sync with head
 1.13.84.1 09-Jun-2010  matt Update to the device NWO:
Use CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_normal_*
Use device_* accessors
 1.16.46.1 30-Aug-2017  martin Pull up following revision(s) (requested by mrg in ticket #231):
distrib/sets/lists/base/md.evbmips 1.3
doc/CHANGES 1.2303-1.2304
etc/etc.evbmips/MAKEDEV.conf 1.8
etc/etc.evbmips/Makefile.inc 1.22
etc/mtree/Makefile 1.37
etc/mtree/NetBSD.dist.evbmips 1.1
sys/arch/evbmips/Makefile 1.9
sys/arch/evbmips/conf/SBMIPS upto 1.2
sys/arch/evbmips/conf/SBMIPS.MP upto 1.2
sys/arch/evbmips/conf/SBMIPS64 upto 1.2
sys/arch/evbmips/conf/SBMIPS64.MP upto 1.2
sys/arch/evbmips/conf/files.sbmips upto 1.2
sys/arch/evbmips/conf/std.sbmips upto 1.2
sys/arch/evbmips/include/disklabel.h 1.6
sys/arch/evbmips/include/loadfile_machdep.h
sys/arch/evbmips/include/param.h 1.10
sys/arch/evbmips/include/pci_machdep.h 1.3
sys/arch/evbmips/sbmips/TODO
sys/arch/evbmips/sbmips/autoconf.c
sys/arch/evbmips/sbmips/autoconf.h
sys/arch/evbmips/sbmips/console.c
sys/arch/evbmips/sbmips/cpu.c upto 1.3
sys/arch/evbmips/sbmips/cpuvar.h
sys/arch/evbmips/sbmips/disksubr.c
sys/arch/evbmips/sbmips/leds.h
sys/arch/evbmips/sbmips/locore_machdep.S
sys/arch/evbmips/sbmips/machdep.c upto 1.2
sys/arch/evbmips/sbmips/rtc.c upto 1.2
sys/arch/evbmips/sbmips/sb1250_icu.c upto 1.2
sys/arch/evbmips/sbmips/swarm.h
sys/arch/evbmips/sbmips/systemsw.c upto 1.2
sys/arch/evbmips/sbmips/systemsw.h
sys/arch/evbmips/sbmips/zbbus.c upto 1.2
sys/arch/evbmips/stand/Makefile 1.1
sys/arch/evbmips/stand/sbmips/Makefile
sys/arch/evbmips/stand/sbmips/Makefile.bootprogs upto 1.2
sys/arch/evbmips/stand/sbmips/Makefile.bootprogs 1.3
sys/arch/evbmips/stand/sbmips/Makefile.bootxx
sys/arch/evbmips/stand/sbmips/Makefile.inc upto 1.3
sys/arch/evbmips/stand/sbmips/boot/Makefile
sys/arch/evbmips/stand/sbmips/boot/filesystem.c
sys/arch/evbmips/stand/sbmips/boot/version
sys/arch/evbmips/stand/sbmips/bootxx_cd9660/Makefile
sys/arch/evbmips/stand/sbmips/bootxx_ffs/Makefile
sys/arch/evbmips/stand/sbmips/bootxx_lfs/Makefile
sys/arch/evbmips/stand/sbmips/common/bbinfo.h
sys/arch/evbmips/stand/sbmips/common/blkdev.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/blkdev.h
sys/arch/evbmips/stand/sbmips/common/boot.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/boot.ldscript
sys/arch/evbmips/stand/sbmips/common/booted_dev.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/bootxx.c
sys/arch/evbmips/stand/sbmips/common/cfe.c
sys/arch/evbmips/stand/sbmips/common/cfe_api.c
sys/arch/evbmips/stand/sbmips/common/cfe_api.h
sys/arch/evbmips/stand/sbmips/common/cfe_api_int.h
sys/arch/evbmips/stand/sbmips/common/cfe_error.h
sys/arch/evbmips/stand/sbmips/common/cfe_ioctl.h
sys/arch/evbmips/stand/sbmips/common/checksize.sh
sys/arch/evbmips/stand/sbmips/common/common.h
sys/arch/evbmips/stand/sbmips/common/panic_putstr.c
sys/arch/evbmips/stand/sbmips/common/putstr.c
sys/arch/evbmips/stand/sbmips/common/start.S
sys/arch/evbmips/stand/sbmips/netboot/Makefile
sys/arch/evbmips/stand/sbmips/netboot/conf.c
sys/arch/evbmips/stand/sbmips/netboot/dev_net.c
sys/arch/evbmips/stand/sbmips/netboot/devopen.c
sys/arch/evbmips/stand/sbmips/netboot/getsecs.c upto 1.2
sys/arch/evbmips/stand/sbmips/netboot/if_cfe.c upto 1.2
sys/arch/evbmips/stand/sbmips/netboot/version
sys/arch/mips/conf/files.sibyte 1.8
sys/arch/mips/include/pmap.h 1.70
sys/arch/mips/sibyte/dev/sbbuswatch.c 1.4
sys/arch/mips/sibyte/dev/sbmac.c 1.49
sys/arch/mips/sibyte/dev/sbscn.c 1.43
sys/arch/mips/sibyte/dev/sbsmbus.c 1.17
sys/arch/mips/sibyte/dev/sbtimer.c 1.21
sys/arch/mips/sibyte/dev/sbwdog.c 1.15
sys/arch/mips/sibyte/pci/sbbrz_pci.c 1.8
usr.sbin/installboot/installboot.8 1.94

Move sys/arch/sbmips/* into sys/arch/evbmips/*/sbmips.
 1.16.30.1 28-Aug-2017  skrll Sync with HEAD
 1.16.12.1 03-Dec-2017  jdolecek update from HEAD
 1.17.18.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.17.18.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.18.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 04-Jun-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6;
Add an extremely rough SMBus handler and RTC driver. This will be
cleaned up significantly when we have an MI SMBus framework, but at
least we can see the RTC on the swarm now.
 1.1.6.2 04-Jun-2002  simonb Add an extremely rough SMBus handler and RTC driver. This will be
cleaned up significantly when we have an MI SMBus framework, but at
least we can see the RTC on the swarm now.
 1.1.6.1 04-Jun-2002  simonb file sbsmbusvar.h was added on branch nathanw_sa on 2002-06-04 08:32:43 +0000
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 04-Jun-2002  gehenna file sbsmbusvar.h was added on branch gehenna-devsw on 2002-07-14 18:37:16 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 04-Jun-2002  jdolecek file sbsmbusvar.h was added on branch kqueue on 2002-06-23 17:38:08 +0000
 1.21 24-Jul-2017  mrg mostly converted sbmips -> evbmips. the SBMIPS kernel builds fully
sans disksubr.c. intr.h does not need any additional fixes now,
only disklabel.h.

also test-built some other mips kernels.
 1.20 21-Jul-2016  christos branches: 1.20.8;
make this compile
 1.19 10-Mar-2011  tsutsui branches: 1.19.14; 1.19.32; 1.19.36;
Set correct struct clockframe .intr value for hardclock(9).
 1.18 20-Feb-2011  matt Merge from matt-nb5-mips64.
Add pci support.
new interrupt code.
Adapt to new world order for MIPS
 1.17 01-Feb-2011  matt Use aprint_* and misc cleanup.
 1.16 01-Feb-2011  matt Update to CFATTACH_DECL_NEW.
 1.15 14-Dec-2009  matt branches: 1.15.4; 1.15.6; 1.15.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.14 12-Aug-2009  simonb Remove many magic numbers for addresses and interrupt numbers, and use
constants defined in SiByte/Broadcom standard header files. Switch from
using offsets for locators to actual addresses.

Tested on a swarm (my rhone is dead, but should be OK there too).
 1.13 08-Jan-2008  simonb branches: 1.13.10; 1.13.28;
Add timecounter support for sbmips machines and Broadcom SiByte CPUs.
Based on patch from joerg@, with tweaks by me to work with sbmips
non-use of the CP0 count/compare registers for clock interrupts.
 1.12 26-Nov-2007  ad branches: 1.12.6;
IPL_STATCLOCK -> IPL_HIGH
 1.11 29-Mar-2006  thorpej branches: 1.11.18; 1.11.36; 1.11.38; 1.11.44;
Use device_cfdata().
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.6; 1.10.8; 1.10.10; 1.10.12;
merge ktrace-lwp.
 1.9 15-Jul-2003  lukem branches: 1.9.16;
__KERNEL_RCSID()
 1.8 07-Feb-2003  cgd branches: 1.8.2;
Update to consistently use Broadcom GPL-compatible license on all SiByte code.
 1.7 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Jun-2002  simonb branches: 1.4.2;
Remove some clocktick debug code.
 1.3 06-Mar-2002  simonb branches: 1.3.6; 1.3.10;
Implement a clkread() function for microtime() using a multu/mfhi
sequence using the reciprocal of the delay divisor to perform the
division.
Set the cp0 compare register so that it doesn't trigger interrupts and
reset the cp0 count register in the hardclock interrupt handler.
 1.2 06-Mar-2002  simonb Wrap long line and remove a bogus XXX comment.
 1.1 05-Mar-2002  simonb Add support for the on-chip peripherals on the Broadcom SiByte SB1250 CPU
and support routines for the Broadcom CFE (Common Firmware Environment).

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.
 1.3.10.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.3.10.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.10.1 06-Mar-2002  jdolecek file sbtimer.c was added on branch kqueue on 2002-06-23 17:38:08 +0000
 1.3.6.1 16-Jul-2002  gehenna catch up with -current.
 1.4.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.4.2.1 27-Jun-2002  nathanw file sbtimer.c was added on branch nathanw_sa on 2002-10-18 02:38:50 +0000
 1.8.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.16.3 21-Jan-2008  yamt sync with head
 1.9.16.2 07-Dec-2007  yamt sync with head
 1.9.16.1 21-Jun-2006  yamt sync with head.
 1.10.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.10.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.10.8.1 01-Apr-2006  yamt sync with head.
 1.10.6.1 22-Apr-2006  simonb Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.44.2 18-Feb-2008  mjf Sync with HEAD.
 1.11.44.1 08-Dec-2007  mjf Sync with HEAD.
 1.11.38.1 09-Jan-2008  matt sync with HEAD
 1.11.36.1 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.11.18.1 03-Dec-2007  ad Sync with HEAD.
 1.12.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.13.28.3 09-Jun-2010  matt Update to the device NWO:
Use CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_normal_*
Use device_* accessors
 1.13.28.2 23-Nov-2009  matt Use vaddr_t instead uint32_t for storing a pc since the latter won't work in
a LP64 kernel.
 1.13.28.1 23-Nov-2009  matt mips3_ld/mips3_sd need to be passed a volatile uint64_t *
 1.13.10.2 11-Mar-2010  yamt sync with head
 1.13.10.1 19-Aug-2009  yamt sync with head.
 1.15.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.15.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.15.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.15.4.2 21-Apr-2011  rmind sync with head
 1.15.4.1 05-Mar-2011  rmind sync with head
 1.19.36.1 26-Jul-2016  pgoyette Sync with HEAD
 1.19.32.2 28-Aug-2017  skrll Sync with HEAD
 1.19.32.1 05-Oct-2016  skrll Sync with HEAD
 1.19.14.1 03-Dec-2017  jdolecek update from HEAD
 1.20.8.1 30-Aug-2017  martin Pull up following revision(s) (requested by mrg in ticket #231):
distrib/sets/lists/base/md.evbmips 1.3
doc/CHANGES 1.2303-1.2304
etc/etc.evbmips/MAKEDEV.conf 1.8
etc/etc.evbmips/Makefile.inc 1.22
etc/mtree/Makefile 1.37
etc/mtree/NetBSD.dist.evbmips 1.1
sys/arch/evbmips/Makefile 1.9
sys/arch/evbmips/conf/SBMIPS upto 1.2
sys/arch/evbmips/conf/SBMIPS.MP upto 1.2
sys/arch/evbmips/conf/SBMIPS64 upto 1.2
sys/arch/evbmips/conf/SBMIPS64.MP upto 1.2
sys/arch/evbmips/conf/files.sbmips upto 1.2
sys/arch/evbmips/conf/std.sbmips upto 1.2
sys/arch/evbmips/include/disklabel.h 1.6
sys/arch/evbmips/include/loadfile_machdep.h
sys/arch/evbmips/include/param.h 1.10
sys/arch/evbmips/include/pci_machdep.h 1.3
sys/arch/evbmips/sbmips/TODO
sys/arch/evbmips/sbmips/autoconf.c
sys/arch/evbmips/sbmips/autoconf.h
sys/arch/evbmips/sbmips/console.c
sys/arch/evbmips/sbmips/cpu.c upto 1.3
sys/arch/evbmips/sbmips/cpuvar.h
sys/arch/evbmips/sbmips/disksubr.c
sys/arch/evbmips/sbmips/leds.h
sys/arch/evbmips/sbmips/locore_machdep.S
sys/arch/evbmips/sbmips/machdep.c upto 1.2
sys/arch/evbmips/sbmips/rtc.c upto 1.2
sys/arch/evbmips/sbmips/sb1250_icu.c upto 1.2
sys/arch/evbmips/sbmips/swarm.h
sys/arch/evbmips/sbmips/systemsw.c upto 1.2
sys/arch/evbmips/sbmips/systemsw.h
sys/arch/evbmips/sbmips/zbbus.c upto 1.2
sys/arch/evbmips/stand/Makefile 1.1
sys/arch/evbmips/stand/sbmips/Makefile
sys/arch/evbmips/stand/sbmips/Makefile.bootprogs upto 1.2
sys/arch/evbmips/stand/sbmips/Makefile.bootprogs 1.3
sys/arch/evbmips/stand/sbmips/Makefile.bootxx
sys/arch/evbmips/stand/sbmips/Makefile.inc upto 1.3
sys/arch/evbmips/stand/sbmips/boot/Makefile
sys/arch/evbmips/stand/sbmips/boot/filesystem.c
sys/arch/evbmips/stand/sbmips/boot/version
sys/arch/evbmips/stand/sbmips/bootxx_cd9660/Makefile
sys/arch/evbmips/stand/sbmips/bootxx_ffs/Makefile
sys/arch/evbmips/stand/sbmips/bootxx_lfs/Makefile
sys/arch/evbmips/stand/sbmips/common/bbinfo.h
sys/arch/evbmips/stand/sbmips/common/blkdev.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/blkdev.h
sys/arch/evbmips/stand/sbmips/common/boot.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/boot.ldscript
sys/arch/evbmips/stand/sbmips/common/booted_dev.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/bootxx.c
sys/arch/evbmips/stand/sbmips/common/cfe.c
sys/arch/evbmips/stand/sbmips/common/cfe_api.c
sys/arch/evbmips/stand/sbmips/common/cfe_api.h
sys/arch/evbmips/stand/sbmips/common/cfe_api_int.h
sys/arch/evbmips/stand/sbmips/common/cfe_error.h
sys/arch/evbmips/stand/sbmips/common/cfe_ioctl.h
sys/arch/evbmips/stand/sbmips/common/checksize.sh
sys/arch/evbmips/stand/sbmips/common/common.h
sys/arch/evbmips/stand/sbmips/common/panic_putstr.c
sys/arch/evbmips/stand/sbmips/common/putstr.c
sys/arch/evbmips/stand/sbmips/common/start.S
sys/arch/evbmips/stand/sbmips/netboot/Makefile
sys/arch/evbmips/stand/sbmips/netboot/conf.c
sys/arch/evbmips/stand/sbmips/netboot/dev_net.c
sys/arch/evbmips/stand/sbmips/netboot/devopen.c
sys/arch/evbmips/stand/sbmips/netboot/getsecs.c upto 1.2
sys/arch/evbmips/stand/sbmips/netboot/if_cfe.c upto 1.2
sys/arch/evbmips/stand/sbmips/netboot/version
sys/arch/mips/conf/files.sibyte 1.8
sys/arch/mips/include/pmap.h 1.70
sys/arch/mips/sibyte/dev/sbbuswatch.c 1.4
sys/arch/mips/sibyte/dev/sbmac.c 1.49
sys/arch/mips/sibyte/dev/sbscn.c 1.43
sys/arch/mips/sibyte/dev/sbsmbus.c 1.17
sys/arch/mips/sibyte/dev/sbtimer.c 1.21
sys/arch/mips/sibyte/dev/sbwdog.c 1.15
sys/arch/mips/sibyte/pci/sbbrz_pci.c 1.8
usr.sbin/installboot/installboot.8 1.94

Move sys/arch/sbmips/* into sys/arch/evbmips/*/sbmips.
 1.15 24-Jul-2017  mrg mostly converted sbmips -> evbmips. the SBMIPS kernel builds fully
sans disksubr.c. intr.h does not need any additional fixes now,
only disklabel.h.

also test-built some other mips kernels.
 1.14 21-Jul-2016  christos branches: 1.14.8;
make this compile
 1.13 10-Jul-2011  matt branches: 1.13.12; 1.13.30; 1.13.34;
cleanup <machine/*.h> includes
 1.12 20-Feb-2011  matt Merge from matt-nb5-mips64.
Add pci support.
new interrupt code.
Adapt to new world order for MIPS
 1.11 01-Feb-2011  matt Use aprint_* and misc cleanup.
 1.10 01-Feb-2011  matt Update to CFATTACH_DECL_NEW.
 1.9 14-Dec-2009  matt branches: 1.9.4; 1.9.6; 1.9.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.8 12-Aug-2009  simonb Remove many magic numbers for addresses and interrupt numbers, and use
constants defined in SiByte/Broadcom standard header files. Switch from
using offsets for locators to actual addresses.

Tested on a swarm (my rhone is dead, but should be OK there too).
 1.7 12-Jan-2006  simonb branches: 1.7.76; 1.7.94;
Use EINVAL for an invalid interval instead of EOPNOTSUPP.
Pointed out by Allen Briggs.
 1.6 11-Dec-2005  christos branches: 1.6.2;
merge ktrace-lwp.
 1.5 15-Jul-2003  lukem branches: 1.5.16;
__KERNEL_RCSID()
 1.4 02-Oct-2002  thorpej branches: 1.4.6;
Add trailing ; to CFATTACH_DECL.
 1.3 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 31-Jul-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6;
Add support for the watchdog timers on the BCM1xxx parts.
 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 31-Jul-2002  jdolecek file sbwdog.c was added on branch kqueue on 2002-09-06 08:37:41 +0000
 1.1.4.2 31-Aug-2002  gehenna catch up with -current.
 1.1.4.1 31-Jul-2002  gehenna file sbwdog.c was added on branch gehenna-devsw on 2002-08-31 13:45:22 +0000
 1.1.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.1 31-Jul-2002  nathanw file sbwdog.c was added on branch nathanw_sa on 2002-10-18 02:38:51 +0000
 1.4.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.6.1 03-Aug-2004  skrll Sync with HEAD
 1.5.16.1 21-Jun-2006  yamt sync with head.
 1.6.2.1 15-Jan-2006  yamt sync with head.
 1.7.94.3 09-Jun-2010  matt Update to the device NWO:
Use CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_normal_*
Use device_* accessors
 1.7.94.2 15-May-2010  matt Make the sibyte watchdog establish an interrupt, and if taken, drop into DDB.
Make sure these interrupt are not blocked by IPL_HIGH.
 1.7.94.1 23-Nov-2009  matt mips3_ld/mips3_sd need to be passed a volatile uint64_t *
 1.7.76.2 11-Mar-2010  yamt sync with head
 1.7.76.1 19-Aug-2009  yamt sync with head.
 1.9.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.9.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.9.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.9.4.1 05-Mar-2011  rmind sync with head
 1.13.34.1 26-Jul-2016  pgoyette Sync with HEAD
 1.13.30.2 28-Aug-2017  skrll Sync with HEAD
 1.13.30.1 05-Oct-2016  skrll Sync with HEAD
 1.13.12.1 03-Dec-2017  jdolecek update from HEAD
 1.14.8.1 30-Aug-2017  martin Pull up following revision(s) (requested by mrg in ticket #231):
distrib/sets/lists/base/md.evbmips 1.3
doc/CHANGES 1.2303-1.2304
etc/etc.evbmips/MAKEDEV.conf 1.8
etc/etc.evbmips/Makefile.inc 1.22
etc/mtree/Makefile 1.37
etc/mtree/NetBSD.dist.evbmips 1.1
sys/arch/evbmips/Makefile 1.9
sys/arch/evbmips/conf/SBMIPS upto 1.2
sys/arch/evbmips/conf/SBMIPS.MP upto 1.2
sys/arch/evbmips/conf/SBMIPS64 upto 1.2
sys/arch/evbmips/conf/SBMIPS64.MP upto 1.2
sys/arch/evbmips/conf/files.sbmips upto 1.2
sys/arch/evbmips/conf/std.sbmips upto 1.2
sys/arch/evbmips/include/disklabel.h 1.6
sys/arch/evbmips/include/loadfile_machdep.h
sys/arch/evbmips/include/param.h 1.10
sys/arch/evbmips/include/pci_machdep.h 1.3
sys/arch/evbmips/sbmips/TODO
sys/arch/evbmips/sbmips/autoconf.c
sys/arch/evbmips/sbmips/autoconf.h
sys/arch/evbmips/sbmips/console.c
sys/arch/evbmips/sbmips/cpu.c upto 1.3
sys/arch/evbmips/sbmips/cpuvar.h
sys/arch/evbmips/sbmips/disksubr.c
sys/arch/evbmips/sbmips/leds.h
sys/arch/evbmips/sbmips/locore_machdep.S
sys/arch/evbmips/sbmips/machdep.c upto 1.2
sys/arch/evbmips/sbmips/rtc.c upto 1.2
sys/arch/evbmips/sbmips/sb1250_icu.c upto 1.2
sys/arch/evbmips/sbmips/swarm.h
sys/arch/evbmips/sbmips/systemsw.c upto 1.2
sys/arch/evbmips/sbmips/systemsw.h
sys/arch/evbmips/sbmips/zbbus.c upto 1.2
sys/arch/evbmips/stand/Makefile 1.1
sys/arch/evbmips/stand/sbmips/Makefile
sys/arch/evbmips/stand/sbmips/Makefile.bootprogs upto 1.2
sys/arch/evbmips/stand/sbmips/Makefile.bootprogs 1.3
sys/arch/evbmips/stand/sbmips/Makefile.bootxx
sys/arch/evbmips/stand/sbmips/Makefile.inc upto 1.3
sys/arch/evbmips/stand/sbmips/boot/Makefile
sys/arch/evbmips/stand/sbmips/boot/filesystem.c
sys/arch/evbmips/stand/sbmips/boot/version
sys/arch/evbmips/stand/sbmips/bootxx_cd9660/Makefile
sys/arch/evbmips/stand/sbmips/bootxx_ffs/Makefile
sys/arch/evbmips/stand/sbmips/bootxx_lfs/Makefile
sys/arch/evbmips/stand/sbmips/common/bbinfo.h
sys/arch/evbmips/stand/sbmips/common/blkdev.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/blkdev.h
sys/arch/evbmips/stand/sbmips/common/boot.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/boot.ldscript
sys/arch/evbmips/stand/sbmips/common/booted_dev.c upto 1.2
sys/arch/evbmips/stand/sbmips/common/bootxx.c
sys/arch/evbmips/stand/sbmips/common/cfe.c
sys/arch/evbmips/stand/sbmips/common/cfe_api.c
sys/arch/evbmips/stand/sbmips/common/cfe_api.h
sys/arch/evbmips/stand/sbmips/common/cfe_api_int.h
sys/arch/evbmips/stand/sbmips/common/cfe_error.h
sys/arch/evbmips/stand/sbmips/common/cfe_ioctl.h
sys/arch/evbmips/stand/sbmips/common/checksize.sh
sys/arch/evbmips/stand/sbmips/common/common.h
sys/arch/evbmips/stand/sbmips/common/panic_putstr.c
sys/arch/evbmips/stand/sbmips/common/putstr.c
sys/arch/evbmips/stand/sbmips/common/start.S
sys/arch/evbmips/stand/sbmips/netboot/Makefile
sys/arch/evbmips/stand/sbmips/netboot/conf.c
sys/arch/evbmips/stand/sbmips/netboot/dev_net.c
sys/arch/evbmips/stand/sbmips/netboot/devopen.c
sys/arch/evbmips/stand/sbmips/netboot/getsecs.c upto 1.2
sys/arch/evbmips/stand/sbmips/netboot/if_cfe.c upto 1.2
sys/arch/evbmips/stand/sbmips/netboot/version
sys/arch/mips/conf/files.sibyte 1.8
sys/arch/mips/include/pmap.h 1.70
sys/arch/mips/sibyte/dev/sbbuswatch.c 1.4
sys/arch/mips/sibyte/dev/sbmac.c 1.49
sys/arch/mips/sibyte/dev/sbscn.c 1.43
sys/arch/mips/sibyte/dev/sbsmbus.c 1.17
sys/arch/mips/sibyte/dev/sbtimer.c 1.21
sys/arch/mips/sibyte/dev/sbwdog.c 1.15
sys/arch/mips/sibyte/pci/sbbrz_pci.c 1.8
usr.sbin/installboot/installboot.8 1.94

Move sys/arch/sbmips/* into sys/arch/evbmips/*/sbmips.

RSS XML Feed