Home | History | Annotate | only in /src/sys/arch/evbmips/alchemy
History log of /src/sys/arch/evbmips/alchemy
RevisionDateAuthorComments
 1.21 03-Oct-2025  thorpej Use device_setprop_data() to set the "mac-address" property.
 1.20 09-Feb-2016  kiyohara Clear ATAC_CAP_DATA32, if dev is atabus@wdc@pcmcia@aupcmcia. It is 32-bit transfers are not supported.
 1.19 27-Oct-2012  chs branches: 1.19.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.18 29-Jul-2012  mlelstv branches: 1.18.2;
Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().

Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().

Make cpu_rootconf(9) describe the calling order.
 1.17 22-Jan-2010  martin branches: 1.17.12; 1.17.18;
Unify the name of the device property to hold a MAC address - there was
no clear majority for either "mac-addr" vs. "mac-address", but a quick
gallup poll among developers selected the latter.
 1.16 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.15 04-Jan-2008  ad branches: 1.15.6; 1.15.8; 1.15.10;
Correct headers.
 1.14 22-Feb-2007  thorpej branches: 1.14.22; 1.14.28; 1.14.34;
TRUE -> true, FALSE -> false
 1.13 17-Nov-2006  tsutsui branches: 1.13.4;
Defer _spl0() or _splnone() calls (which enable hardware interrupts)
from cpu_configure(9) to cpu_initclocks(9) on mips ports which use
mips3_clockintr.c:mips3_clockintr() (i.e. CPU INT5 clock) to avoid
hardclock(9) before softclock interrupt is initialized in initclocks().
This should be harmless because initclocks() is a part of configure()
in these days and there is no MI function which expects hardware
interrupts between cpu_configure(9) and cpu_initclocks(9).

Disccussed on tech-kern and port-mips.
 1.12 05-May-2006  thorpej branches: 1.12.4; 1.12.8; 1.12.10;
Remove the devprop API and switch everthing over to the new proplib. Add
a new device_properties() accessor for device_t that returns the device's
property dictionary.
 1.11 26-Feb-2006  thorpej branches: 1.11.2; 1.11.4; 1.11.6;
Use device_is_a()
 1.10 18-Feb-2006  thorpej - Don't expose dev_propdb directly -- provide devprop_*() wrappers instead.
- Rework the ARMADILLO / epe device properties interaction so that it actually
associates the MAC address property with the epe device instance.
 1.9 11-Dec-2005  christos branches: 1.9.2; 1.9.4; 1.9.6;
merge ktrace-lwp.
 1.8 09-Jun-2005  he branches: 1.8.2;
Change the second argument of config_rootfound() from a string to NULL,
so that we compile with -Wcast-qual.
 1.7 23-Oct-2004  thorpej Centralize the declaration of booted_device and booted_partition.
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 04-Jul-2003  thorpej Nuke the "alchemy_info" stuff, and just use the dev_propdb to set
the mac-addr property for the Au1x00 on-chip MACs.
 1.4 27-Sep-2002  thorpej branches: 1.4.6;
Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.3 26-Sep-2002  thorpej Get the pointer to the driver name early, rather than constantly
deferencing the cfdriver pointer.
 1.2 11-Sep-2002  simonb Use AU1500_MAC0_BASE as well as a test for setting the MAC addresses
of the on-chip interfaces.
 1.1 29-Jul-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6;
Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 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 29-Jul-2002  jdolecek file autoconf.c was added on branch kqueue on 2002-09-06 08:34:14 +0000
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 29-Jul-2002  gehenna file autoconf.c was added on branch gehenna-devsw on 2002-08-30 00:29:27 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.1.2.1 29-Jul-2002  nathanw file autoconf.c was added on branch nathanw_sa on 2002-09-17 21:14:18 +0000
 1.4.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.6.4 02-Nov-2004  skrll Sync with HEAD.
 1.4.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.2.4 21-Jan-2008  yamt sync with head
 1.8.2.3 26-Feb-2007  yamt sync with head.
 1.8.2.2 30-Dec-2006  yamt sync with head.
 1.8.2.1 21-Jun-2006  yamt sync with head.
 1.9.6.2 01-Jun-2006  kardel Sync with head.
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.9.2.2 01-Mar-2006  yamt sync with head.
 1.9.2.1 18-Feb-2006  yamt sync with head.
 1.11.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.11.4.1 11-May-2006  elad sync with head
 1.11.2.1 24-May-2006  yamt sync with head.
 1.12.10.1 10-Dec-2006  yamt sync with head.
 1.12.8.1 12-Jan-2007  ad Sync with head.
 1.12.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.13.4.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.14.34.1 08-Jan-2008  bouyer Sync with HEAD
 1.14.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.14.22.1 09-Jan-2008  matt sync with HEAD
 1.15.10.2 11-Mar-2010  yamt sync with head
 1.15.10.1 16-May-2008  yamt sync with head.
 1.15.8.1 18-May-2008  yamt sync with head.
 1.15.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.18.1 08-Aug-2012  martin Pull up following revision(s) (requested by mlelstv in ticket #466):
sys/arch/amiga/amiga/autoconf.c: revision 1.113
sys/arch/rs6000/rs6000/autoconf.c: revision 1.4
sys/arch/emips/emips/autoconf.c: revision 1.6
sys/arch/sandpoint/sandpoint/autoconf.c: revision 1.27
sys/arch/evbmips/alchemy/autoconf.c: revision 1.18
sys/arch/sgimips/sgimips/autoconf.c: revision 1.43
sys/arch/atari/atari/autoconf.c: revision 1.63
sys/arch/powerpc/oea/ofw_autoconf.c: revision 1.17
sys/arch/mmeye/mmeye/autoconf.c: revision 1.9
distrib/sets/lists/comp/mi: revision 1.1771
sys/arch/mipsco/mipsco/autoconf.c: revision 1.25
sys/arch/iyonix/iyonix/autoconf.c: revision 1.14
sys/arch/hp300/hp300/autoconf.c: revision 1.100
sys/kern/init_main.c: revision 1.445
sys/arch/pmax/pmax/autoconf.c: revision 1.79
sys/arch/netwinder/netwinder/autoconf.c: revision 1.11
sys/arch/dreamcast/dreamcast/autoconf.c: revision 1.10
sys/arch/ibmnws/ibmnws/autoconf.c: revision 1.12
sys/arch/evbppc/ev64260/autoconf.c: revision 1.17
sys/arch/evbmips/gdium/autoconf.c: revision 1.5
sys/arch/algor/algor/autoconf.c: revision 1.21
share/man/man9/Makefile: revision 1.367
sys/arch/ews4800mips/ews4800mips/autoconf.c: revision 1.9
sys/arch/amigappc/amigappc/autoconf.c: revision 1.5
sys/arch/x86/x86/x86_autoconf.c: revision 1.65
sys/arch/acorn26/acorn26/autoconf.c: revision 1.9
sys/arch/mvmeppc/mvmeppc/autoconf.c: revision 1.13
sys/arch/vax/vax/autoconf.c: revision 1.94
sys/arch/usermode/dev/cpu.c: revision 1.72
sys/arch/evbppc/virtex/autoconf.c: revision 1.5
sys/arch/next68k/next68k/autoconf.c: revision 1.26
sys/arch/mac68k/mac68k/autoconf.c: revision 1.73
sys/arch/ia64/ia64/autoconf.c: revision 1.6
sys/arch/evbppc/obs405/obs405_autoconf.c: revision 1.6
share/man/man9/cpu_rootconf.9: revision 1.7
sys/arch/landisk/landisk/autoconf.c: revision 1.6
sys/arch/evbmips/malta/autoconf.c: revision 1.16
sys/arch/sun3/sun3/autoconf.c: revision 1.76
sys/arch/evbppc/explora/autoconf.c: revision 1.13
sys/arch/sun3/sun3/autoconf.c: revision 1.77
sys/arch/evbmips/loongson/autoconf.c: revision 1.3
sys/arch/evbmips/atheros/autoconf.c: revision 1.11
sys/arch/sparc64/sparc64/autoconf.c: revision 1.188
sys/arch/acorn32/acorn32/autoconf.c: revision 1.18
sys/arch/evbarm/evbarm/autoconf.c: revision 1.13
sys/arch/cobalt/cobalt/autoconf.c: revision 1.30
sys/arch/mvme68k/mvme68k/autoconf.c: revision 1.46
sys/arch/hp700/hp700/autoconf.c: revision 1.48
sys/arch/evbmips/adm5120/autoconf.c: revision 1.5
sys/arch/hpcmips/hpcmips/autoconf.c: revision 1.25
sys/arch/alpha/alpha/autoconf.c: revision 1.52
sys/arch/sparc/sparc/autoconf.c: revision 1.244
sys/arch/evbppc/pmppc/autoconf.c: revision 1.7
sys/arch/bebox/bebox/autoconf.c: revision 1.25
sys/arch/luna68k/luna68k/autoconf.c: revision 1.13
sys/arch/hpcarm/hpcarm/autoconf.c: revision 1.20
sys/arch/evbppc/walnut/autoconf.c: revision 1.21
sys/arch/cesfic/cesfic/autoconf.c: revision 1.26
sys/arch/cats/cats/autoconf.c: revision 1.17
sys/arch/x68k/x68k/autoconf.c: revision 1.67
sys/arch/news68k/news68k/autoconf.c: revision 1.21
sys/arch/arc/arc/autoconf.c: revision 1.34
sys/arch/evbsh3/evbsh3/autoconf.c: revision 1.11
sys/sys/conf.h: revision 1.143
sys/arch/evbmips/rasoc/autoconf.c: revision 1.3
sys/arch/hpcsh/hpcsh/autoconf.c: revision 1.26
sys/arch/sun68k/sun68k/autoconf.c: revision 1.29
sys/arch/evbmips/rmixl/autoconf.c: revision 1.6
sys/arch/zaurus/zaurus/autoconf.c: revision 1.12
sys/arch/xen/x86/autoconf.c: revision 1.15
sys/arch/evbppc/mpc85xx/autoconf.c: revision 1.6
sys/arch/shark/shark/autoconf.c: revision 1.18
sys/arch/prep/prep/autoconf.c: revision 1.25
sys/arch/newsmips/newsmips/autoconf.c: revision 1.36
sys/arch/sbmips/sbmips/autoconf.c: revision 1.8
Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.
No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().
Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().
Make cpu_rootconf(9) describe the calling order.
add rootconf(9) as a link to cpu_rootconf(9)
make this compile again
 1.17.12.1 30-Oct-2012  yamt sync with head
 1.18.2.2 03-Dec-2017  jdolecek update from HEAD
 1.18.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.14.1 19-Mar-2016  skrll Sync with HEAD
 1.5 04-Apr-2011  dyoung Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.4 02-Oct-2006  gdamore branches: 1.4.78; 1.4.84;
Add the final glue bits required to enable the SPI interface on the
DBAU1550. This is parameterized somewhat as machdep pluggable code, so
different boards can supply different implementations.

At the moment, the DBAU1550 is the only Au1550 board I know of with SPI
connected devices.

I have not enabled I2C on the DBAU1550, as we do not have drivers for either
of the I2C connected devices (a different temperature/voltage sensor and
a serial eeprom.)
 1.3 23-Feb-2006  gdamore branches: 1.3.8; 1.3.14; 1.3.18; 1.3.20; 1.3.22;
Add PCMCIA board-specific logic for DBAU1550. It isn't quite right yet, so
I'm not enabling it in the configuration file yet. (I have an uncommitted
version of the config file that I will happily share with anyone who wants to
help test or debug.)
 1.2 13-Feb-2006  gdamore branches: 1.2.2;
Added board support for hard-reset (reboot) and power off.
 1.1 08-Feb-2006  gdamore Improved alchemy board support, including board differentiation required for
PCI idsel and irq routing (later).
Various cleanup/rototilling to remove hardcoded pb1000 references.
Reviewed by simonb@, and derived from changes reviewed by matt@ and tsutsui@
 1.2.2.3 01-Mar-2006  yamt sync with head.
 1.2.2.2 18-Feb-2006  yamt sync with head.
 1.2.2.1 13-Feb-2006  yamt file board.h was added on branch yamt-uio_vmspace on 2006-02-18 15:38:32 +0000
 1.3.22.1 22-Oct-2006  yamt sync with head
 1.3.20.2 09-Sep-2006  rpaulo sync with head
 1.3.20.1 23-Feb-2006  rpaulo file board.h was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
 1.3.18.1 18-Nov-2006  ad Sync with head.
 1.3.14.3 30-Dec-2006  yamt sync with head.
 1.3.14.2 21-Jun-2006  yamt sync with head.
 1.3.14.1 23-Feb-2006  yamt file board.h was added on branch yamt-lazymbuf on 2006-06-21 14:50:55 +0000
 1.3.8.2 22-Apr-2006  simonb Sync with head.
 1.3.8.1 23-Feb-2006  simonb file board.h was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.4.84.1 06-Jun-2011  jruoho Sync with HEAD.
 1.4.78.1 21-Apr-2011  rmind sync with head
 1.3 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.2 31-Jul-2002  simonb branches: 1.2.2; 1.2.4; 1.2.6;
Add kttcp, sysmon and broadcom/sibyte devices.
 1.1 29-Jul-2002  simonb Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 1.2.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.2.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.6.1 31-Jul-2002  jdolecek file conf.c was added on branch kqueue on 2002-09-06 08:34:15 +0000
 1.2.4.3 30-Aug-2002  gehenna Add generic major list for evbmips. It's shared with alchemy and malta.
 1.2.4.2 30-Aug-2002  gehenna catch up with -current.
 1.2.4.1 31-Jul-2002  gehenna file conf.c was added on branch gehenna-devsw on 2002-08-30 00:29:27 +0000
 1.2.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.2.2.1 31-Jul-2002  nathanw file conf.c was added on branch nathanw_sa on 2002-09-17 21:14:18 +0000
 1.8 02-Aug-2009  matt Use a common version of cpu.c (mmm removing identical code).
 1.7 17-Oct-2007  garbled branches: 1.7.20; 1.7.34; 1.7.38;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.6 20-May-2007  he branches: 1.6.10;
Now that curcpu() is defined in terms of curlwp() for mips, we need to
include <sys/lwp.h> where curcpu() is used.
 1.5 11-Dec-2005  christos branches: 1.5.30; 1.5.32; 1.5.38;
merge ktrace-lwp.
 1.4 15-Jul-2003  lukem branches: 1.4.16;
__KERNEL_RCSID()
 1.3 02-Oct-2002  thorpej branches: 1.3.6;
Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 29-Jul-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6;
Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 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 29-Jul-2002  jdolecek file cpu.c was added on branch kqueue on 2002-09-06 08:34:15 +0000
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 29-Jul-2002  gehenna file cpu.c was added on branch gehenna-devsw on 2002-08-30 00:29:27 +0000
 1.1.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.1 29-Jul-2002  nathanw file cpu.c was added on branch nathanw_sa on 2002-10-18 02:36:36 +0000
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.1 03-Sep-2007  yamt sync with head.
 1.5.38.1 22-May-2007  matt Update to HEAD.
 1.5.32.1 11-Jul-2007  mjf Sync with head.
 1.5.30.1 27-May-2007  ad Sync with head.
 1.6.10.1 06-Nov-2007  matt sync with HEAD
 1.7.38.1 13-Jan-2010  matt Use a common cpu.c for evbmips single cpu machines
 1.7.34.1 24-Oct-2010  jym Sync with HEAD
 1.7.20.1 19-Aug-2009  yamt sync with head.
 1.8 09-Jun-2015  matt #include <sys/cpu.h> and/or <mips/cpuregs.h> as needed.
 1.7 10-Jul-2011  matt branches: 1.7.12; 1.7.30;
CLeanup machine includes
 1.6 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.5 04-Apr-2011  dyoung Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.4 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
 1.3 16-Feb-2006  gdamore branches: 1.3.2; 1.3.10; 1.3.16; 1.3.22; 1.3.98; 1.3.102; 1.3.108; 1.3.110;
Add board reset logic.
 1.2 12-Feb-2006  gdamore Consistency wrt phys physical and KSEG1 addresses.
 1.1 08-Feb-2006  gdamore Improved alchemy board support, including board differentiation required for
PCI idsel and irq routing (later).
Various cleanup/rototilling to remove hardcoded pb1000 references.
Reviewed by simonb@, and derived from changes reviewed by matt@ and tsutsui@
 1.3.110.1 05-Mar-2011  bouyer Sync with HEAD
 1.3.108.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.102.2 21-Apr-2011  rmind sync with head
 1.3.102.1 05-Mar-2011  rmind sync with head
 1.3.98.1 20-Jan-2010  matt Adjust things to the new world order.
 1.3.22.2 09-Sep-2006  rpaulo sync with head
 1.3.22.1 16-Feb-2006  rpaulo file dbau1500.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
 1.3.16.2 21-Jun-2006  yamt sync with head.
 1.3.16.1 16-Feb-2006  yamt file dbau1500.c was added on branch yamt-lazymbuf on 2006-06-21 14:50:55 +0000
 1.3.10.2 22-Apr-2006  simonb Sync with head.
 1.3.10.1 16-Feb-2006  simonb file dbau1500.c was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.3.2.2 18-Feb-2006  yamt sync with head.
 1.3.2.1 16-Feb-2006  yamt file dbau1500.c was added on branch yamt-uio_vmspace on 2006-02-18 15:38:32 +0000
 1.7.30.1 22-Sep-2015  skrll Sync with HEAD
 1.7.12.1 03-Dec-2017  jdolecek update from HEAD
 1.5 25-Apr-2006  simonb branches: 1.5.6; 1.5.12;
Fix some comment tyops.
 1.4 16-Feb-2006  gdamore branches: 1.4.2; 1.4.4; 1.4.6; 1.4.8; 1.4.10;
Add board reset logic.
 1.3 12-Feb-2006  gdamore Consistency wrt phys physical and KSEG1 addresses.
 1.2 08-Feb-2006  gdamore Add Itronix copyright (3-clause BSD) that I forgot to include in original
versions.
 1.1 08-Feb-2006  gdamore Improved alchemy board support, including board differentiation required for
PCI idsel and irq routing (later).
Various cleanup/rototilling to remove hardcoded pb1000 references.
Reviewed by simonb@, and derived from changes reviewed by matt@ and tsutsui@
 1.4.10.3 01-Jun-2006  kardel Sync with head.
 1.4.10.2 22-Apr-2006  simonb Sync with head.
 1.4.10.1 16-Feb-2006  simonb file dbau1500reg.h was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.4.8.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.4.6.1 11-May-2006  elad sync with head
 1.4.4.1 24-May-2006  yamt sync with head.
 1.4.2.2 18-Feb-2006  yamt sync with head.
 1.4.2.1 16-Feb-2006  yamt file dbau1500reg.h was added on branch yamt-uio_vmspace on 2006-02-18 15:38:32 +0000
 1.5.12.2 09-Sep-2006  rpaulo sync with head
 1.5.12.1 25-Apr-2006  rpaulo file dbau1500reg.h was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
 1.5.6.2 21-Jun-2006  yamt sync with head.
 1.5.6.1 25-Apr-2006  yamt file dbau1500reg.h was added on branch yamt-lazymbuf on 2006-06-21 14:50:55 +0000
 1.13 12-Mar-2014  mrg remove some dead code, avoid set but unused variables.
 1.12 10-Jul-2011  matt branches: 1.12.2; 1.12.12; 1.12.16;
CLeanup machine includes
 1.11 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.10 04-Apr-2011  dyoung Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.9 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
 1.8 24-Jan-2007  hubertf branches: 1.8.66; 1.8.70; 1.8.76; 1.8.78;
Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
 1.7 02-Oct-2006  gdamore Add the final glue bits required to enable the SPI interface on the
DBAU1550. This is parameterized somewhat as machdep pluggable code, so
different boards can supply different implementations.

At the moment, the DBAU1550 is the only Au1550 board I know of with SPI
connected devices.

I have not enabled I2C on the DBAU1550, as we do not have drivers for either
of the I2C connected devices (a different temperature/voltage sensor and
a serial eeprom.)
 1.6 25-Mar-2006  gdamore branches: 1.6.2; 1.6.6; 1.6.8; 1.6.12; 1.6.14; 1.6.16;
Enable PCMCIA on DBAU1550.
Some devices work (an, wdc), while others do not (ne, wi).
However, the bus is useful enough that it makes sense to go ahead and
enable it. Maybe other folks can help me debug the rest of the problems.
 1.5 23-Feb-2006  gdamore branches: 1.5.2; 1.5.4; 1.5.6;
Add PCMCIA board-specific logic for DBAU1550. It isn't quite right yet, so
I'm not enabling it in the configuration file yet. (I have an uncommitted
version of the config file that I will happily share with anyone who wants to
help test or debug.)
 1.4 16-Feb-2006  gdamore branches: 1.4.2;
CPLD registers are 16-bits wide, not 32.
 1.3 13-Feb-2006  gdamore Added board support for hard-reset (reboot) and power off.
 1.2 12-Feb-2006  gdamore Consistency wrt phys physical and KSEG1 addresses.
 1.1 08-Feb-2006  gdamore Improved alchemy board support, including board differentiation required for
PCI idsel and irq routing (later).
Various cleanup/rototilling to remove hardcoded pb1000 references.
Reviewed by simonb@, and derived from changes reviewed by matt@ and tsutsui@
 1.4.2.3 01-Mar-2006  yamt sync with head.
 1.4.2.2 18-Feb-2006  yamt sync with head.
 1.4.2.1 16-Feb-2006  yamt file dbau1550.c was added on branch yamt-uio_vmspace on 2006-02-18 15:38:32 +0000
 1.5.6.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.5.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.5.2.1 01-Apr-2006  yamt sync with head.
 1.6.16.1 22-Oct-2006  yamt sync with head
 1.6.14.2 09-Sep-2006  rpaulo sync with head
 1.6.14.1 25-Mar-2006  rpaulo file dbau1550.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
 1.6.12.2 01-Feb-2007  ad Sync with head.
 1.6.12.1 18-Nov-2006  ad Sync with head.
 1.6.8.4 26-Feb-2007  yamt sync with head.
 1.6.8.3 30-Dec-2006  yamt sync with head.
 1.6.8.2 21-Jun-2006  yamt sync with head.
 1.6.8.1 25-Mar-2006  yamt file dbau1550.c was added on branch yamt-lazymbuf on 2006-06-21 14:50:55 +0000
 1.6.6.1 13-Jul-2006  gdamore Merge from HEAD.
 1.6.2.2 22-Apr-2006  simonb Sync with head.
 1.6.2.1 25-Mar-2006  simonb file dbau1550.c was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.8.78.1 05-Mar-2011  bouyer Sync with HEAD
 1.8.76.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.70.2 21-Apr-2011  rmind sync with head
 1.8.70.1 05-Mar-2011  rmind sync with head
 1.8.66.1 20-Jan-2010  matt Adjust things to the new world order.
 1.12.16.1 18-May-2014  rmind sync with head
 1.12.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.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.5 02-Oct-2006  gdamore Add the final glue bits required to enable the SPI interface on the
DBAU1550. This is parameterized somewhat as machdep pluggable code, so
different boards can supply different implementations.

At the moment, the DBAU1550 is the only Au1550 board I know of with SPI
connected devices.

I have not enabled I2C on the DBAU1550, as we do not have drivers for either
of the I2C connected devices (a different temperature/voltage sensor and
a serial eeprom.)
 1.4 23-Feb-2006  gdamore branches: 1.4.8; 1.4.14; 1.4.18; 1.4.20; 1.4.22;
Add PCMCIA board-specific logic for DBAU1550. It isn't quite right yet, so
I'm not enabling it in the configuration file yet. (I have an uncommitted
version of the config file that I will happily share with anyone who wants to
help test or debug.)
 1.3 12-Feb-2006  gdamore branches: 1.3.2;
Consistency wrt phys physical and KSEG1 addresses.
 1.2 08-Feb-2006  gdamore Add Itronix copyright (3-clause BSD) that I forgot to include in original
versions.
 1.1 08-Feb-2006  gdamore Improved alchemy board support, including board differentiation required for
PCI idsel and irq routing (later).
Various cleanup/rototilling to remove hardcoded pb1000 references.
Reviewed by simonb@, and derived from changes reviewed by matt@ and tsutsui@
 1.3.2.3 01-Mar-2006  yamt sync with head.
 1.3.2.2 18-Feb-2006  yamt sync with head.
 1.3.2.1 12-Feb-2006  yamt file dbau1550reg.h was added on branch yamt-uio_vmspace on 2006-02-18 15:38:32 +0000
 1.4.22.1 22-Oct-2006  yamt sync with head
 1.4.20.2 09-Sep-2006  rpaulo sync with head
 1.4.20.1 23-Feb-2006  rpaulo file dbau1550reg.h was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
 1.4.18.1 18-Nov-2006  ad Sync with head.
 1.4.14.3 30-Dec-2006  yamt sync with head.
 1.4.14.2 21-Jun-2006  yamt sync with head.
 1.4.14.1 23-Feb-2006  yamt file dbau1550reg.h was added on branch yamt-lazymbuf on 2006-06-21 14:50:55 +0000
 1.4.8.2 22-Apr-2006  simonb Sync with head.
 1.4.8.1 23-Feb-2006  simonb file dbau1550reg.h was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.2 09-Sep-2002  simonb Share disksubr.c across all evbmips "ports" (it was identical).
 1.1 29-Jul-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6;
Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 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 29-Jul-2002  jdolecek file disksubr.c was added on branch kqueue on 2002-09-06 08:34:15 +0000
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 29-Jul-2002  gehenna file disksubr.c was added on branch gehenna-devsw on 2002-08-30 00:29:28 +0000
 1.1.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.1.2.1 29-Jul-2002  nathanw file disksubr.c was added on branch nathanw_sa on 2002-09-17 21:14:18 +0000
 1.6 09-Jun-2015  matt #include <sys/cpu.h> and/or <mips/cpuregs.h> as needed.
 1.5 24-Mar-2014  christos branches: 1.5.6;
use cpu_{g,s}etmodel
 1.4 10-Jul-2011  matt branches: 1.4.2; 1.4.12; 1.4.16;
CLeanup machine includes
 1.3 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.2 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
 1.1 08-Feb-2006  gdamore branches: 1.1.2; 1.1.10; 1.1.16; 1.1.22; 1.1.98; 1.1.102; 1.1.108; 1.1.110;
Improved alchemy board support, including board differentiation required for
PCI idsel and irq routing (later).
Various cleanup/rototilling to remove hardcoded pb1000 references.
Reviewed by simonb@, and derived from changes reviewed by matt@ and tsutsui@
 1.1.110.1 05-Mar-2011  bouyer Sync with HEAD
 1.1.108.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.102.1 05-Mar-2011  rmind sync with head
 1.1.98.1 20-Jan-2010  matt Adjust things to the new world order.
 1.1.22.2 09-Sep-2006  rpaulo sync with head
 1.1.22.1 08-Feb-2006  rpaulo file genericbd.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
 1.1.16.2 21-Jun-2006  yamt sync with head.
 1.1.16.1 08-Feb-2006  yamt file genericbd.c was added on branch yamt-lazymbuf on 2006-06-21 14:50:55 +0000
 1.1.10.2 22-Apr-2006  simonb Sync with head.
 1.1.10.1 08-Feb-2006  simonb file genericbd.c was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.1.2.2 18-Feb-2006  yamt sync with head.
 1.1.2.1 08-Feb-2006  yamt file genericbd.c was added on branch yamt-uio_vmspace on 2006-02-18 15:38:32 +0000
 1.4.16.1 18-May-2014  rmind sync with head
 1.4.12.2 03-Dec-2017  jdolecek update from HEAD
 1.4.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.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.5.6.1 22-Sep-2015  skrll Sync with HEAD
 1.8 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.7 26-Aug-2016  skrll Adjust evbmips_iointr to pass a clockframe pointer and use it for
pwmclock @ voyager.

Suggested by matt@

Hi macallan!
 1.6 10-Jul-2011  matt branches: 1.6.12; 1.6.30;
CLeanup machine includes
 1.5 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.4 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
 1.3 28-Apr-2008  martin branches: 1.3.18; 1.3.22; 1.3.28; 1.3.30;
Remove clause 3 and 4 from TNF licenses
 1.2 09-Feb-2006  gdamore branches: 1.2.2; 1.2.10; 1.2.16; 1.2.22; 1.2.76; 1.2.78; 1.2.80;
au_icu.c is in mips/ and should not depend on evbmips intr handler struct.
convert various u_int32_t to preferred uint32_t.
 1.1 07-Feb-2006  gdamore renamed pb1000_intr to reflect that it isn't board-specific. Prune unused
pb1000_intr_establish/disestablish calls.

Change was reviewed by folks as part of PCI changes, and should be
non-controversial in any case.
 1.2.80.1 16-May-2008  yamt sync with head.
 1.2.78.1 18-May-2008  yamt sync with head.
 1.2.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.22.2 09-Sep-2006  rpaulo sync with head
 1.2.22.1 09-Feb-2006  rpaulo file mach_intr.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
 1.2.16.2 21-Jun-2006  yamt sync with head.
 1.2.16.1 09-Feb-2006  yamt file mach_intr.c was added on branch yamt-lazymbuf on 2006-06-21 14:50:55 +0000
 1.2.10.2 22-Apr-2006  simonb Sync with head.
 1.2.10.1 09-Feb-2006  simonb file mach_intr.c was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.2.2.2 18-Feb-2006  yamt sync with head.
 1.2.2.1 09-Feb-2006  yamt file mach_intr.c was added on branch yamt-uio_vmspace on 2006-02-18 15:38:32 +0000
 1.3.30.1 05-Mar-2011  bouyer Sync with HEAD
 1.3.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.22.1 05-Mar-2011  rmind sync with head
 1.3.18.1 15-Feb-2010  matt Adapt to the new interrupt framework for NetBSD/mips.
 1.6.30.1 05-Oct-2016  skrll Sync with HEAD
 1.6.12.1 03-Dec-2017  jdolecek update from HEAD
 1.58 05-Mar-2024  thorpej Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

It's a small step, but it's a step.
 1.57 22-Jul-2020  msaitoh s/reseting/resetting/
 1.56 22-Dec-2016  cherry switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.55 26-Jun-2015  matt branches: 1.55.2;
Just cpu_startup_common()
 1.54 25-Mar-2014  martin branches: 1.54.6;
Typo
 1.53 24-Mar-2014  christos use cpu_{g,s}etmodel
 1.52 02-Mar-2012  matt branches: 1.52.2; 1.52.4;
Remove reduntant/conflicting common declarations.
 1.51 10-Jul-2011  matt branches: 1.51.2; 1.51.6;
CLeanup machine includes
 1.50 04-Apr-2011  dyoung Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.49 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
 1.48 08-Feb-2011  rmind Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.47 08-Feb-2010  joerg branches: 1.47.2; 1.47.4; 1.47.6;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.46 16-Dec-2009  matt branches: 1.46.2;
Fix printf format problems and latent bugs made visible by new bus_*_t types.
 1.45 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.44 27-Nov-2009  rmind - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.
 1.43 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.42 11-Aug-2009  matt Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)
 1.41 13-Feb-2009  apb Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
 1.40 30-Nov-2008  martin branches: 1.40.4;
As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
 1.39 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.38 11-Nov-2008  dyoung It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled. So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks(). Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown(). No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown(). I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that. Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.
 1.37 02-Jul-2008  ad branches: 1.37.2; 1.37.4; 1.37.10;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.36 17-Oct-2007  garbled branches: 1.36.16; 1.36.20; 1.36.22; 1.36.24;
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.35 17-May-2007  yamt branches: 1.35.10;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.34 06-Mar-2007  simonb branches: 1.34.2; 1.34.4; 1.34.10;
Fix some caddr_t rototill fallout.
 1.33 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.32 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.31 02-Oct-2006  gdamore branches: 1.31.4;
Add the final glue bits required to enable the SPI interface on the
DBAU1550. This is parameterized somewhat as machdep pluggable code, so
different boards can supply different implementations.

At the moment, the DBAU1550 is the only Au1550 board I know of with SPI
connected devices.

I have not enabled I2C on the DBAU1550, as we do not have drivers for either
of the I2C connected devices (a different temperature/voltage sensor and
a serial eeprom.)
 1.30 09-Sep-2006  simonb branches: 1.30.2;
Move the "reseting board..." printf to before the first code that can
reset a board.
 1.29 13-Jul-2006  gdamore branches: 1.29.4;
Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@. Fixes PR port-evbmips/32362.
 1.28 09-Apr-2006  tsutsui branches: 1.28.4;
Remove declarations for cpu_model[] since it's in <sys/systm.h>.
 1.27 23-Feb-2006  gdamore branches: 1.27.2; 1.27.4; 1.27.6;
Add PCMCIA board-specific logic for DBAU1550. It isn't quite right yet, so
I'm not enabling it in the configuration file yet. (I have an uncommitted
version of the config file that I will happily share with anyone who wants to
help test or debug.)
 1.26 13-Feb-2006  gdamore Added board support for hard-reset (reboot) and power off.
 1.25 09-Feb-2006  gdamore Add Au1550 PCI support (Au1500 not yet, coming shortly).
Closes PR port-evbmips/32087.
Reviewed by simonb@ (Also, earlier, matt@, and tsutsui@.)
 1.24 08-Feb-2006  gdamore Improved alchemy board support, including board differentiation required for
PCI idsel and irq routing (later).
Various cleanup/rototilling to remove hardcoded pb1000 references.
Reviewed by simonb@, and derived from changes reviewed by matt@ and tsutsui@
 1.23 27-Jan-2006  gdamore branches: 1.23.2; 1.23.4;
Fix improper USB clocking (makes USB work on DBAu1550).
Closes PR port-evbmips/32355.
 1.22 01-Jan-2006  he Add an obviously missing double-quote.
 1.21 24-Dec-2005  perry branches: 1.21.2;
bare asm -> __asm
 1.20 21-Dec-2005  christos PR/32086: Garrett D'Amore: Use the YAMON environment for console speed
selection, rather than a hard-coded speed.
 1.19 11-Dec-2005  christos merge ktrace-lwp.
 1.18 25-Apr-2005  lukem branches: 1.18.2;
Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.
 1.17 16-Mar-2004  nathanw branches: 1.17.8;
Do set up the auxpll to the right value (8, to generate 96MHz),
because the Au1500 and/or this board's firmware don't have it to the
right value at bootup, as was previously assumed. Makes USB-host work
on the Au1500, and should cause no change on other boards where it
previously "just worked".

Remove some #if 0'd out setting of FREQ0, since it's not currently
used.
 1.16 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.15 30-Dec-2003  pk Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes). It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms. Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.
 1.14 08-Nov-2003  simonb Add a "COM_AU1x00" option, similar to COM_PXA2X0, for enabling Au1x00
features in the "com" driver.
 1.13 27-Oct-2003  simonb Set the CPU frequency parameters from YAMON if available, and fall back
to the timer/RTC based calibration loops otherwise.
 1.12 26-Sep-2003  simonb Cast through (void *) to appease gcc3.
XXX1 - why does this "type-punned pointer" warning only affect little-
endian MIPS and not big-endian MIPS?!
XXX2 - too much duplicated code.
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.10 04-Jul-2003  thorpej Nuke the "alchemy_info" stuff, and just use the dev_propdb to set
the mac-addr property for the Au1x00 on-chip MACs.
 1.9 27-Jun-2003  he branches: 1.9.2;
Conditionalize usage of the COM_HW_HAYESP constant on COM_HAYESP.
Add a dummy type argument to the local (au)comcnattach to match the change
in the prototype of the "real" comcnattach.

Reviewed and tested by simonb.
 1.8 26-Apr-2003  ragge Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.7 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.6 01-Apr-2003  hpeyerl route a clock to the USB Host peripheral. includes code to configure
auxpll but this seems to come up at the right speed out of reset so it's
#if 0'd out.
 1.5 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.4 25-Nov-2002  scw Fix a typo to make this compile with MEMSIZE is defined.
 1.3 25-Aug-2002  thorpej branches: 1.3.2; 1.3.4;
Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.
 1.2 05-Aug-2002  simonb branches: 1.2.2;
Convert to use merged mips cpu_sysctl().
 1.1 29-Jul-2002  simonb Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 1.2.2.4 11-Dec-2002  thorpej Sync with HEAD.
 1.2.2.3 27-Aug-2002  nathanw Catch up to -current.
 1.2.2.2 13-Aug-2002  simonb LWP'ify the evbmips port.
 1.2.2.1 05-Aug-2002  simonb file machdep.c was added on branch nathanw_sa on 2002-08-13 04:21:56 +0000
 1.3.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.4.1 25-Aug-2002  jdolecek file machdep.c was added on branch kqueue on 2002-09-06 08:34:16 +0000
 1.3.2.2 30-Aug-2002  gehenna catch up with -current.
 1.3.2.1 25-Aug-2002  gehenna file machdep.c was added on branch gehenna-devsw on 2002-08-30 00:29:28 +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.17.8.1 29-Apr-2005  kent sync with -current
 1.18.2.4 03-Sep-2007  yamt sync with head.
 1.18.2.3 26-Feb-2007  yamt sync with head.
 1.18.2.2 30-Dec-2006  yamt sync with head.
 1.18.2.1 21-Jun-2006  yamt sync with head.
 1.21.2.4 01-Mar-2006  yamt sync with head.
 1.21.2.3 18-Feb-2006  yamt sync with head.
 1.21.2.2 01-Feb-2006  yamt sync with head.
 1.21.2.1 15-Jan-2006  yamt sync with head.
 1.23.4.1 22-Apr-2006  simonb Sync with head.
 1.23.2.1 09-Sep-2006  rpaulo sync with head
 1.27.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.27.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.27.2.3 14-Sep-2006  yamt sync with head.
 1.27.2.2 11-Aug-2006  yamt sync with head
 1.27.2.1 11-Apr-2006  yamt sync with head
 1.28.4.1 15-Jun-2006  gdamore Use com_aubus.c attachment for console instead of (removed) aucom.
 1.29.4.1 18-Nov-2006  ad Sync with head.
 1.30.2.1 22-Oct-2006  yamt sync with head
 1.31.4.3 18-Apr-2007  ad - Further adaptations to MIPS for the yamt-idlelwp branch.
- Make curlwp a register variable on MIPS.
 1.31.4.2 12-Mar-2007  rmind Sync with HEAD.
 1.31.4.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.34.10.1 22-May-2007  matt Update to HEAD.
 1.34.4.1 11-Jul-2007  mjf Sync with head.
 1.34.2.1 27-May-2007  ad Sync with head.
 1.35.10.1 06-Nov-2007  matt sync with HEAD
 1.36.24.1 03-Jul-2008  simonb Sync with head.
 1.36.22.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.36.20.3 11-Mar-2010  yamt sync with head
 1.36.20.2 19-Aug-2009  yamt sync with head.
 1.36.20.1 04-May-2009  yamt sync with head.
 1.36.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.36.16.1 02-Jul-2008  mjf Sync with HEAD.
 1.37.10.7 14-Feb-2012  matt mem_cluster_cnt on mips is now a u_int.
 1.37.10.6 13-May-2011  matt Update for new mips_vector_init and savectx definitions.
 1.37.10.5 21-Mar-2010  cliff mips_vector_init now takes an argument to specify splsw.
NULL specifies use the default 'std_splsw'
 1.37.10.4 01-Feb-2010  matt fix fallout from frame/trapframe merger.
 1.37.10.3 10-Jan-2010  matt Add generic support for DMA bounce buffers and real version of
bus_dmatag_subregion. MALTA uses it for ISADMA. Make RMIXL use
for creating 32bit and 29bit subregions.
 1.37.10.2 31-Dec-2009  matt Use mips_page_physload and mips_init_lwp0_uarea.
 1.37.10.1 07-Sep-2009  matt Update to deal with pcb_context being a label_t (this should be a common
routine).
 1.37.4.2 03-Mar-2009  skrll Sync with HEAD.
 1.37.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.37.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.40.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.46.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.47.6.2 05-Mar-2011  bouyer Sync with HEAD
 1.47.6.1 17-Feb-2011  bouyer Sync with HEAD
 1.47.4.1 06-Jun-2011  jruoho Sync with HEAD.
 1.47.2.2 21-Apr-2011  rmind sync with head
 1.47.2.1 05-Mar-2011  rmind sync with head
 1.51.6.3 06-Mar-2012  mrg sync to -current
 1.51.6.2 06-Mar-2012  mrg sync to -current
 1.51.6.1 04-Mar-2012  mrg sync to latest -current.
 1.51.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.51.2.1 17-Apr-2012  yamt sync with head
 1.52.4.1 18-May-2014  rmind sync with head
 1.52.2.2 03-Dec-2017  jdolecek update from HEAD
 1.52.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.54.6.2 05-Feb-2017  skrll Sync with HEAD
 1.54.6.1 22-Sep-2015  skrll Sync with HEAD
 1.55.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.12 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.11 24-Apr-2021  thorpej branches: 1.11.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.10 20-Feb-2011  matt branches: 1.10.70;
Merge forward from matt-nb5-mips64.
 1.9 14-Mar-2009  dsl branches: 1.9.4; 1.9.6; 1.9.8;
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.8 11-Dec-2005  christos branches: 1.8.78; 1.8.86; 1.8.92; 1.8.96;
merge ktrace-lwp.
 1.7 28-Jun-2005  drochner convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose
(untested, sorry)
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 27-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 28-Aug-2002  simonb branches: 1.2.2; 1.2.4;
Remove some commented-out include files.
 1.1 29-Jul-2002  simonb branches: 1.1.2;
Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.1.2.1 29-Jul-2002  nathanw file mainbus.c was added on branch nathanw_sa on 2002-09-17 21:14:18 +0000
 1.2.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.1 28-Aug-2002  jdolecek file mainbus.c was added on branch kqueue on 2002-09-06 08:34:16 +0000
 1.2.2.2 30-Aug-2002  gehenna catch up with -current.
 1.2.2.1 28-Aug-2002  gehenna file mainbus.c was added on branch gehenna-devsw on 2002-08-30 00:29:28 +0000
 1.5.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.96.1 14-Jan-2010  matt device_t, CFATTACH_DECL_NEW, ansify, ...
 1.8.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.8.78.1 04-May-2009  yamt sync with head.
 1.9.8.1 05-Mar-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.10.70.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.11.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.9 17-Aug-2020  simonb Add some compile time asserts for endianness on boards/systems that
only support a single endianness.
 1.8 09-Jun-2015  matt #include <sys/cpu.h> and/or <mips/cpuregs.h> as needed.
 1.7 10-Jul-2011  matt branches: 1.7.12; 1.7.30;
CLeanup machine includes
 1.6 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.5 04-Apr-2011  dyoung Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.4 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
 1.3 23-Feb-2006  gdamore branches: 1.3.2; 1.3.10; 1.3.16; 1.3.22; 1.3.98; 1.3.102; 1.3.108; 1.3.110;
Third time the charm? Okay, this time it at least compiles.
 1.2 23-Feb-2006  gdamore Doh! Correct typo/pasto error.
 1.1 23-Feb-2006  gdamore Initial configuration for MTX-1, aka Meshcube.
 1.3.110.1 05-Mar-2011  bouyer Sync with HEAD
 1.3.108.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.102.2 21-Apr-2011  rmind sync with head
 1.3.102.1 05-Mar-2011  rmind sync with head
 1.3.98.1 20-Jan-2010  matt Adjust things to the new world order.
 1.3.22.2 09-Sep-2006  rpaulo sync with head
 1.3.22.1 23-Feb-2006  rpaulo file mtx-1.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
 1.3.16.2 21-Jun-2006  yamt sync with head.
 1.3.16.1 23-Feb-2006  yamt file mtx-1.c was added on branch yamt-lazymbuf on 2006-06-21 14:50:55 +0000
 1.3.10.2 22-Apr-2006  simonb Sync with head.
 1.3.10.1 23-Feb-2006  simonb file mtx-1.c was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.3.2.2 01-Mar-2006  yamt sync with head.
 1.3.2.1 23-Feb-2006  yamt file mtx-1.c was added on branch yamt-uio_vmspace on 2006-03-01 09:27:46 +0000
 1.7.30.1 22-Sep-2015  skrll Sync with HEAD
 1.7.12.1 03-Dec-2017  jdolecek update from HEAD
 1.6 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.5 24-Apr-2021  thorpej branches: 1.5.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.4 01-Jul-2011  dyoung branches: 1.4.68;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
 1.2 16-Dec-2009  matt branches: 1.2.4; 1.2.6; 1.2.8;
Fix printf format problems and latent bugs made visible by new bus_*_t types.
 1.1 08-Feb-2006  gdamore branches: 1.1.2; 1.1.10; 1.1.16; 1.1.22; 1.1.80; 1.1.98;
Improved alchemy board support, including board differentiation required for
PCI idsel and irq routing (later).
Various cleanup/rototilling to remove hardcoded pb1000 references.
Reviewed by simonb@, and derived from changes reviewed by matt@ and tsutsui@
 1.1.98.2 14-Jan-2010  matt More fixes for the CFATTAL_DECL_NEW changes and rmixl cpucore/cpu changes.
 1.1.98.1 10-Jan-2010  matt Add generic support for DMA bounce buffers and real version of
bus_dmatag_subregion. MALTA uses it for ISADMA. Make RMIXL use
for creating 32bit and 29bit subregions.
 1.1.80.1 11-Mar-2010  yamt sync with head
 1.1.22.2 09-Sep-2006  rpaulo sync with head
 1.1.22.1 08-Feb-2006  rpaulo file obio.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
 1.1.16.2 21-Jun-2006  yamt sync with head.
 1.1.16.1 08-Feb-2006  yamt file obio.c was added on branch yamt-lazymbuf on 2006-06-21 14:50:55 +0000
 1.1.10.2 22-Apr-2006  simonb Sync with head.
 1.1.10.1 08-Feb-2006  simonb file obio.c was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.1.2.2 18-Feb-2006  yamt sync with head.
 1.1.2.1 08-Feb-2006  yamt file obio.c was added on branch yamt-uio_vmspace on 2006-02-18 15:38:32 +0000
 1.2.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.2.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.4.1 05-Mar-2011  rmind sync with head
 1.4.68.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.4.68.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.5.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 08-Feb-2006  gdamore branches: 1.1.2; 1.1.10; 1.1.16; 1.1.22;
Improved alchemy board support, including board differentiation required for
PCI idsel and irq routing (later).
Various cleanup/rototilling to remove hardcoded pb1000 references.
Reviewed by simonb@, and derived from changes reviewed by matt@ and tsutsui@
 1.1.22.2 09-Sep-2006  rpaulo sync with head
 1.1.22.1 08-Feb-2006  rpaulo file obiovar.h was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
 1.1.16.2 21-Jun-2006  yamt sync with head.
 1.1.16.1 08-Feb-2006  yamt file obiovar.h was added on branch yamt-lazymbuf on 2006-06-21 14:50:55 +0000
 1.1.10.2 22-Apr-2006  simonb Sync with head.
 1.1.10.1 08-Feb-2006  simonb file obiovar.h was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.1.2.2 18-Feb-2006  yamt sync with head.
 1.1.2.1 08-Feb-2006  yamt file obiovar.h was added on branch yamt-uio_vmspace on 2006-02-18 15:38:32 +0000
 1.12 24-May-2024  andvar s/borad/board/ in comments.
 1.11 17-Aug-2020  simonb Add some compile time asserts for endianness on boards/systems that
only support a single endianness.
 1.10 09-Jun-2015  matt #include <sys/cpu.h> and/or <mips/cpuregs.h> as needed.
 1.9 10-Jul-2011  matt branches: 1.9.12; 1.9.30;
CLeanup machine includes
 1.8 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.7 04-Apr-2011  dyoung Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.6 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
 1.5 23-Feb-2007  kiyohara branches: 1.5.64; 1.5.68; 1.5.74; 1.5.76;
s/Sever/Server/
 1.4 02-Apr-2006  kiyohara branches: 1.4.2; 1.4.8; 1.4.14; 1.4.20;
Support aupcmcia on OMSAL400.
 1.3 01-Mar-2006  shige branches: 1.3.2; 1.3.4; 1.3.6;
Fix invalid array initialization.
 1.2 23-Feb-2006  shige branches: 1.2.2;
Modify copyright declaration.
 1.1 23-Feb-2006  shige Support Plathome OpenMicroServer (OMS-AL400).
http://www.plathome.co.jp/products/oms400/index.html (sorry japanese only).
 1.2.2.2 01-Mar-2006  yamt sync with head.
 1.2.2.1 23-Feb-2006  yamt file omsal400.c was added on branch yamt-uio_vmspace on 2006-03-01 09:27:46 +0000
 1.3.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.3.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.3.2.1 11-Apr-2006  yamt sync with head
 1.4.20.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.14.2 09-Sep-2006  rpaulo sync with head
 1.4.14.1 02-Apr-2006  rpaulo file omsal400.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
 1.4.8.3 26-Feb-2007  yamt sync with head.
 1.4.8.2 21-Jun-2006  yamt sync with head.
 1.4.8.1 02-Apr-2006  yamt file omsal400.c was added on branch yamt-lazymbuf on 2006-06-21 14:50:55 +0000
 1.4.2.2 22-Apr-2006  simonb Sync with head.
 1.4.2.1 02-Apr-2006  simonb file omsal400.c was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.5.76.1 05-Mar-2011  bouyer Sync with HEAD
 1.5.74.1 06-Jun-2011  jruoho Sync with HEAD.
 1.5.68.2 21-Apr-2011  rmind sync with head
 1.5.68.1 05-Mar-2011  rmind sync with head
 1.5.64.1 20-Jan-2010  matt Adjust things to the new world order.
 1.9.30.1 22-Sep-2015  skrll Sync with HEAD
 1.9.12.1 03-Dec-2017  jdolecek update from HEAD
 1.1 23-Feb-2006  shige branches: 1.1.2; 1.1.10; 1.1.16; 1.1.22;
Support Plathome OpenMicroServer (OMS-AL400).
http://www.plathome.co.jp/products/oms400/index.html (sorry japanese only).
 1.1.22.2 09-Sep-2006  rpaulo sync with head
 1.1.22.1 23-Feb-2006  rpaulo file omsal400reg.h was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
 1.1.16.2 21-Jun-2006  yamt sync with head.
 1.1.16.1 23-Feb-2006  yamt file omsal400reg.h was added on branch yamt-lazymbuf on 2006-06-21 14:50:55 +0000
 1.1.10.2 22-Apr-2006  simonb Sync with head.
 1.1.10.1 23-Feb-2006  simonb file omsal400reg.h was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.1.2.2 01-Mar-2006  yamt sync with head.
 1.1.2.1 23-Feb-2006  yamt file omsal400reg.h was added on branch yamt-uio_vmspace on 2006-03-01 09:27:46 +0000
 1.4 07-Feb-2006  gdamore renamed pb1000_intr to reflect that it isn't board-specific. Prune unused
pb1000_intr_establish/disestablish calls.

Change was reviewed by folks as part of PCI changes, and should be
non-controversial in any case.
 1.3 11-Dec-2005  christos branches: 1.3.2; 1.3.4; 1.3.6;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 29-Jul-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6; 1.1.12;
Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 1.1.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.12.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 29-Jul-2002  jdolecek file pb1000_intr.c was added on branch kqueue on 2002-09-06 08:34:16 +0000
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 29-Jul-2002  gehenna file pb1000_intr.c was added on branch gehenna-devsw on 2002-08-30 00:29:28 +0000
 1.1.2.2 29-Jul-2002  simonb Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 1.1.2.1 29-Jul-2002  simonb file pb1000_intr.c was added on branch nathanw_sa on 2002-07-29 16:22:59 +0000
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.3.6.1 22-Apr-2006  simonb Sync with head.
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.3.2.1 18-Feb-2006  yamt sync with head.
 1.10 08-Feb-2006  gdamore Improved alchemy board support, including board differentiation required for
PCI idsel and irq routing (later).
Various cleanup/rototilling to remove hardcoded pb1000 references.
Reviewed by simonb@, and derived from changes reviewed by matt@ and tsutsui@
 1.9 11-Dec-2005  christos branches: 1.9.2; 1.9.4; 1.9.6;
merge ktrace-lwp.
 1.8 26-Aug-2005  drochner s/locdesc_t/int/g
 1.7 28-Jun-2005  drochner branches: 1.7.2;
convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose
(untested, sorry)
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 01-Jan-2003  thorpej branches: 1.5.2;
Use aprint_normal() for cfprint routines.
 1.4 02-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 29-Jul-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6;
Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 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 29-Jul-2002  jdolecek file pb1000_obio.c was added on branch kqueue on 2002-09-06 08:34:17 +0000
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 29-Jul-2002  gehenna file pb1000_obio.c was added on branch gehenna-devsw on 2002-08-30 00:29:28 +0000
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.1 29-Jul-2002  nathanw file pb1000_obio.c was added on branch nathanw_sa on 2002-10-18 02:36:36 +0000
 1.5.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.2.1 21-Jun-2006  yamt sync with head.
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.9.2.1 18-Feb-2006  yamt sync with head.
 1.2 08-Feb-2006  gdamore Improved alchemy board support, including board differentiation required for
PCI idsel and irq routing (later).
Various cleanup/rototilling to remove hardcoded pb1000 references.
Reviewed by simonb@, and derived from changes reviewed by matt@ and tsutsui@
 1.1 29-Jul-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6; 1.1.28; 1.1.40; 1.1.42; 1.1.44;
Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 1.1.44.1 22-Apr-2006  simonb Sync with head.
 1.1.42.1 09-Sep-2006  rpaulo sync with head
 1.1.40.1 18-Feb-2006  yamt sync with head.
 1.1.28.1 21-Jun-2006  yamt sync with head.
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 29-Jul-2002  jdolecek file pb1000_obiovar.h was added on branch kqueue on 2002-09-06 08:34:17 +0000
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 29-Jul-2002  gehenna file pb1000_obiovar.h was added on branch gehenna-devsw on 2002-08-30 00:29:28 +0000
 1.1.2.2 29-Jul-2002  simonb Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 1.1.2.1 29-Jul-2002  simonb file pb1000_obiovar.h was added on branch nathanw_sa on 2002-07-29 16:22:59 +0000
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 17-Jun-2006  simonb branches: 1.2.58; 1.2.60; 1.2.62;
LCD and PCMCIA address info is chip-specific and not board-specific.
Remove them from here.
 1.1 29-Jul-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6; 1.1.28; 1.1.42; 1.1.46; 1.1.52; 1.1.54;
Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 1.1.54.1 13-Jul-2006  gdamore Merge from HEAD.
 1.1.52.1 19-Jun-2006  chap Sync with head.
 1.1.46.1 26-Jun-2006  yamt sync with head.
 1.1.42.1 09-Sep-2006  rpaulo sync with head
 1.1.28.1 21-Jun-2006  yamt sync with head.
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 29-Jul-2002  jdolecek file pb1000reg.h was added on branch kqueue on 2002-09-06 08:34:18 +0000
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 29-Jul-2002  gehenna file pb1000reg.h was added on branch gehenna-devsw on 2002-08-30 00:29:28 +0000
 1.1.2.2 29-Jul-2002  simonb Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 1.1.2.1 29-Jul-2002  simonb file pb1000reg.h was added on branch nathanw_sa on 2002-07-29 16:23:00 +0000
 1.2.62.1 16-May-2008  yamt sync with head.
 1.2.60.1 18-May-2008  yamt sync with head.
 1.2.58.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 08-Feb-2006  gdamore Improved alchemy board support, including board differentiation required for
PCI idsel and irq routing (later).
Various cleanup/rototilling to remove hardcoded pb1000 references.
Reviewed by simonb@, and derived from changes reviewed by matt@ and tsutsui@
 1.2 07-Feb-2006  gdamore renamed pb1000_intr to reflect that it isn't board-specific. Prune unused
pb1000_intr_establish/disestablish calls.

Change was reviewed by folks as part of PCI changes, and should be
non-controversial in any case.
 1.1 29-Jul-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6; 1.1.28; 1.1.40; 1.1.42; 1.1.44;
Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 1.1.44.1 22-Apr-2006  simonb Sync with head.
 1.1.42.1 09-Sep-2006  rpaulo sync with head
 1.1.40.1 18-Feb-2006  yamt sync with head.
 1.1.28.1 21-Jun-2006  yamt sync with head.
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 29-Jul-2002  jdolecek file pb1000var.h was added on branch kqueue on 2002-09-06 08:34:18 +0000
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 29-Jul-2002  gehenna file pb1000var.h was added on branch gehenna-devsw on 2002-08-30 00:29:29 +0000
 1.1.2.2 29-Jul-2002  simonb Add support for the Alchemy Semiconductor Pb1000 evaluation board for
their Au1000 CPU. Should also work with little or no tweaking for the
Pb1500 board for the Au1500 CPU as well.
 1.1.2.1 29-Jul-2002  simonb file pb1000var.h was added on branch nathanw_sa on 2002-07-29 16:23:00 +0000
 1.2 04-Apr-2011  dyoung Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.1 09-Feb-2006  gdamore branches: 1.1.2; 1.1.10; 1.1.16; 1.1.22; 1.1.102; 1.1.108;
Add Au1550 PCI support (Au1500 not yet, coming shortly).
Closes PR port-evbmips/32087.
Reviewed by simonb@ (Also, earlier, matt@, and tsutsui@.)
 1.1.108.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.102.1 21-Apr-2011  rmind sync with head
 1.1.22.2 09-Sep-2006  rpaulo sync with head
 1.1.22.1 09-Feb-2006  rpaulo file pciide_machdep.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
 1.1.16.2 21-Jun-2006  yamt sync with head.
 1.1.16.1 09-Feb-2006  yamt file pciide_machdep.c was added on branch yamt-lazymbuf on 2006-06-21 14:50:55 +0000
 1.1.10.2 22-Apr-2006  simonb Sync with head.
 1.1.10.1 09-Feb-2006  simonb file pciide_machdep.c was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.1.2.2 18-Feb-2006  yamt sync with head.
 1.1.2.1 09-Feb-2006  yamt file pciide_machdep.c was added on branch yamt-uio_vmspace on 2006-02-18 15:38:32 +0000

RSS XML Feed