Home | History | Annotate | only in /src/sys/arch/cobalt
History log of /src/sys/arch/cobalt
RevisionDateAuthorComments
 1.6 04-Apr-2011  dyoung Fix target 'tags'.
 1.5 25-Oct-2008  apb branches: 1.5.16; 1.5.22;
Use ${TOOL_SED} instead if plain sed in Makefiles.
 1.4 06-Jan-2003  lukem branches: 1.4.104; 1.4.108; 1.4.114;
Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile. Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
 1.3 28-Jun-2000  soren branches: 1.3.2; 1.3.10;
Fix tags directory list.
 1.2 01-Jun-2000  soren Add stand SUBDIR.
 1.1 19-Mar-2000  soren branches: 1.1.2;
NetBSD/cobalt. Work-in-progress.
 1.1.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.10.1 07-Jan-2003  thorpej Sync with HEAD.
 1.3.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.2.1 28-Jun-2000  bouyer file Makefile was added on branch thorpej_scsipi on 2000-11-20 20:06:59 +0000
 1.4.114.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.4.108.1 04-May-2009  yamt sync with head.
 1.4.104.1 17-Jan-2009  mjf Sync with HEAD.
 1.5.22.1 06-Jun-2011  jruoho Sync with HEAD.
 1.5.16.1 21-Apr-2011  rmind sync with head
 1.7 13-May-2008  tsutsui Remove complete items (multi function PCI interrupts, zs on Qube2700).
 1.6 02-Feb-2008  tsutsui branches: 1.6.6; 1.6.8; 1.6.10; 1.6.12;
Done sysinst.
 1.5 18-Nov-2007  tsutsui Remove complete items and a non cobalt specific one.
 1.4 18-Jul-2006  tsutsui branches: 1.4.14; 1.4.32; 1.4.34; 1.4.38; 1.4.40;
Add and update misc items.
 1.3 20-Jan-2003  soren branches: 1.3.18; 1.3.32; 1.3.36;
Attachment for the HD44780 display and keypad on the front of Cobalt machines.
 1.2 03-Apr-2000  soren branches: 1.2.6;
Update.
 1.1 30-Mar-2000  soren Add little to-do list.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 03-Apr-2000  bouyer file TODO was added on branch thorpej_scsipi on 2000-11-20 20:06:59 +0000
 1.3.36.1 11-Aug-2006  yamt sync with head
 1.3.32.1 09-Sep-2006  rpaulo sync with head
 1.3.18.3 04-Feb-2008  yamt sync with head.
 1.3.18.2 07-Dec-2007  yamt sync with head
 1.3.18.1 30-Dec-2006  yamt sync with head.
 1.4.40.2 18-Feb-2008  mjf Sync with HEAD.
 1.4.40.1 19-Nov-2007  mjf Sync with HEAD.
 1.4.38.1 18-Nov-2007  bouyer Sync with HEAD
 1.4.34.2 23-Mar-2008  matt sync with HEAD
 1.4.34.1 09-Jan-2008  matt sync with HEAD
 1.4.32.1 21-Nov-2007  joerg Sync with HEAD.
 1.4.14.1 03-Dec-2007  ad Sync with HEAD.
 1.6.12.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.6.10.1 16-May-2008  yamt sync with head.
 1.6.8.1 18-May-2008  yamt sync with head.
 1.6.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.31 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.30 29-Jul-2012  mlelstv branches: 1.30.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.29 09-Jul-2011  matt branches: 1.29.2; 1.29.8;
Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h
 1.28 22-Mar-2008  tsutsui Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.
 1.27 03-Dec-2007  ad branches: 1.27.14;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.26 27-Oct-2007  tsutsui branches: 1.26.2;
Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().
 1.25 27-Oct-2007  tsutsui In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit
 1.24 17-Nov-2006  tsutsui branches: 1.24.2; 1.24.8; 1.24.18; 1.24.26; 1.24.28; 1.24.32;
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.23 10-Sep-2006  tsutsui branches: 1.23.2;
Remove or comment out now unused code after MI mips3_clockintr migration.
 1.22 07-Sep-2006  gdamore branches: 1.22.2;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.
 1.21 18-Jul-2006  tsutsui - always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
(XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
by default.
 1.20 31-May-2006  tsutsui Cleanup ICU (i8259 compatible PIC) interrupt handling code:
- move ICU interrupt stuff from pci/pcib.h to cobalt/machdep.c
because ICU should be initialized before pcib is attached
- initialize ICU more properly
- check interrupt types and set ELCR (edge/level control registers)
accordingly in icu_intr_establish()
- check requested IRQ line and call only a necessary hander in icu_intr()
- use specific EOI to ack interrupts rather than AEOI
- use macro defined in <dev/ic/i8259reg.h>
 1.19 21-Apr-2006  tsutsui branches: 1.19.2;
Account interrupts by evcnt(9).
 1.18 21-Apr-2006  tsutsui - initialize cpuspeed and curcpu() according to cobalt model id
- switch to cpu cyclecounter based delay(9), taken from evbmips
 1.17 05-Apr-2006  tsutsui - ANSIfy
- KNF
- u_intXX_t -> uintXX_t
 1.16 25-Feb-2006  thorpej branches: 1.16.2; 1.16.4; 1.16.6;
Use device_is_a().
 1.15 21-Feb-2006  thorpej Use device_class() instead of accessing dv_class directly.
 1.14 11-Dec-2005  christos branches: 1.14.2; 1.14.4; 1.14.6;
merge ktrace-lwp.
 1.13 04-Jun-2005  tsutsui branches: 1.13.2;
Fix config_rootfound() arg.
 1.12 23-Oct-2004  thorpej Centralize the declaration of booted_device and booted_partition.
 1.11 12-Sep-2003  tsutsui Use common mips generic software interrupt routines.
 1.10 15-Jul-2003  lukem __KERNEL_RCSID()
 1.9 27-Sep-2002  thorpej branches: 1.9.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.8 17-Jun-2001  cyber branches: 1.8.2; 1.8.8;
Change the way boot strings are handled and the way the root device
is determined. This allows multiple internal disks in a raq2 to work.
 1.7 06-Jun-2000  soren branches: 1.7.2; 1.7.4; 1.7.6;
findroot() is static.
 1.6 02-Jun-2000  cgd booted_partition, not booted_parition...
 1.5 01-Jun-2000  matt Fix a missing cases of devpp -> booted_device, partp -> booted_parition
 1.4 01-Jun-2000  matt Don't pass booted_* to findroot/getdevice, access them via the globals.
Also, make findroot static. This eliminates unneeded clearing of them
and make their use consistent among the ports.
 1.3 01-Jun-2000  matt Make booted_device global (and booted_parition for consitency).
Eliminate it from header files and other extern definitions.
 1.2 31-Mar-2000  soren branches: 1.2.2;
Some cleanups.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.2.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.7.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.4.1 06-Jun-2000  bouyer file autoconf.c was added on branch thorpej_scsipi on 2000-11-20 20:06:59 +0000
 1.7.2.1 17-Jun-2001  cyber Pullup from -current
autoconf.c 1.7 -> 1.8
machdep.c 1.32 -> 1.33
reviewed by soren
 1.8.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.8.8.1 17-Jun-2001  nathanw file autoconf.c was added on branch nathanw_sa on 2002-10-18 02:36:15 +0000
 1.8.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.6.4 02-Nov-2004  skrll Sync with HEAD.
 1.9.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.6.1 03-Aug-2004  skrll Sync with HEAD
 1.13.2.5 24-Mar-2008  yamt sync with head.
 1.13.2.4 07-Dec-2007  yamt sync with head
 1.13.2.3 15-Nov-2007  yamt sync with head.
 1.13.2.2 30-Dec-2006  yamt sync with head.
 1.13.2.1 21-Jun-2006  yamt sync with head.
 1.14.6.2 01-Jun-2006  kardel Sync with head.
 1.14.6.1 22-Apr-2006  simonb Sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.14.2.1 01-Mar-2006  yamt sync with head.
 1.16.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.16.4.2 11-May-2006  elad sync with head
 1.16.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.16.2.5 14-Sep-2006  yamt sync with head.
 1.16.2.4 11-Aug-2006  yamt sync with head
 1.16.2.3 26-Jun-2006  yamt sync with head.
 1.16.2.2 24-May-2006  yamt sync with head.
 1.16.2.1 11-Apr-2006  yamt sync with head
 1.19.2.1 19-Jun-2006  chap Sync with head.
 1.22.2.2 12-Jan-2007  ad Sync with head.
 1.22.2.1 18-Nov-2006  ad Sync with head.
 1.23.2.1 10-Dec-2006  yamt sync with head.
 1.24.32.1 13-Nov-2007  bouyer Sync with HEAD
 1.24.28.2 09-Jan-2008  matt sync with HEAD
 1.24.28.1 06-Nov-2007  matt sync with HEAD
 1.24.26.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.24.26.1 28-Oct-2007  joerg Sync with HEAD.
 1.24.18.1 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.24.8.2 03-Dec-2007  ad Sync with HEAD.
 1.24.8.1 03-Dec-2007  ad Sync with HEAD.
 1.24.2.1 04-Nov-2007  pavel Pull up following revisions (requested by tsutsui in ticket #974):
sys/arch/cobalt/cobalt/autoconf.c: revision 1.25-1.26
sys/arch/cobalt/cobalt/machdep.c: revision 1.89
sys/arch/cobalt/stand/boot/Makefile: revision 1.12
sys/arch/cobalt/stand/boot/boot.c: revision 1.10
sys/arch/cobalt/stand/boot/boot.h: revision 1.6
sys/arch/cobalt/stand/boot/cache.c: revision 1.1-1.2
sys/arch/cobalt/stand/boot/clock.c: revision 1.2
sys/arch/cobalt/stand/boot/conf.c: revision 1.5
sys/arch/cobalt/stand/boot/devopen.c: revision 1.4
sys/arch/cobalt/stand/boot/nif_tlp.c: revision 1.1
sys/arch/cobalt/stand/boot/start.S: revision 1.6
sys/arch/cobalt/stand/boot/tlp.c: revision 1.1-1.3
sys/arch/cobalt/stand/boot/version: revision 1.6
sys/lib/libsa/dev_net.h: revision 1.5
Add an extern decl of try_bootp variable here since MD sources could set it.

In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit

Assume netboot if "nfsroot=/path" is specified in bootstring.

Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().

Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.

Fix my stupid bug in cache flush code and remove one kludge for it.

- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.26.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.27.14.1 03-Apr-2008  mjf Sync with HEAD.
 1.29.8.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.29.2.1 30-Oct-2012  yamt sync with head
 1.30.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.46 20-Jan-2018  skrll Switch cobalt to common bus_space.

Tested on raq 2
 1.45 29-Jul-2014  skrll Convert cobalt to generic mips bus_dma.
 1.44 02-Oct-2012  christos branches: 1.44.10;
move common/bus_dma/ -> dev/bus_dma/
 1.43 12-Feb-2012  matt branches: 1.43.6;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.42 17-Jul-2011  dyoung branches: 1.42.2; 1.42.6;
Switch MIPS and MIPS-ish architectures to new-style <sys/bus.h>. This
involves moving some inline bus_space(9) implementation into .c files.
 1.41 09-Jul-2011  matt Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h
 1.40 03-May-2011  tsutsui TAB/space cosmetics.
 1.39 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).
 1.38 14-Dec-2009  matt branches: 1.38.4; 1.38.6; 1.38.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.37 21-Aug-2009  thorpej Use bus_dmamem_common.
 1.36 20-Aug-2009  tsutsui Add an empty bus_space_mmap(9) function as temporary workaround
for MI pci(4) mmap function in sys/dev/pci/pci_usrreq.c.
 1.35 04-Jun-2008  ad branches: 1.35.8; 1.35.16;
vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both.
 1.34 28-Apr-2008  martin branches: 1.34.2;
Remove clause 3 and 4 from TNF licenses
 1.33 06-Mar-2007  he branches: 1.33.40; 1.33.42; 1.33.44;
Use char* with mtod() when doing pointer arithmetic on the result.
 1.32 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.31 10-Jun-2006  tsutsui branches: 1.31.12;
space nits.
 1.30 14-May-2006  elad branches: 1.30.2;
integrate kauth.
 1.29 14-May-2006  tsutsui Pull slightly optimized BUS_DMASYNC_PREREAD op from other mips3 ports.
 1.28 16-Apr-2006  tsutsui Mising -> Mixing
 1.27 16-Apr-2006  tsutsui _ds_vaddr member in struct cobalt_bus_dma_segment is a virtual address,
so it should be vaddr_t rather than bus_addr_t.
 1.26 05-Apr-2006  tsutsui - ANSIfy
- KNF
- u_intXX_t -> uintXX_t
 1.25 05-Apr-2006  tsutsui Fix function name in panic messages.
 1.24 01-Mar-2006  yamt branches: 1.24.2; 1.24.4; 1.24.6;
merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
the latter is more natural to specify an address space.
(and less likely to be abused for random purposes.)
- fix a swdmover race.
 1.23 11-Dec-2005  christos branches: 1.23.2; 1.23.4; 1.23.6;
merge ktrace-lwp.
 1.22 24-Nov-2005  yamt bus_dmamem_map: honour BUS_DMA_NOWAIT. noted by Manuel Bouyer.
bus_space_map: always do NOWAIT allocation as it used to be before yamt-km.

we have too many copies!
 1.21 01-Apr-2005  yamt branches: 1.21.2; 1.21.8;
merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.20 09-Mar-2005  matt Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create). dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
 1.19 28-Nov-2004  thorpej branches: 1.19.4; 1.19.6;
bus_dmamap_load_mbuf(): Skip zero-length mbufs.
kern/24811
 1.18 16-Sep-2004  rumble Correct a few comment typos that have propagated through the
tree.
 1.17 15-Jul-2003  lukem __KERNEL_RCSID()
 1.16 29-Jun-2003  fvdl branches: 1.16.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.15 28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.14 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.13 02-Jun-2002  drochner move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
 1.12 14-Nov-2001  thorpej branches: 1.12.2; 1.12.10;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.11 10-Sep-2001  chris branches: 1.11.2;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.10 22-Jul-2001  wiz branches: 1.10.2;
bzero -> memset
 1.9 26-May-2001  chs branches: 1.9.2;
replace vm_page_t with struct vm_page *.
 1.8 24-Apr-2001  thorpej Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.7 21-Mar-2001  soren s/vm_page_alloc_memory/uvm_pglistalloc/ in panic message.
 1.6 27-Jun-2000  soren branches: 1.6.2; 1.6.4;
Don't include <vm/vm.h>.
 1.5 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.4 26-Jun-2000  simonb Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.3 29-May-2000  soren branches: 1.3.2;
Whitespace.
 1.2 31-Mar-2000  soren branches: 1.2.2;
Some cleanups.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.2.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.2.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.6.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.6.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.6.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.6.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.2.1 27-Jun-2000  bouyer file bus.c was added on branch thorpej_scsipi on 2000-11-20 20:06:59 +0000
 1.9.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.9.2.1 03-Aug-2001  lukem update to -current
 1.10.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.11.2.2 13-Nov-2001  thorpej bus_dmamap_sync() optimizes for the virtually-indexed write-back
cache present on the RM52xx CPU that the Cobalt usees.
 1.11.2.1 13-Nov-2001  thorpej Make the cobalt port build with thorpej-mips-cache.
 1.12.10.1 14-Jul-2002  gehenna catch up with -current.
 1.12.2.4 02-Jul-2002  nathanw curlwp back to curproc; curproc is the correct type here.
 1.12.2.3 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.12.2.2 20-Jun-2002  nathanw Catch up to -current.
 1.12.2.1 14-Nov-2001  nathanw file bus.c was added on branch nathanw_sa on 2002-06-20 03:38:26 +0000
 1.16.2.8 11-Dec-2005  christos Sync with head.
 1.16.2.7 01-Apr-2005  skrll Sync with HEAD.
 1.16.2.6 19-Feb-2005  skrll Don't deref a NULL struct lwp *. This shouldn't happen, but...
 1.16.2.5 18-Dec-2004  skrll Sync with HEAD.
 1.16.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.16.2.2 03-Aug-2004  skrll Sync with HEAD
 1.16.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.19.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.19.6.1 11-Feb-2005  yamt use new apis.
 1.19.4.1 29-Apr-2005  kent sync with -current
 1.21.8.1 29-Nov-2005  yamt sync with head.
 1.21.2.2 03-Sep-2007  yamt sync with head.
 1.21.2.1 21-Jun-2006  yamt sync with head.
 1.23.6.2 01-Jun-2006  kardel Sync with head.
 1.23.6.1 22-Apr-2006  simonb Sync with head.
 1.23.4.1 09-Sep-2006  rpaulo sync with head
 1.23.2.3 18-Feb-2006  yamt fix a typo in the previous.
 1.23.2.2 18-Feb-2006  yamt keep vmspace rather than proc in cobalt_bus_dmamap.
 1.23.2.1 18-Feb-2006  yamt adapt bus_dma implementations.
 1.24.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.24.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.24.2.3 26-Jun-2006  yamt sync with head.
 1.24.2.2 24-May-2006  yamt sync with head.
 1.24.2.1 11-Apr-2006  yamt sync with head
 1.30.2.1 19-Jun-2006  chap Sync with head.
 1.31.12.1 12-Mar-2007  rmind Sync with HEAD.
 1.33.44.4 11-Mar-2010  yamt sync with head
 1.33.44.3 16-Sep-2009  yamt sync with head
 1.33.44.2 04-May-2009  yamt sync with head.
 1.33.44.1 16-May-2008  yamt sync with head.
 1.33.42.2 17-Jun-2008  yamt sync with head.
 1.33.42.1 18-May-2008  yamt sync with head.
 1.33.40.2 05-Jun-2008  mjf Sync with HEAD.

Also fix build.
 1.33.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.34.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.35.16.4 24-Dec-2010  matt Define bus_space_mmap
 1.35.16.3 20-Jan-2010  matt Adjust things to the new world order.
 1.35.16.2 14-Jan-2010  matt More avail_end/avail_start fallout.
 1.35.16.1 26-Aug-2009  matt Fixup (all but mipsco) to deal the new realities in mipsland.
 1.35.8.1 16-Sep-2009  snj Pull up following revision(s) (requested by mrg in ticket #952):
sys/arch/cobalt/cobalt/bus.c: revision 1.36
sys/arch/cobalt/include/bus.h: revision 1.23
Add an empty bus_space_mmap(9) function as a workaround
for MI pci(4) mmap function in sys/dev/pci/pci_usrreq.c.
 1.38.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.38.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.38.4.2 31-May-2011  rmind sync with head
 1.38.4.1 05-Mar-2011  rmind sync with head
 1.42.6.1 18-Feb-2012  mrg merge to -current.
 1.42.2.2 30-Oct-2012  yamt sync with head
 1.42.2.1 17-Apr-2012  yamt sync with head
 1.43.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.43.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.44.10.1 10-Aug-2014  tls Rebase.
 1.16 10-Sep-2006  tsutsui Remove or comment out now unused code after MI mips3_clockintr migration.
 1.15 07-Sep-2006  gdamore branches: 1.15.2;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.
 1.14 04-Sep-2006  tsutsui Switch cobalt to MI todr.
 1.13 18-Jul-2006  tsutsui - always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
(XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
by default.
 1.12 21-Apr-2006  tsutsui - initialize cpuspeed and curcpu() according to cobalt model id
- switch to cpu cyclecounter based delay(9), taken from evbmips
 1.11 15-Apr-2006  tsutsui Switch cobalt port to use MI todr(9) functions and MI mc146818 driver.
Tested on RaQ2 and Qube2 on port-cobalt.
 1.10 05-Apr-2006  tsutsui - ANSIfy
- KNF
- u_intXX_t -> uintXX_t
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 28-Aug-2004  tsutsui branches: 1.8.12;
- Reset timer0 of GT64111 in gt_attach() and start it
in cpu_initclocks(9) via a callback function.
Fixes the "hardclock(9) is called before cpu_initclocks(9)" problem
reported by KIYOHARA Takashi on port-cobalt.
- Use bus_space(9) functions to access GT64111 registers and
add register definitions for GT64111 in gtreg.h.
(XXX this could be in sys/dev/marvell?)
- Move microtime(9) from machdep.c to clock.c, and read timer0 register
via a callback function. Also change microtime(9) like other ports
to guarantee that the time will be greater than the value obtained
by a previous call.
 1.7 05-Jul-2004  pk Call inittodr() from main(). Let file system code set the recorded `last
update' time (if any) through the new function setrootfstime().
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 28-Apr-2000  soren branches: 1.5.6; 1.5.30;
Make sure to read the clock before we leave the 'cold' state.
 1.4 31-Mar-2000  soren Some cleanups.
 1.3 23-Mar-2000  nisimura - Have physical address for MIPS_PHYS_TO_KSEG1() macro.
- Make consistent function declarations.
- White spaces.
 1.2 22-Mar-2000  soren The firmware uses the clock in BCD mode.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.5.30.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.30.3 18-Sep-2004  skrll Sync with HEAD.
 1.5.30.2 03-Sep-2004  skrll Sync with HEAD
 1.5.30.1 03-Aug-2004  skrll Sync with HEAD
 1.5.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.6.1 28-Apr-2000  bouyer file clock.c was added on branch thorpej_scsipi on 2000-11-20 20:06:59 +0000
 1.8.12.2 30-Dec-2006  yamt sync with head.
 1.8.12.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.9.10.2 11-May-2006  elad sync with head
 1.9.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.9.8.4 14-Sep-2006  yamt sync with head.
 1.9.8.3 11-Aug-2006  yamt sync with head
 1.9.8.2 24-May-2006  yamt sync with head.
 1.9.8.1 11-Apr-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.15.2.1 18-Nov-2006  ad Sync with head.
 1.6 10-Sep-2006  tsutsui Remove or comment out now unused code after MI mips3_clockintr migration.
 1.5 07-Sep-2006  gdamore branches: 1.5.2;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.
 1.4 18-Jul-2006  tsutsui - always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
(XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
by default.
 1.3 21-Apr-2006  tsutsui Account interrupts by evcnt(9).
 1.2 11-Dec-2005  christos branches: 1.2.4; 1.2.6; 1.2.8; 1.2.10; 1.2.12;
merge ktrace-lwp.
 1.1 28-Aug-2004  tsutsui branches: 1.1.2; 1.1.14;
- Reset timer0 of GT64111 in gt_attach() and start it
in cpu_initclocks(9) via a callback function.
Fixes the "hardclock(9) is called before cpu_initclocks(9)" problem
reported by KIYOHARA Takashi on port-cobalt.
- Use bus_space(9) functions to access GT64111 registers and
add register definitions for GT64111 in gtreg.h.
(XXX this could be in sys/dev/marvell?)
- Move microtime(9) from machdep.c to clock.c, and read timer0 register
via a callback function. Also change microtime(9) like other ports
to guarantee that the time will be greater than the value obtained
by a previous call.
 1.1.14.2 30-Dec-2006  yamt sync with head.
 1.1.14.1 21-Jun-2006  yamt sync with head.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Sep-2004  skrll Sync with HEAD
 1.1.2.1 28-Aug-2004  skrll file clockvar.h was added on branch ktrace-lwp on 2004-09-03 12:44:29 +0000
 1.2.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.2.10.1 11-May-2006  elad sync with head
 1.2.8.3 14-Sep-2006  yamt sync with head.
 1.2.8.2 11-Aug-2006  yamt sync with head
 1.2.8.1 24-May-2006  yamt sync with head.
 1.2.6.1 22-Apr-2006  simonb Sync with head.
 1.2.4.1 09-Sep-2006  rpaulo sync with head
 1.5.2.1 18-Nov-2006  ad Sync with head.
 1.17 26-Oct-2002  jdolecek now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
 1.16 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.15 19-Jul-2002  thorpej Rename cdev_systrace_init() to cdev_clonemisc_init(), so it can
be properly used by any misc. cloning device. While here, correct
a comment to indicate that "open" is the only entry point and that
everything else is handled with fileops.
 1.14 17-Jun-2002  christos MD systrace gluons.
 1.13 16-Mar-2002  martin branches: 1.13.4;
Rename ISDN devices, per discussion on tech-kern. The network devices
become ippp (ISDN ppp) and irip (ISDN raw IP). The character device now
are called: /dev/isdn (isdnd <-> kernel communication), /dev/isdnctl (dialing
and other control), /dev/isdntrc* (tracing), /dev/isdnbchan* (raw B channel
access, i.e. for user land PPP) and /dev/isdntel* (telephone devices, i.e.
for answering machines).
 1.12 12-Jan-2002  manu Added clockctl
 1.11 21-Mar-2001  lukem branches: 1.11.2; 1.11.8;
move duplicate definitions for:
pc, lpt, joy, ocis, apm, satlink, i4bctl, i4brbch, i4btel, i4btrc, i4b
from the port-specific arch/*/*/conf.c files into sys/conf.h
 1.10 14-Jan-2001  martin branches: 1.10.2;
The i4b raw b-channel devices actually do have an ioctl routine,
so better add this to the cdevsw entry.
Noted by Bruno Achauer.
 1.9 09-Jan-2001  martin When adding isdn devices I forgot to check chrtoblktbl.
Fix this know for the affected archs.
 1.8 08-Jan-2001  martin Add isdn devices to all archs that seem to support at least one of the
necessary busses. Sync comments with reality for archs that already had
the devices.
 1.7 26-Nov-2000  ad lsu -> ld, by popular request.
 1.6 20-Oct-2000  ad branches: 1.6.2;
ca -> lsu
 1.5 13-Jul-2000  soren Fix mem_no. Pointed out by cgd.
 1.4 13-Jul-2000  cgd fix some obvious paste errors in 'uk' cdev inits
 1.3 06-Jun-2000  soren branches: 1.3.2;
Fix pasto.
 1.2 28-Apr-2000  ad branches: 1.2.2;
Add missing cdevsw and chrtoblktbl entries.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.2.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.2.2 09-Feb-2002  he Pull up revisions 1.6-1.7 (requested by cyber):
Catch up with the renaming ca* -> ld*.
 1.3.2.1 03-Sep-2000  soren Pull up to rev 1.5:
> date: 2000/07/13 18:10:38; author: soren; state: Exp; lines: +2 -2
> Fix mem_no. Pointed out by cgd.
 1.6.2.5 27-Mar-2001  bouyer Sync with HEAD.
 1.6.2.4 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.6.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.6.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.2.1 20-Oct-2000  bouyer file conf.c was added on branch thorpej_scsipi on 2000-11-20 20:07:00 +0000
 1.10.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.11.8.7 11-Nov-2002  nathanw Catch up to -current
 1.11.8.6 17-Sep-2002  nathanw Catch up to -current.
 1.11.8.5 01-Aug-2002  nathanw Catch up to -current.
 1.11.8.4 20-Jun-2002  nathanw Catch up to -current.
 1.11.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.11.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.11.8.1 21-Mar-2001  nathanw file conf.c was added on branch nathanw_sa on 2002-02-28 04:08:45 +0000
 1.11.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.11.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.11.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.13.4.3 21-Jul-2002  gehenna catch up with -current.
 1.13.4.2 14-Jul-2002  gehenna catch up with -current.
 1.13.4.1 16-May-2002  gehenna Bye block/character device swicth tables.
 1.13 04-Sep-2021  tsutsui Use C99 designated initializer.
 1.12 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.11 27-Mar-2008  tsutsui Add kernel support for optional Z85C30 serial console on Cobalt Qube 2700.
There is some interrupt related issue (in MI z8530tty driver?) on heavy load,
but useful enough for debugging.
 1.10 05-Apr-2006  tsutsui branches: 1.10.62;
- ANSIfy
- KNF
- u_intXX_t -> uintXX_t
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 29-Aug-2004  tsutsui branches: 1.8.12;
- rename comcnprobe() and comcninit() to com_mainbus_cnprobe() and
com_mainbus_cninit() and move these cn functions from cobalt/console.c
to dev/com_mainbus.c
- call cninit() only once
- remove unneeded includes
- use ANSI function decls
 1.7 07-Jan-2004  cdi branches: 1.7.4;
Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.
 1.6 17-Oct-2003  cdi Change console code to use cninit() and null console. Add serial console
check.
 1.5 12-Sep-2003  tsutsui TAB/space cleanup.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 14-Jun-2003  thorpej branches: 1.3.2;
Also pass a type argument to comcnattach() and com_kgdb_attach().
comspeed() (and thus cominit()) may need this information.
 1.2 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 19-Mar-2000  soren branches: 1.1.6; 1.1.10; 1.1.14; 1.1.22;
NetBSD/cobalt. Work-in-progress.
 1.1.22.1 19-May-2002  gehenna Remove unnecessary #include
 1.1.14.1 17-Sep-2002  nathanw Catch up to -current.
 1.1.10.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file console.c was added on branch thorpej_scsipi on 2000-11-20 20:07:00 +0000
 1.3.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.2 03-Sep-2004  skrll Sync with HEAD
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.4.1 16-Dec-2005  jmc Pullup rev 1.8 (requested by tsutsui in ticket #10175)

Cobalt kernel hangs in the second
consinit() call if it is loaded by the native bootloader,
so there is no bootstrap way to install other than to use
an older kernel.
 1.8.12.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.9.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.9.8.1 11-Apr-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.10.62.1 03-Apr-2008  mjf Sync with HEAD.
 1.1 27-Mar-2008  tsutsui branches: 1.1.2;
Add kernel support for optional Z85C30 serial console on Cobalt Qube 2700.
There is some interrupt related issue (in MI z8530tty driver?) on heavy load,
but useful enough for debugging.
 1.1.2.2 03-Apr-2008  mjf Sync with HEAD.
 1.1.2.1 27-Mar-2008  mjf file console.h was added on branch mjf-devfs2 on 2008-04-03 12:42:13 +0000
 1.12 03-Mar-2022  riastradh mips: Use device_set_private for cpuN on older ports.

Specifically, for those that don't use cpu_attach_common of
mips_subr.c.
 1.11 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).
 1.10 09-May-2008  tsutsui branches: 1.10.16; 1.10.20; 1.10.26; 1.10.28;
Split softc/device_t, with misc related changes.
 1.9 05-Apr-2006  tsutsui branches: 1.9.62; 1.9.64; 1.9.66; 1.9.68;
Include "ioconf.h" for struct cfdriver cpu_cd (though it's currently unused).
 1.8 05-Apr-2006  tsutsui - ANSIfy
- KNF
- u_intXX_t -> uintXX_t
 1.7 11-Dec-2005  christos branches: 1.7.4; 1.7.6; 1.7.8; 1.7.10; 1.7.12;
merge ktrace-lwp.
 1.6 15-Jul-2003  lukem branches: 1.6.16;
__KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 14-Nov-2001  thorpej branches: 1.3.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.2 27-Jun-2001  nisimura branches: 1.2.2; 1.2.6;
Cobalt MIPS servers are known to have QED RM5200 processor.
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file cpu.c was added on branch thorpej_scsipi on 2000-11-20 20:07:00 +0000
 1.2.6.1 13-Nov-2001  thorpej Make the cobalt port build with thorpej-mips-cache.
 1.2.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.3.2.1 14-Nov-2001  nathanw file cpu.c was added on branch nathanw_sa on 2002-10-18 02:36:16 +0000
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.1 21-Jun-2006  yamt sync with head.
 1.7.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.7.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.7.8.1 11-Apr-2006  yamt sync with head
 1.7.6.1 22-Apr-2006  simonb Sync with head.
 1.7.4.1 09-Sep-2006  rpaulo sync with head
 1.9.68.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.9.66.1 16-May-2008  yamt sync with head.
 1.9.64.1 18-May-2008  yamt sync with head.
 1.9.62.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.28.1 05-Mar-2011  bouyer Sync with HEAD
 1.10.26.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.20.1 05-Mar-2011  rmind sync with head
 1.10.16.2 23-Dec-2011  matt Change usage to cpu_identify(self, NULL);
 1.10.16.1 13-Jan-2010  matt Deal with new cpu_identity()
 1.27 04-Sep-2021  tsutsui Use MI subr_disk_mbr.c for proper MBR and bi-endian supprot.

No special MD handling in previous. Briefly tested on gxemul 0.6.3.
 1.26 03-Apr-2019  christos centralize setdisklabel(9)
 1.25 16-May-2013  christos branches: 1.25.34;
Complete the dosparts -> mbrparts conversion. Only x86k new uses dosparts
because it also uses struct dos_partition.
 1.24 03-Mar-2008  tsutsui branches: 1.24.38; 1.24.48;
Use xlat_mbr_fstype() so that we can mount FAT removable media properly.
 1.23 02-Jan-2008  ad branches: 1.23.2; 1.23.6;
Merge vmlocking2 to head.
 1.22 17-Oct-2007  garbled branches: 1.22.2; 1.22.4; 1.22.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.21 08-Oct-2007  ad Merge brelse() changes from the vmlocking branch.
 1.20 29-Jul-2007  ad branches: 1.20.4; 1.20.6; 1.20.8;
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.19 06-Mar-2007  he branches: 1.19.2; 1.19.10; 1.19.12; 1.19.14;
Cast to char* before doing pointer arithmetic.
 1.18 25-Nov-2006  scw branches: 1.18.4;
Replace the myriad copies of bounds_check_with_label() with a single MI
version.

Add disk_blocksize(9) so that disk drivers can record the physical
block size of a disk if it is different to DEV_BSIZE. Right now this
simply initialises dk_blkshift and dk_byteshift according to the
supplied block size. This information is used in the MI version of
bounds_check_with_label().
 1.17 05-Apr-2006  tsutsui branches: 1.17.8; 1.17.10;
- ANSIfy
- KNF
- u_intXX_t -> uintXX_t
 1.16 11-Dec-2005  christos branches: 1.16.4; 1.16.6; 1.16.8; 1.16.10; 1.16.12;
merge ktrace-lwp.
 1.15 04-Jun-2005  tsutsui branches: 1.15.2;
Add const.
 1.14 08-Oct-2003  lukem Overhaul MBR handling (part 1):

<sys/bootblock.h>:
* Added definitions for the Master Boot Record (MBR) used by
a variety of systems (primarily i386), including the format
of the BIOS Parameter Block (BPB).
This information was cribbed from a variety of sources
including <sys/disklabel_mbr.h> which this is a superset of.

As part of this, some data structure elements and #defines
were renamed to be more "namespace friendly" and consistent
with other bootblocks and MBR documentation.
Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
* Deprecated in favor of <sys/bootblock.h> (the latter is more
"host tool" friendly).

amd64 & i386:
* Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
be consistent with the naming convention of the msdosfs tools.

* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
and it's confusing to have two functionally equivalent bootblocks,
especially given that "ufs" has multiple meanings (it could be
a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

* Rework pbr.S (the first sector of bootxx_*):
+ Ensure that BPB (bytes 11..89) and the partition table
(bytes 446..509) do not contain code.
+ Add support for booting from FAT partitions if BOOT_FROM_FAT
is defined. (Only set for bootxx_msdos).
+ Remove "dummy" partition 3; if people want to installboot(8)
these to the start of the disk they can use fdisk(8) to
create a real MBR partition table...
+ Compile with TERSE_ERROR so it fits because of the above.
Whilst this is less user friendly, I feel it's important
to have a valid partition table and BPB in the MBR/PBR.

* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
with other platforms.

* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
we can boot off FAT partitions.

* Crank version of /usr/mdec/boot to 3.1, and fix some of the other
entries in the version file.

installboot(8) (i386):
* Read the existing MBR of the filesystem and retain the BIOS
Parameter Block (BPB) in bytes 11..89 and the MBR partition
table in bytes 446..509. (Previously installboot(8) would
trash those two sections of the MBR.)

mbrlabel(8):
* Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
 1.13 12-Sep-2003  tsutsui TAB/space cleanup.
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 10-May-2003  thorpej branches: 1.10.2;
Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself. This paves the way for some future changes.
 1.9 02-May-2003  dsl Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
 1.8 16-Apr-2003  bouyer Nake return values from bounds_check_with_label() conform to the man
page: -1 for error, 0 for EOF, 1 otherwise. Inspired by an OpenBSD commit
message, pointed out by Miod Vallat in private mail.
vax/mba/hp.c: check return value <= 0, not < 0 to be concistent with how
other places handle return values from bounds_check_with_label().
 1.7 19-Feb-2002  wiz strategy should have an 'r'. Inspired by similar change in OpenBSD.
 1.6 20-Nov-2000  chs branches: 1.6.2; 1.6.4; 1.6.6; 1.6.10;
rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
 1.5 16-May-2000  thorpej Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc. Those
platforms should be changed to use device_register(). In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
 1.4 31-Mar-2000  soren Some cleanups.
 1.3 22-Mar-2000  soren Revert to the same scheme as the other MBR-using ports.
 1.2 21-Mar-2000  soren Add bounds_check_with_label().
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.6.10.1 28-Feb-2002  nathanw Catch up to -current.
 1.6.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.6.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.6.2.3 22-Nov-2000  bouyer Sync with HEAD.
 1.6.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.2.1 20-Nov-2000  bouyer file disksubr.c was added on branch thorpej_scsipi on 2000-11-20 20:07:00 +0000
 1.10.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.15.2.6 17-Mar-2008  yamt sync with head.
 1.15.2.5 21-Jan-2008  yamt sync with head
 1.15.2.4 27-Oct-2007  yamt sync with head.
 1.15.2.3 03-Sep-2007  yamt sync with head.
 1.15.2.2 30-Dec-2006  yamt sync with head.
 1.15.2.1 21-Jun-2006  yamt sync with head.
 1.16.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.16.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.16.8.1 11-Apr-2006  yamt sync with head
 1.16.6.1 22-Apr-2006  simonb Sync with head.
 1.16.4.1 09-Sep-2006  rpaulo sync with head
 1.17.10.1 10-Dec-2006  yamt sync with head.
 1.17.8.1 12-Jan-2007  ad Sync with head.
 1.18.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.19.14.1 15-Aug-2007  skrll Sync with HEAD.
 1.19.12.1 07-Aug-2007  matt Sync with HEAD.
 1.19.10.2 16-Oct-2007  garbled Sync with HEAD
 1.19.10.1 03-Oct-2007  garbled Sync with HEAD
 1.19.2.2 09-Oct-2007  ad Sync with head.
 1.19.2.1 19-Aug-2007  ad - Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).
 1.20.8.1 14-Oct-2007  yamt sync with head.
 1.20.6.3 23-Mar-2008  matt sync with HEAD
 1.20.6.2 09-Jan-2008  matt sync with HEAD
 1.20.6.1 06-Nov-2007  matt sync with HEAD
 1.20.4.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.22.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.22.4.1 31-Dec-2007  ad Make compile with new buffer cache locking scheme.

XXX This should be largely MI, please do not make another clone of disksubr.c.
 1.22.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.23.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.23.2.1 24-Mar-2008  keiichi sync with head.
 1.24.48.1 23-Jun-2013  tls resync from head
 1.24.38.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.25.34.1 10-Jun-2019  christos Sync with HEAD
 1.11 21-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.10 10-Nov-2019  chs branches: 1.10.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.9 06-Jun-2018  maya branches: 1.9.2;
Remove duplicate ;
 1.8 20-Jan-2018  skrll branches: 1.8.2;
Switch cobalt to common bus_space.

Tested on raq 2
 1.7 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.6 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).
 1.5 20-Dec-2010  matt branches: 1.5.2; 1.5.4;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.4 14-Dec-2009  matt branches: 1.4.4;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.3 14-May-2008  tsutsui branches: 1.3.16;
Normalize my licenses.
 1.2 28-Apr-2008  martin branches: 1.2.2;
Remove clause 3 and 4 from TNF licenses
 1.1 22-Mar-2008  tsutsui branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.
 1.1.8.2 11-Mar-2010  yamt sync with head
 1.1.8.1 16-May-2008  yamt sync with head.
 1.1.6.1 18-May-2008  yamt sync with head.
 1.1.4.3 02-Jun-2008  mjf Sync with HEAD.
 1.1.4.2 03-Apr-2008  mjf Sync with HEAD.
 1.1.4.1 22-Mar-2008  mjf file interrupt.c was added on branch mjf-devfs2 on 2008-04-03 12:42:13 +0000
 1.1.2.2 24-Mar-2008  yamt sync with head.
 1.1.2.1 22-Mar-2008  yamt file interrupt.c was added on branch yamt-lazymbuf on 2008-03-24 09:38:38 +0000
 1.2.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.3.16.2 28-Feb-2010  matt Adapt to new common interrupts.
Enable cobalt64
 1.3.16.1 05-Feb-2010  matt Change to deal with new method of invoking softints. Remove mips/softintr.c
from config files. Fix SYMTAB_SPACE for WGT62V43
 1.4.4.1 05-Mar-2011  rmind sync with head
 1.5.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.5.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.9.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 31-May-2005  chs remove vestigal {,e}intr{names,cnt} symbols now that vmstat doesn't need them.
 1.4 12-Sep-2003  tsutsui Use common mips generic software interrupt routines.
 1.3 31-Mar-2000  soren branches: 1.3.6; 1.3.30;
Some cleanups.
 1.2 22-Mar-2000  soren Note that this is just for compatibility.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.3.30.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.30.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.30.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.30.1 03-Aug-2004  skrll Sync with HEAD
 1.3.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.6.1 31-Mar-2000  bouyer file locore_machdep.S was added on branch thorpej_scsipi on 2000-11-20 20:07:00 +0000
 1.124 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.123 23-May-2022  andvar s/boundries/boundaries/, s/itterate/iterate/ and few more typos.
 1.122 06-Feb-2019  mrg compare pointers with NULL not nul.
 1.121 20-Jan-2018  skrll branches: 1.121.4;
Switch cobalt to common bus_space.

Tested on raq 2
 1.120 06-Nov-2017  christos Cleanup and clarify the ELFSIZE mess:

We now have 2 variables automatically set in elf_machdep.h:

ARCH_ELFSIZE: the size for userland binaries
KERN_ELFSIZE: the size for the kernel binaries

DB_ELFSIZE has been deleted and KERN_ELFSIZE should have always the
same values DB_ELFSIZE used to have.

In sys/exec_elf.h, if ELFSIZE is not set, it is set to KERN_ELFSIZE
for the kernel and ARCH_ELFSIZE for userland. These defaults should
eliminate the need for most manual ELFSIZE setting.
 1.119 22-Dec-2016  cherry switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.118 27-Jul-2016  skrll Fix RB_KDB by calling the debugger entry points after pmap_bootstrap, etc
 1.117 29-Jun-2015  matt branches: 1.117.2;
use cpu_startup_common
 1.116 03-Apr-2014  joerg branches: 1.116.6;
GC nsym
 1.115 24-Mar-2014  christos use cpu_{g,s}etmodel
 1.114 28-Jul-2012  matt branches: 1.114.2; 1.114.4;
Fix -fno-common fallout.
 1.113 28-Jul-2012  matt Remove declartions of physmem
 1.112 09-Jul-2011  matt branches: 1.112.2;
Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h
 1.111 20-Feb-2011  tsutsui Remove leftover debug stuff.
 1.110 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).
 1.109 08-Feb-2010  joerg branches: 1.109.2; 1.109.4; 1.109.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.108 18-Dec-2009  matt branches: 1.108.2;
Cleanup some messages.
Change arguments to sign extend properly.
GENERIC64 now gets to boot prompt in gxemul.
 1.107 17-Dec-2009  matt Enable mips64 support for cobalt.
 1.106 16-Dec-2009  matt Make cobalt build again.
 1.105 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.104 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.103 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.102 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.101 30-Nov-2008  martin branches: 1.101.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.100 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.99 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.98 02-Jul-2008  ad branches: 1.98.2; 1.98.4; 1.98.10;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.97 26-May-2008  tsutsui branches: 1.97.2;
Remove all initialization of obsolete ci_divisor_recip in
mips struct cpu_info and related macroes.
The member was prepared for a hack in MD microtime(9) implementation
but it has been superseded by MI timecounter(9).
 1.96 14-May-2008  tsutsui Normalize my licenses.
 1.95 22-Mar-2008  tsutsui branches: 1.95.2; 1.95.4; 1.95.6;
Use C99 initializer.
 1.94 22-Mar-2008  tsutsui Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.
 1.93 18-Mar-2008  tsutsui Fix botched spl(9) bug I introduced back in 3.99.18 (rev 1.64):
Don't enable unhandled interrupts before all interrupts are processed.

Should fix "long download, network frozen" problems reported on
port-cobalt by several people.
 1.92 09-Jan-2008  wiz branches: 1.92.2; 1.92.6;
Fix typo in macro name and comments.
 1.91 22-Dec-2007  tsutsui In icu_intr_establish(), don't panic if the specified irq
is already in use and just return NULL instead.

Such situation could happen with devices which have
unconfigured PCI interrupt pins (because firmware
doesn't configure multiple function devices) and
each driver could handle the return value properly.
 1.90 03-Dec-2007  ad branches: 1.90.2; 1.90.6;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.89 27-Oct-2007  tsutsui branches: 1.89.2;
Assume netboot if "nfsroot=/path" is specified in bootstring.
 1.88 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.87 10-Aug-2007  tsutsui branches: 1.87.2; 1.87.6;
More style nits.
 1.86 10-Aug-2007  tsutsui Some style nits.
 1.85 10-Aug-2007  tsutsui Lookup boothowto flags in bootinfo.
 1.84 03-Jul-2007  tsutsui branches: 1.84.4; 1.84.8;
Don't clear BSS even if ksyms(4) is not configured.
 1.83 27-May-2007  tsutsui - Don't clear BSS in mach_init() if a kernel is loaded
by our native bootloader.
- Restore lwp0.l_cpu (which is required for curcpu()) and
cpu_info_store.ci_curlwp after clearing BSS in case
a kernel is loaded by the firmware directly since these
values are in BSS and initilized before mach_init() is called.
(actually they are restored in mips_machdep.c:mips_vector_init()
but we use curcpu() earlier than that point)

Fixes silent hang right after boot on cobalt.
 1.82 17-May-2007  yamt 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.81 17-Mar-2007  tsutsui branches: 1.81.4;
Use char * where pointer arithmetics are required.
 1.80 05-Mar-2007  dogcow branches: 1.80.2; 1.80.4; 1.80.6;
semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.
 1.79 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.78 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.77 16-Feb-2007  tsutsui branches: 1.77.2;
Remove hacks for now removed spllowersoftclock(9).
 1.76 21-Dec-2006  yamt merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.75 16-Sep-2006  tsutsui branches: 1.75.2; 1.75.4; 1.75.6;
Tweak status value in struct clockframe before calling mips3_clockintr()
so that spllowersoftclock(9) in hardclock(9) will be handled properly.
 1.74 10-Sep-2006  tsutsui Change mips3_clockintr() to take (struct clockframe *) rather than
pc and status since it calls hardclock(9) anyway.
OK'ed by gdamore on port-mips.
 1.73 10-Sep-2006  tsutsui Remove or comment out now unused code after MI mips3_clockintr migration.
 1.72 07-Sep-2006  gdamore branches: 1.72.2;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.
 1.71 18-Jul-2006  tsutsui - always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
(XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
by default.
 1.70 10-Jun-2006  tsutsui space nits.
 1.69 31-May-2006  tsutsui Remove unneeded #include headers.
 1.68 31-May-2006  tsutsui Use __predict_true() and __predict_false() in some critical handlers.
 1.67 31-May-2006  tsutsui Cleanup ICU (i8259 compatible PIC) interrupt handling code:
- move ICU interrupt stuff from pci/pcib.h to cobalt/machdep.c
because ICU should be initialized before pcib is attached
- initialize ICU more properly
- check interrupt types and set ELCR (edge/level control registers)
accordingly in icu_intr_establish()
- check requested IRQ line and call only a necessary hander in icu_intr()
- use specific EOI to ack interrupts rather than AEOI
- use macro defined in <dev/ic/i8259reg.h>
 1.66 21-Apr-2006  tsutsui branches: 1.66.2;
Fix an include path.
 1.65 21-Apr-2006  tsutsui Account interrupts by evcnt(9).
 1.64 21-Apr-2006  tsutsui Handle interrupts in priority order.
 1.63 21-Apr-2006  tsutsui Make a local variable static.
 1.62 21-Apr-2006  tsutsui - initialize cpuspeed and curcpu() according to cobalt model id
- switch to cpu cyclecounter based delay(9), taken from evbmips
 1.61 21-Apr-2006  tsutsui - add prefix ih_ to cookie_type member in struct cobalt_intrhand
- clear the cookie type in disestablish functions
- some cosmetics
 1.60 15-Apr-2006  tsutsui Identify cobalt models at boot and store it to a variable cobalt_id.
Tested on and Qube2 by several people on port-cobalt and my RaQ2.
 1.59 09-Apr-2006  tsutsui Replace some magic numbers with macro.
 1.58 09-Apr-2006  tsutsui Remove declaration for cpu_model[] since it's in <sys/systm.h>.
 1.57 05-Apr-2006  tsutsui - ANSIfy
- KNF
- u_intXX_t -> uintXX_t
 1.56 24-Dec-2005  perry branches: 1.56.4; 1.56.6; 1.56.8; 1.56.10; 1.56.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.55 11-Dec-2005  christos merge ktrace-lwp.
 1.54 04-Jun-2005  tsutsui branches: 1.54.2;
Add const and fix for -Wshadow.
 1.53 25-Apr-2005  lukem 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.52 28-Aug-2004  tsutsui branches: 1.52.4;
- Reset timer0 of GT64111 in gt_attach() and start it
in cpu_initclocks(9) via a callback function.
Fixes the "hardclock(9) is called before cpu_initclocks(9)" problem
reported by KIYOHARA Takashi on port-cobalt.
- Use bus_space(9) functions to access GT64111 registers and
add register definitions for GT64111 in gtreg.h.
(XXX this could be in sys/dev/marvell?)
- Move microtime(9) from machdep.c to clock.c, and read timer0 register
via a callback function. Also change microtime(9) like other ports
to guarantee that the time will be greater than the value obtained
by a previous call.
 1.51 02-Apr-2004  tsutsui Tidy up messages for total/avail memory.

before:
---
NetBSD 2.0B (COLT) #67: Sat Apr 3 06:29:50 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
256 MB memory, 247 MB freemainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---
after:
---
NetBSD 2.0B (COLT) #68: Sat Apr 3 07:54:17 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
total memory = 256 MB
avail memory = 247 MB
mainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---
 1.50 07-Jan-2004  cdi branches: 1.50.2;
Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.
 1.49 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.48 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.47 12-Sep-2003  tsutsui Use common mips generic software interrupt routines.
 1.46 12-Sep-2003  tsutsui Remove a redundant function declaration.
 1.45 12-Sep-2003  tsutsui TAB/space cleanup.
 1.44 15-Jul-2003  lukem __KERNEL_RCSID()
 1.43 26-Apr-2003  ragge branches: 1.43.2;
Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.42 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.41 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.40 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.39 25-Aug-2002  thorpej Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.
 1.38 09-Aug-2002  gmcgarry Garbage-collect cpu_sysctl(). From Shin'ichiro TAYA in PR-17888.
 1.37 13-Jan-2002  augustss branches: 1.37.8;
Implement pci_intr_disestablish().
 1.36 23-Nov-2001  soren Make sure to hook into DDB/KGDB if so requested.
 1.35 10-Sep-2001  chris branches: 1.35.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.34 22-Jul-2001  wiz branches: 1.34.2;
bzero -> memset
 1.33 17-Jun-2001  cyber branches: 1.33.2;
Change the way boot strings are handled and the way the root device
is determined. This allows multiple internal disks in a raq2 to work.
 1.32 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.31 24-Apr-2001  thorpej Do the first allocsys() pass (the pass that computes sizes) before
calling pmap_bootstrap(); pmap_bootstrap() needs some of the size
information computed by allocsys().
 1.30 24-Apr-2001  thorpej Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.29 23-Apr-2001  thorpej Call pmap_bootstrap() before calling uvm_pageboot_alloc(), so that
the kernel virtual address space bounds will be set up.
 1.28 22-Apr-2001  thorpej Use uvm_pageboot_alloc() for early memory allocation, rather than
calling pmap_steal_memory() directly. On these platforms, since
uvm_pageboot_alloc() is a wrapper around pmap_steal_memory(), there
is no functional change. This is merely for API consistency.
 1.27 15-Mar-2001  chs eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.26 05-Feb-2001  tsutsui branches: 1.26.2;
db_machine_init() is no longer needed.
From Shigeji Ishikawa <psybear@ogre.rim.or.jp> in port-cobalt/12123.
 1.25 15-Jan-2001  thorpej Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
 1.24 27-Nov-2000  soren Consistently use pmap_steal_memory() to allocate USPACE.
 1.23 05-Oct-2000  cgd branches: 1.23.2;
clean up and consistency for CP0 Count, Compare, Wired, and Config
access function names and prototypes.
 1.22 24-Sep-2000  jdolecek add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
 1.21 13-Sep-2000  thorpej Add an align argument to uvm_map() and some callers of that
routine. Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.
 1.20 14-Jul-2000  jeffs Use cpu_intr() definition from mips/cpu.h instead of local one.
 1.19 27-Jun-2000  soren Don't include <vm/vm.h>.
 1.18 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.17 14-Jun-2000  soren branches: 1.17.2;
Reenable hard interrupts before processing soft interrupts.
 1.16 27-May-2000  soren branches: 1.16.2;
Remove stacktrace() prototype.
 1.15 26-May-2000  thorpej First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.

- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).

- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.

- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.14 29-Apr-2000  soren ECOFF hook is in arch/mips.
 1.13 28-Apr-2000  soren Add microtime().
 1.12 28-Apr-2000  soren Adapt to cpu_intr() change.
 1.11 12-Apr-2000  nisimura Backout the previous change; safepri is an evil idea after all.
 1.10 12-Apr-2000  nisimura MIPS1_PSL_LOWIPL -> PSL_LOWPSL. No functional change is expected.
 1.9 09-Apr-2000  soren Be a little more careful parsing boot parameters.
 1.8 31-Mar-2000  soren Typo.
 1.7 31-Mar-2000  soren Some cleanups.
 1.6 27-Mar-2000  nisimura - Nuke unnecessary cast.
- Change comments on cpu_startup() so as what it does (XXX found mostly
common across ports).
- Retain UNIX heritage of /* Good {morning,afternoon,evening,night} */.
 1.5 27-Mar-2000  nisimura Remove unnecessary bzero() op for proc0's USPACE as pmap_steal_memory()
returns a nullified area.
 1.4 25-Mar-2000  nisimura Make sure proc0 PCB has spl0 condition in CP0 status register field.

cpu_fork() mistakenly created processes forked by proc0, including
kthreads, in splhigh condition, because [1] proc0's PCB was zero
cleared during initialization, and [2] value 0 in status register
field made processes to have splhigh condition when CPU tick was
assigned for them. This mostly doesn't matter as forked processes
dive immediately into user mode through proc_trampoline code path,
however, kthreads never do that and remain in splhigh.

Reported by Ethan Solomita <ethan@geocast.com>.
 1.3 21-Mar-2000  soren Blocking soft interrupts can be useful..
 1.2 21-Mar-2000  soren Extend the evil interrupt kludge to the second ethernet.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.16.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.17.2.2 17-Jun-2001  cyber Pullup from -current
autoconf.c 1.7 -> 1.8
machdep.c 1.32 -> 1.33
reviewed by soren
 1.17.2.1 19-Jul-2000  jeffs Pull up cpu_intr() prototype + platform dependent machdeps.
(approved by thorepj).
 1.23.2.7 23-Apr-2001  bouyer Sync with HEAD.
 1.23.2.6 27-Mar-2001  bouyer Sync with HEAD.
 1.23.2.5 11-Feb-2001  bouyer Sync with HEAD.
 1.23.2.4 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.23.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.23.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.23.2.1 05-Oct-2000  bouyer file machdep.c was added on branch thorpej_scsipi on 2000-11-20 20:07:00 +0000
 1.26.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.26.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.33.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.33.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.33.2.4 11-Feb-2002  jdolecek Sync w/ -current.
 1.33.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.33.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.33.2.1 03-Aug-2001  lukem update to -current
 1.34.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.35.4.9 18-Oct-2002  nathanw Catch up to -current.
 1.35.4.8 27-Aug-2002  nathanw Catch up to -current.
 1.35.4.7 13-Aug-2002  nathanw Catch up to -current.
 1.35.4.6 02-Jul-2002  nathanw LWPify. cobalt kernel builds (compile-tested only).
 1.35.4.5 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.35.4.4 29-May-2002  nathanw #include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)
 1.35.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.35.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.35.4.1 10-Sep-2001  nathanw file machdep.c was added on branch nathanw_sa on 2002-01-08 00:23:59 +0000
 1.37.8.1 30-Aug-2002  gehenna catch up with -current.
 1.43.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.43.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.43.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.43.2.2 03-Sep-2004  skrll Sync with HEAD
 1.43.2.1 03-Aug-2004  skrll Sync with HEAD
 1.50.2.1 11-Apr-2004  jmc Pullup rev 1.51 (requested by tsutsui in ticket #120)

Tidy up messages for total/avail memory.
 1.52.4.1 29-Apr-2005  kent sync with -current
 1.54.2.8 24-Mar-2008  yamt sync with head.
 1.54.2.7 21-Jan-2008  yamt sync with head
 1.54.2.6 07-Dec-2007  yamt sync with head
 1.54.2.5 15-Nov-2007  yamt sync with head.
 1.54.2.4 03-Sep-2007  yamt sync with head.
 1.54.2.3 26-Feb-2007  yamt sync with head.
 1.54.2.2 30-Dec-2006  yamt sync with head.
 1.54.2.1 21-Jun-2006  yamt sync with head.
 1.56.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.56.10.2 11-May-2006  elad sync with head
 1.56.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.56.8.5 14-Sep-2006  yamt sync with head.
 1.56.8.4 11-Aug-2006  yamt sync with head
 1.56.8.3 26-Jun-2006  yamt sync with head.
 1.56.8.2 24-May-2006  yamt sync with head.
 1.56.8.1 11-Apr-2006  yamt sync with head
 1.56.6.2 01-Jun-2006  kardel Sync with head.
 1.56.6.1 22-Apr-2006  simonb Sync with head.
 1.56.4.1 09-Sep-2006  rpaulo sync with head
 1.66.2.1 19-Jun-2006  chap Sync with head.
 1.72.2.2 12-Jan-2007  ad Sync with head.
 1.72.2.1 18-Nov-2006  ad Sync with head.
 1.75.6.3 03-Jun-2008  skrll Sync with netbsd-4.
 1.75.6.2 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.75.6.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.75.4.4 24-Mar-2008  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1104):
sys/arch/cobalt/cobalt/machdep.c: revision 1.93 via patch
Fix botched spl(9) bug I introduced back in 3.99.18 (rev 1.64):
Don't enable unhandled interrupts before all interrupts are processed.
Should fix "long download, network frozen" problems reported on
port-cobalt by several people.
 1.75.4.3 02-Feb-2008  riz Pull up following revision(s) (requested by tsutsui in ticket #1026):
sys/arch/cobalt/cobalt/machdep.c: revision 1.91
In icu_intr_establish(), don't panic if the specified irq
is already in use and just return NULL instead.
Such situation could happen with devices which have
unconfigured PCI interrupt pins (because firmware
doesn't configure multiple function devices) and
each driver could handle the return value properly.
 1.75.4.2 04-Nov-2007  pavel branches: 1.75.4.2.4;
Pull up following revisions (requested by tsutsui in ticket #974):
sys/arch/cobalt/cobalt/autoconf.c: revision 1.25-1.26
sys/arch/cobalt/cobalt/machdep.c: revision 1.89
sys/arch/cobalt/stand/boot/Makefile: revision 1.12
sys/arch/cobalt/stand/boot/boot.c: revision 1.10
sys/arch/cobalt/stand/boot/boot.h: revision 1.6
sys/arch/cobalt/stand/boot/cache.c: revision 1.1-1.2
sys/arch/cobalt/stand/boot/clock.c: revision 1.2
sys/arch/cobalt/stand/boot/conf.c: revision 1.5
sys/arch/cobalt/stand/boot/devopen.c: revision 1.4
sys/arch/cobalt/stand/boot/nif_tlp.c: revision 1.1
sys/arch/cobalt/stand/boot/start.S: revision 1.6
sys/arch/cobalt/stand/boot/tlp.c: revision 1.1-1.3
sys/arch/cobalt/stand/boot/version: revision 1.6
sys/lib/libsa/dev_net.h: revision 1.5
Add an extern decl of try_bootp variable here since MD sources could set it.

In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit

Assume netboot if "nfsroot=/path" is specified in bootstring.

Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().

Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.

Fix my stupid bug in cache flush code and remove one kludge for it.

- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.75.4.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.75.4.2.4.2 03-Sep-2008  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1104):
sys/arch/cobalt/cobalt/machdep.c: revision 1.93 via patch
Fix botched spl(9) bug I introduced back in 3.99.18 (rev 1.64):
Don't enable unhandled interrupts before all interrupts are processed.
Should fix "long download, network frozen" problems reported on
port-cobalt by several people.
 1.75.4.2.4.1 02-Feb-2008  riz Pull up following revision(s) (requested by tsutsui in ticket #1026):
sys/arch/cobalt/cobalt/machdep.c: revision 1.91
In icu_intr_establish(), don't panic if the specified irq
is already in use and just return NULL instead.
Such situation could happen with devices which have
unconfigured PCI interrupt pins (because firmware
doesn't configure multiple function devices) and
each driver could handle the return value properly.
 1.75.2.1 23-Sep-2006  yamt implement splraiseipl for cobalt.
 1.77.2.4 18-Apr-2007  ad - Further adaptations to MIPS for the yamt-idlelwp branch.
- Make curlwp a register variable on MIPS.
 1.77.2.3 24-Mar-2007  yamt sync with head.
 1.77.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.77.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.80.6.1 18-Mar-2007  reinoud First attempt to bring branch in sync with HEAD
 1.80.4.1 11-Jul-2007  mjf Sync with head.
 1.80.2.7 03-Dec-2007  ad Sync with HEAD.
 1.80.2.6 03-Dec-2007  ad Sync with HEAD.
 1.80.2.5 20-Aug-2007  ad Sync with HEAD.
 1.80.2.4 15-Jul-2007  ad Sync with head.
 1.80.2.3 09-Jun-2007  ad Sync with head.
 1.80.2.2 27-May-2007  ad Sync with head.
 1.80.2.1 10-Apr-2007  ad Sync with head.
 1.81.4.3 03-Oct-2007  garbled Sync with HEAD
 1.81.4.2 26-Jun-2007  garbled Sync with HEAD.
 1.81.4.1 22-May-2007  matt Update to HEAD.
 1.84.8.3 09-Dec-2007  jmcneill Sync with HEAD.
 1.84.8.2 28-Oct-2007  joerg Sync with HEAD.
 1.84.8.1 16-Aug-2007  jmcneill Sync with HEAD.
 1.84.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.87.6.1 13-Nov-2007  bouyer Sync with HEAD
 1.87.2.3 23-Mar-2008  matt sync with HEAD
 1.87.2.2 09-Jan-2008  matt sync with HEAD
 1.87.2.1 06-Nov-2007  matt sync with HEAD
 1.89.2.3 18-Feb-2008  mjf Sync with HEAD.
 1.89.2.2 27-Dec-2007  mjf Sync with HEAD.
 1.89.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.90.6.2 10-Jan-2008  bouyer Sync with HEAD
 1.90.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.90.2.1 26-Dec-2007  ad Sync with head.
 1.92.6.4 17-Jan-2009  mjf Sync with HEAD.
 1.92.6.3 02-Jul-2008  mjf Sync with HEAD.
 1.92.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.92.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.92.2.1 24-Mar-2008  keiichi sync with head.
 1.95.6.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.95.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.95.4.3 11-Mar-2010  yamt sync with head
 1.95.4.2 04-May-2009  yamt sync with head.
 1.95.4.1 16-May-2008  yamt sync with head.
 1.95.2.2 04-Jun-2008  yamt sync with head
 1.95.2.1 18-May-2008  yamt sync with head.
 1.97.2.1 03-Jul-2008  simonb Sync with head.
 1.98.10.6 14-Feb-2012  matt mem_cluster_cnt on mips is now a u_int.
 1.98.10.5 24-Dec-2010  matt mips_vector_init needs to be called sooner so that the spl routine are
instantiated.
 1.98.10.4 21-Mar-2010  cliff mips_vector_init now takes an argument to specify splsw.
NULL specifies use the default 'std_splsw'
 1.98.10.3 28-Feb-2010  matt Adapt to new common interrupts.
Enable cobalt64
 1.98.10.2 01-Feb-2010  matt fix fallout from frame/trapframe merger.
 1.98.10.1 07-Sep-2009  matt Deal with pcb_context being a label_t
 1.98.4.2 03-Mar-2009  skrll Sync with HEAD.
 1.98.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.98.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.101.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.108.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.109.6.1 05-Mar-2011  bouyer Sync with HEAD
 1.109.4.1 06-Jun-2011  jruoho Sync with HEAD.
 1.109.2.1 05-Mar-2011  rmind sync with head
 1.112.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.112.2.1 30-Oct-2012  yamt sync with head
 1.114.4.1 18-May-2014  rmind sync with head
 1.114.2.2 03-Dec-2017  jdolecek update from HEAD
 1.114.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.116.6.3 05-Feb-2017  skrll Sync with HEAD
 1.116.6.2 05-Oct-2016  skrll Sync with HEAD
 1.116.6.1 22-Sep-2015  skrll Sync with HEAD
 1.117.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.117.2.1 06-Aug-2016  pgoyette Sync with HEAD
 1.121.4.1 10-Jun-2019  christos Sync with HEAD
 1.22 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.21 24-Apr-2021  thorpej branches: 1.21.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.20 20-Jan-2018  skrll branches: 1.20.18;
Switch cobalt to common bus_space.

Tested on raq 2
 1.19 29-Jul-2014  skrll Convert cobalt to generic mips bus_dma.
 1.18 09-May-2008  tsutsui branches: 1.18.42; 1.18.58;
Split softc/device_t, with misc related changes.
 1.17 27-Mar-2008  tsutsui branches: 1.17.2; 1.17.4; 1.17.6;
Add kernel support for optional Z85C30 serial console on Cobalt Qube 2700.
There is some interrupt related issue (in MI z8530tty driver?) on heavy load,
but useful enough for debugging.
 1.16 18-Jul-2006  tsutsui branches: 1.16.58;
Remove obsolete comment.
 1.15 06-Apr-2006  tsutsui Use bus_space_map(9) to get bus_space_handle_t on each driver
and remove bogus bus_space_handle_t member from mainbus_attach_args.
 1.14 05-Apr-2006  tsutsui - ANSIfy
- KNF
- u_intXX_t -> uintXX_t
 1.13 11-Dec-2005  christos branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
merge ktrace-lwp.
 1.12 26-Aug-2005  drochner s/locdesc_t/int/g
 1.11 30-Jun-2005  drochner branches: 1.11.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.10 05-Jun-2005  tsutsui Make sure that struct mainbus_attach_args is actually allocated.

With the previous autoconf.c and mainbus.c, the memory in rodata section
which stores "mainbus" strings (for the second arg in config_rootfound())
is used to fill mainbus_attach_args in mainbus_search(). Oh well...
 1.9 28-Aug-2004  tsutsui - Use bus_space(9) to access PCI configuration registers on GT64111.
- Remove unused pci stuff from mainbus.c.
 1.8 12-Sep-2003  tsutsui TAB/space cleanup.
 1.7 15-Jul-2003  lukem __KERNEL_RCSID()
 1.6 01-Jan-2003  thorpej branches: 1.6.2;
Use aprint_normal() for cfprint routines.
 1.5 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.2 31-Mar-2000  soren branches: 1.2.6; 1.2.10; 1.2.14;
Some cleanups.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.2.14.2 03-Jan-2003  thorpej Sync with HEAD.
 1.2.14.1 18-Oct-2002  nathanw Catch up to -current.
 1.2.10.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 31-Mar-2000  bouyer file mainbus.c was added on branch thorpej_scsipi on 2000-11-20 20:07:01 +0000
 1.6.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.2 03-Sep-2004  skrll Sync with HEAD
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.2.2 30-Dec-2006  yamt sync with head.
 1.11.2.1 21-Jun-2006  yamt sync with head.
 1.13.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.13.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.13.8.2 11-Aug-2006  yamt sync with head
 1.13.8.1 11-Apr-2006  yamt sync with head
 1.13.6.1 22-Apr-2006  simonb Sync with head.
 1.13.4.1 09-Sep-2006  rpaulo sync with head
 1.16.58.2 02-Jun-2008  mjf Sync with HEAD.
 1.16.58.1 03-Apr-2008  mjf Sync with HEAD.
 1.17.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.17.4.1 16-May-2008  yamt sync with head.
 1.17.2.1 18-May-2008  yamt sync with head.
 1.18.58.1 10-Aug-2014  tls Rebase.
 1.18.42.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.18.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.20.18.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.20.18.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.20.18.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.20.18.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

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

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.21.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.2 21-Nov-2000  soren Same as sys/dev/md_root.c.
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.3 22-Nov-2000  bouyer Sync with HEAD.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file md_root.c was added on branch thorpej_scsipi on 2000-11-20 20:07:01 +0000
 1.3 13-Mar-2002  simonb All the mips ports had an identical procfs_machdep.c, so use a common
file under arch/mips/mips.
 1.2 18-Jan-2001  tv branches: 1.2.4; 1.2.8;
No-op commit to force update to a non-"-kk" revision.
 1.1 17-Jan-2001  fvdl branches: 1.1.2;
Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
 1.1.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.1.2.1 17-Jan-2001  bouyer file procfs_machdep.c was added on branch thorpej_scsipi on 2001-01-18 09:22:27 +0000
 1.2.8.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.2 06-Jan-2003  lukem Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile. Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
 1.1 19-Mar-2000  soren branches: 1.1.6; 1.1.14;
NetBSD/cobalt. Work-in-progress.
 1.1.14.1 07-Jan-2003  thorpej Sync with HEAD.
 1.1.6.2 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.1.6.1 19-Mar-2000  soren file .keep_me was added on branch thorpej_scsipi on 2000-03-19 23:07:45 +0000
 1.1 06-Jan-2003  lukem branches: 1.1.2;
Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile. Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
 1.1.2.2 07-Jan-2003  thorpej Sync with HEAD.
 1.1.2.1 06-Jan-2003  thorpej file Makefile was added on branch nathanw_sa on 2003-01-07 21:05:07 +0000
 1.174 29-Jan-2024  christos PR/57889: Ricardo Branco: ext2fs does not have user immutable and append
file flags, only system ones. Restrict those to the superuser. Before
the behavior was controlled by EXT2FS_SYSTEM_FLAGS. Make that behavior the
default.
 1.173 12-Feb-2023  abs Add optoion GENERIC.local include to the end of ~all GENERIC configs

This excludes atari, sgimips, evbmips, evbppc, evbsh3, and hpcarm
all of which have somewhat specific kernel config file layouts
 1.172 29-Sep-2022  riastradh branches: 1.172.4;
swwdog(4): Add to GENERIC kernels.

Plus a handful of others that I'm familiar with. Lots of special-
purpose kernels should probably have this too but I'm not going
through all the arm, mips, and ppc evaluation board kernels to see
which ones are relevant.

Omitted from systems I know to be very small:
- sun2/GENERIC
- dreamcast/GENERIC
Feel free to remove it from others that need to be kept smaller.

Compile-tested a few of these just in case:
- alpha/GENERIC
- amd64/GENERIC
- evbmips/OCTEON
- i386/GENERIC
- riscv/GENERIC

PR kern/29702
 1.171 07-Aug-2022  simonb UFS/LFS dirhash:
- Enable UFS_DIRHASH if the architecture or kernel model specific config
file can use 128MB of RAM or more.
- Remove experimental tag from UFS_DIRHASH; it's been with RUMP kernel
and by a number of NetBSD developers for years.
- Add LFS_DIRHASH if LFS was enabled.
- Be somewhat consistent with FS options order.
 1.170 27-Sep-2020  roy vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.169 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.168 16-Jun-2020  thorpej Disable DEBUG.
 1.167 25-Mar-2020  jdolecek remove 'file-system SMBFS' and 'pseudo-device nsmb' from all kernel configs
to prepare for their eventual removal
 1.166 25-Jan-2020  thorpej Retire "le* at pci?" from the shipped kernel configs:
- If the config had both an le@pci and a pcn, simply remove le@pci
(pcn would match at a higher priority anyway).
- If the config had le@pci enabled, but no pcn, change le@pci to pcn.
- If the config had le@pci commented out, but no pcn, change le@pci
to pcn and leave it commented out.

The pcn driver supports more chips than le@pci and does DMA directly
to/from mbufs rather than memory copies.
 1.165 20-Jan-2020  thorpej Remove FDDI support.
 1.164 19-Jan-2020  thorpej Remove HIPPI support and the esh(4) driver that uses it. There have not
been any users of HIPPI for some time, and it is unlikely to be resurrected.
 1.163 19-Jan-2020  thorpej Remove the strip(4) - Starmode Radio IP - pseudo-device driver. It is
long since obsolete.
 1.162 26-Apr-2019  sevan branches: 1.162.2; 1.162.4;
Enable BUFQ_PRIOCSCAN, CARP, Veriexec by default in GENERIC kernel configs.
On ports without a GENERIC kernel config enable in individul files, e.g evbmips.
Omit on:
atari, dreamcast, emips, epoc32, evbppc/VIRTEX*, ia64, luna68x, mvme68k,
mvmeppc, playstation2, riscv, sun2, sun3, x68k, zaurus due to resource
constraints or port infancy.
 1.161 12-Dec-2018  maxv Remove references to "lmc" in the kernel configurations.
 1.160 06-Sep-2018  maxv Retire the 'midway' driver. Discussed on tech-net@ recently and also three
years ago, part of removing the network ATM code.
 1.159 01-Aug-2018  maxv Unreference IPF/PF from all the config files, and enable NPF instead when
wanted. This also fixes some inconsistencies I saw in several files (eg
IPF options while IPF was not compiled, IPF+PF enabled by default, etc).
 1.158 09-Apr-2018  christos branches: 1.158.2;
rename panel to lcdpanel.
 1.157 09-Apr-2018  christos rename the cobalt panel to ledpanel to avoid conflict with fdt.
 1.156 23-Jan-2018  sevan branches: 1.156.2;
Alternate buffer queue strategies no longer considered experimental, update
description.

Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.155 20-Jan-2018  skrll Switch cobalt to common bus_space.

Tested on raq 2
 1.154 14-Sep-2017  mrg clean up COMPAT_* options for native netbsd code:
- new series of files that are useful for saying "i want everything
since netbsd 1.4", etc.
- use the fact COMPAT_* options have future dependancies to remove
many redundant options.

removes about 3000 lines total across kernel configuration files.
tested about 30 random kernels in the changed list.
 1.153 13-Sep-2017  sevan Remove support for VERIFIED_EXEC_FP_RMD160, VERIFIED_EXEC_FP_SHA1, and VERIFIED_EXEC_FP_MD5 options.
These algorithms are either broken or on their way to being broken.

Discussed on tech-security
http://mail-index.netbsd.org/tech-security/2017/08/21/msg000936.html

ok riastradh
 1.152 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.151 13-Dec-2016  christos branches: 1.151.8;
wildcard speaker attachments, now that we can handle many of them.
 1.150 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.149 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.148 08-Aug-2015  maxv branches: 1.148.2;
Remove KMEMSTATS.
 1.147 16-Nov-2014  manu branches: 1.147.2;
Remove unused extended attributes kernel options

As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
 1.146 12-Nov-2014  manu Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels

This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr

Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
 1.145 23-Aug-2014  dholland Systematize (and in many cases, fix) the comments on options COMPAT_NN.

There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
 1.144 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.143 20-Jul-2014  alnsn branches: 1.143.2;
Add commented out bpfjit options to mips kernels.
While here, add 2 missing RCS ids.
 1.142 30-Jun-2013  rmind branches: 1.142.4;
G/C PFIL_HOOKS from the kernel configs.
 1.141 05-Jun-2013  christos branches: 1.141.2;
remove obsolete networking options
 1.140 27-Apr-2013  christos more bogus number removal
 1.139 27-Apr-2013  christos the bogus number police
 1.138 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.137 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.136 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.135 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.134 10-Mar-2012  joerg branches: 1.134.2;
P1003_1B_SEMAPHORE is no longer optional.
 1.133 18-Dec-2011  dholland branches: 1.133.2;
WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.132 22-Nov-2011  tls branches: 1.132.2;

The rnd pseudo-device is not really optional, because it is in the same
source file as the entropy-pool code itself. Move it to std. This
will be cleaned up more when I split the sources up as they should be.

This fixes build breaks on several ports. Thanks to Havard Eidnes for
pointing them out.
 1.131 30-Jun-2011  wiz branches: 1.131.2;
dependant -> dependent
 1.130 03-May-2011  tsutsui TAB/space cosmetics.
 1.129 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.128 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).
 1.127 23-Nov-2010  hannken branches: 1.127.2; 1.127.4;
Remove unused count from pseudo-device md.
 1.126 08-May-2010  mrg enable IPFILTER_COMPAT in all kernels that have ipfilter already.
canonicalise several of the ipf option segments in various files
(this mostly means adding commented out IPFILTER_DEFAULT_BLOCK,
or adding commented or uncommented IPFILTER_LOG or IPFILTER_LOOKUP
option statements.)

i built about 20 of these kernels to check, but not all of them.
 1.125 29-Apr-2010  chs enable TMPFS in all GENERICs that have MFS enabled.
 1.124 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.123 05-Dec-2009  pooka branches: 1.123.2; 1.123.4;
Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.122 24-Jan-2009  mrg add COMPAT_50 to all the configs with COMPAT_40.
 1.121 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

Proposed on tech-kern@.
 1.120 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.119 30-Oct-2008  tsutsui branches: 1.119.6;
- fix (commented out) SBLive! driver name; it's emuxki, not sbl
- add commented out audio* at audiobus? line
 1.118 30-Oct-2008  tsutsui Enable smbfs, tested by several people on port-cobalt.
 1.117 10-Aug-2008  tls branches: 1.117.2;
Add accept filters to GENERIC kernels where they exist.
 1.116 31-Jul-2008  simonb Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.115 27-Mar-2008  tsutsui branches: 1.115.4; 1.115.6; 1.115.10;
Add zsc(4) and zstty(4) for Qube 2700.
 1.114 01-Mar-2008  tsutsui Comment out some PCIIDE devices which wouldn't be available for a PCI slot.
 1.113 01-Mar-2008  tsutsui Enable puc at pci and com at puc, which might be useful Qube2700.
 1.112 28-Feb-2008  tsutsui Add options COMPAT_40.
 1.111 31-Dec-2007  ad branches: 1.111.2; 1.111.6;
Remove systrace. Ok core@.
 1.110 04-Nov-2007  xtraeme branches: 1.110.2; 1.110.8;
Remove System V semaphores and share memory options to set the limits:
SEMMNI, SEMMNS, SEMUME and SHMMAXPGS.

They can be tweaked via sysctl now. Ports that were setting values on
them weren't touched, I only removed the ones that were commented out.
 1.109 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.108 04-Jun-2007  martin branches: 1.108.8; 1.108.10; 1.108.14;
Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
 1.107 18-Nov-2006  tsutsui branches: 1.107.2; 1.107.8; 1.107.10; 1.107.16; 1.107.18;
Remove options SOSEND_NO_LOAN. Now it's handled in mips/pmap.c.
 1.106 11-Nov-2006  jmmv Remove tmpfs's experimental status. OK'ed by core@.
 1.105 27-Sep-2006  manu - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.104 26-Aug-2006  christos branches: 1.104.2; 1.104.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.103 26-Aug-2006  tsutsui Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.102 22-Aug-2006  tsutsui Add options SOSEND_NO_LOAN. See the following comment for details:
---
# XXX Disable zero-copy page loaning in sosend() temporarily:
# PV mappings created by sosend_loan() in sys/kern/uipc_socket.c may
# produce virtual cache aliases and it seems to cause TLB MISS panic
# in cache flush code called from bus_dmamap_sync(9) PREWRITE ops
# during heavy TX packet traffic on tlp(4).
 1.101 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.100 19-Jul-2006  tsutsui branches: 1.100.2;
Use CPUFLAGS="-march=vr5000 -mabi=32".
 1.99 28-Jun-2006  liamjfoy Add CARP to GENERIC kernel configs. CARP is not enabled by default.

ok: christos
 1.98 18-May-2006  tsutsui branches: 1.98.4;
Enable options MIIVERBOSE.
 1.97 16-May-2006  tsutsui Add ral at pci, and enable pseudo-device pppoe.
Tested and reported by Markus W Kilbinger on port-cobalt.
 1.96 15-May-2006  tsutsui According to src/gnu/dist/binutils/gas/config/tc-mips.c
and src/gnu/dist/gcc/gcc/config/mips/mips.c,
CPUFLAGS="-mips2 -mtune=vr5000" is enough even for Rm523x CPUs.
 1.95 14-May-2006  tsutsui Specify CPUFLAGS for Rm523x:
> makeoptions CPUFLAGS="-mips2 -Wa,-mips2 -Wa,-mtune=rm5230"

before:
5693.654u 1059.921s 1:52:29.76 100.0% 0+0k 310+8815io 2493pf+0w

after:
5680.013u 983.282s 1:51:00.49 100.0% 0+0k 311+9015io 2494pf+0w
 1.94 15-Apr-2006  tsutsui Switch cobalt port to use MI todr(9) functions and MI mc146818 driver.
Tested on RaQ2 and Qube2 on port-cobalt.
 1.93 08-Apr-2006  tsutsui Enable some more options and devices:
http://mail-index.netbsd.org/port-cobalt/2006/04/06/0000.html

Tested by several people on port-cobalt.
 1.92 05-Feb-2006  cube branches: 1.92.2; 1.92.4; 1.92.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.91 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.90 02-Feb-2006  reinoud branches: 1.90.2;
Add commented out UDF file-system entry in all GENERIC configurations.
 1.89 20-Dec-2005  thorpej branches: 1.89.2; 1.89.4;
Remove the tablet line discipline.
 1.88 09-Dec-2005  elad Add (commented out) Veriexec options and pseudo-device to GENERIC kernels,
and remove the i386 GENERIC_VERIEXEC config.
 1.87 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.86 25-Nov-2005  thorpej swcr -> swcrypto
 1.85 25-Nov-2005  thorpej "pseudo-device crypto" really refers to the /dev/crypto API to the
opencrypto framework, not the framework itself. Update the comment
accordingly.
 1.84 25-Nov-2005  thorpej Add "pseudo-device swcr" (commented out if "pseudo-device crypto" is also
commented out).
 1.83 03-Nov-2005  chs branches: 1.83.2;
turn off DEBUG and DIAGNOSTIC in GENERIC kernels so that they
are compatible with the LKMs that are part of the release.
 1.82 10-Sep-2005  jmmv Initial addition of tmpfs, an efficient memory file-system. This project
was developed as part of Google's Summer of Code 2005 program. This
change adds the kernel code, the mount_tmpfs utility, a regression test
suite and does all other related changes to integrate these.

The file-system is still *experimental*. Therefore, it is disabled by
default in all kernels. However, as typically done, a commented-out
entry is added in them to ease its setup.

Note that I haven't commited the required mountd(8) changes to be able
to export tmpfs file-systems because NFS support is still very unstable
and because, before enabling it, I'd like to do some other changes.

OK'ed by my project mentor, William Studenmund (wrstuden@).
 1.81 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.80 19-Aug-2005  christos 64 bit inode changes.
 1.79 31-Jul-2005  yamt revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
 1.78 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.77 17-Jul-2005  hubertf Add support for reading cloop2 compressed filesystem image,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.76 11-Jul-2005  kiyohara ieee1394 import from FreeBSD.
 1.75 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.74 25-Jun-2005  rpaulo branches: 1.74.2;
Add file-system PTYFS (commented out) so that people know its existence.

Ok'ed by Christos Zoulas and Hubert Feyrer.
 1.73 09-Jun-2005  tsutsui - Rename options NEW_BUFQ_STRATEGY -> options BUFQ_READPRIO.
(still commented out)
- Add (also commented out) options BUFQ_PRIOCSCAN.

Suggested by perry and soda on tech-kern.
Please refer options(4) for details for these options.
 1.72 31-May-2005  tron Remove attachment for the piixide(4) driver from all non-x86 kernel
configurations because Intel IDE disk controllers only exist as part
of Intel chipsets for x86 systems.
 1.71 25-Mar-2005  tsutsui Switch cobalt port to use MI pci_configure_bus(9)
with options PCI_NETBSD_CONFIGURE.
Patch from KIYOHARA Takashi on port-cobalt.

This change makes siop(4) (and maybe all other PCI devices
using pci mem space) work on cobalt.
 1.70 25-Feb-2005  simonb branches: 1.70.2;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.69 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.68 11-Feb-2005  dsl Add 'option FFS_SNAPSHOT' to most of the config files.
Commented out for kernels that appear to hace space constraints.
 1.67 31-Jan-2005  hannken Add file system snapshots to kernel configs.

- Ffs internal snapshots get compiled in unconditionally.

- File system snapshot device fss(4) added to all kernel configs that
have a disk. Device is commented out on all non-GENERIC kernels.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
 1.66 28-Jan-2005  rumble Sprinkle options UFS_DIRHASH on GENERIC kernels. It's presently
commented out and labeled experimental pending further review and
testing.
 1.65 17-Jan-2005  cube branches: 1.65.2;
Add tap(4) support to a random^Wcarefully chosen set of kernel configs.
All those kernels have a line for both tun and bridge, and if either is
commented out, tap is commented out also. With the exception of i386's
GENERIC_TINY.

XXX: we _need_ some way of making this more simple.
 1.64 24-Nov-2004  bouyer branches: 1.64.4;
pdcsata(4), a driver for the Promise SATA150 (aka PDC203xx) serie of
controllers. Tested with a PDC20375 (2 SATA, one PATA) controller on sparc64.
Added to all kernel config file which had pdcide(4).
 1.63 10-Nov-2004  christos Add COMPAT_BSDPTY to the rest of the config files.
 1.62 04-Sep-2004  manu IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
 1.61 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.60 28-Jun-2004  bouyer Add options P1003_1B_SEMAPHORE
to all GENERIC-like kernel config files where SYSV* options were already
present (commented out if the SYSV* options are commented out).
Fix lib/25897 and lib/25898.
 1.59 26-Jun-2004  abs Add (commented out) ALTQ options to all GENERIC-like files
 1.58 22-Jun-2004  itojun have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
 1.57 18-Jun-2004  christos ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM
 1.56 16-Jun-2004  christos Add pseudo-device ptm on all the generic flavored kernels.
 1.55 01-May-2004  thorpej Rename the COM16650 option to COM_16650, for consistency with other
com variant options.
 1.54 14-Jan-2004  jonathan branches: 1.54.2;
Add support for opencrypto, PCI accelerators to sys/arch/*/conf/GENERIC
files for machines I know to have genuine PCI slots. As sent to tech-kern
for feedback in December 2003. Based on feedback, opencrypto is commented
out in the macppc GENERIC (due to absense of GENERIC_SOFTINT support),
and added to the sparc64 config (sys/arch/sparc64/conf/GENERIC32).
 1.53 14-Dec-2003  thorpej Split the Intel i31244 SATA controller ("Artisea") driver out of piixide
into its own driver (artsata).
 1.52 13-Dec-2003  thorpej Split out the Silicon Image SATALink support into its own driver,
"satalink".
 1.51 25-Oct-2003  simonb Add COMPAT_16 where missing.
Remove the unused COMPAT_15.
Comment out/remove COMPAT_* from INSTALL kernels.
 1.50 21-Oct-2003  tsutsui - Use one 'atabus* at ata?' instead of multiple 'atabus* at XXXide? channel ?'
- Comment out piixide. (can it be attached on cobalt?)
 1.49 17-Oct-2003  cdi Change console code to use cninit() and null console. Add serial console
check.
 1.48 14-Oct-2003  tsutsui Add options COMPAT_16.
 1.47 08-Oct-2003  bouyer Add new per-chip pciide drivers.
 1.46 08-Oct-2003  bouyer Add atabus
 1.45 07-Sep-2003  tsutsui Fix typo.
 1.44 06-Aug-2003  bouyer Add esiop at pci to GENERIC which already have siop at pci.
esiop has been tested enouth now.
esiop not added to INSTALL kernels because of possible space constraint.
siop should be able to drive all adapters supported by esiop.
 1.43 26-Apr-2003  ragge branches: 1.43.2;
Add pseudo-device ksyms.
 1.42 10-Apr-2003  christos Bye Bye UCONSOLE
 1.41 27-Feb-2003  perseant Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
 1.40 20-Jan-2003  soren Attachment for the HD44780 display and keypad on the front of Cobalt machines.
 1.39 22-Nov-2002  wiz Fix typo (responsiness -> responsiveness).
 1.38 18-Oct-2002  junyoung Add NEW_BUFQ_STRATEGY (disabled by default).
 1.37 14-Oct-2002  elric Added commented out cgd(4)s to GENERIC configs.
 1.36 06-Oct-2002  provos add SYSTRACE; approved perry.
 1.35 25-Sep-2002  martti Add one space between "#option" and "<tab>IPFILTER_DEFAULT_BLOCK"
 1.34 20-Sep-2002  martti Added (commented out) IPFILTER_DEFAULT_BLOCK.
 1.33 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.32 17-Jun-2002  lukem Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
 1.31 25-Apr-2002  atatat branches: 1.31.2; 1.31.4;
Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.30 17-Apr-2002  mycroft Switch from de to tlp by default.
 1.29 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.28 04-Mar-2002  sommerfeld The "gif*" tunnelling interface does everything ipip does.
Move usage example from ipip.4 to gif.4
Excise ipip and stitch up the scars.
 1.27 10-Feb-2002  wiz Update description for icsphy.
 1.26 27-Jan-2002  jdolecek add options PIPE_SOCKETPAIR to individual kernel configs
the option is commented out on everything but kernels I was able
to recognize as INSTALL-like or ones for small memory machines
 1.25 19-Jan-2002  oster Add new RF_* options for RAIDframe bits that are no longer built by default.

While we're here, enable RAIDframe (and RAID_AUTOCONFIG) by default for
architectures that I'm comfortable can deal with it being on by default.

Also: bump the number of 'raid' devices from 4 to 8, since 4 seems to
be insufficient in practise.
 1.24 28-Dec-2001  martin Add PPPoE to all generic kernels that should be able to use it.
XXX TODO: do this for INSTALL kernels too, add sysinst support and make the
XXX needed binaries available on the ramdisk root fs.
 1.23 14-Dec-2001  gmcgarry Add a blurb to the top of all GENERIC files. This serves three purposes:
- to clarify some terminology
- to clarify the intention of the GENERIC file
- to cross-reference some useful man pages
 1.22 23-Nov-2001  atatat The bridge(4) pseudo-device no longer requires the port to
__HAVE_GENERIC_SOFT_INTERRUPTS, so add it back to all GENERIC configs.
 1.21 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.20 01-Sep-2001  atatat branches: 1.20.6;
Comment out bridge pseudo devices from ports that don't
__HAVE_GENERIC_SOFT_INTERRUPTS. bridge(4) doesn't compile there.
 1.19 01-Sep-2001  atatat Add bridge pseudo devices to GENERIC configs
 1.18 22-Aug-2001  hubertf More comment changes: 90x[B] -> 90x[BC]
 1.17 08-Jul-2001  abs branches: 1.17.2;
Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
 1.16 30-Jun-2001  darcy Add System V semaphore resource limits to each GENERIC file that has an
option for System V semaphores. It appears that there are no overrides
in the code and each file has the following added.

options SYSVSEM # System V semaphores
+#options SEMMNI=10 # number of semaphore identifiers
+#options SEMMNS=60 # number of semaphores in system
+#options SEMUME=10 # max number of undo entries per process
+#options SEMMNU=30 # number of undo structures in system
options SYSVSHM # System V shared memory

If anyone thinks that this is incorrect for any of these files, please
correct it.

Note - the i386 port was not forgotten. It was done separately.
 1.15 16-Feb-2001  soren LKMs don't work on MIPS yet anyway, so disable it for now.
 1.14 19-Dec-2000  bouyer Add pseudo-device vlan
 1.13 24-Sep-2000  jdolecek branches: 1.13.2;
don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.12 13-Aug-2000  itojun move "options PULLDOWN_TEST" into sys/sys/mbuf.h (in #ifdef _KERNEL),
as it is no wthe default setting for everyone.

the reason we still use the name "PULLDOWN_TEST" while it is now default:
kame code sharing.
 1.11 30-Jun-2000  itojun add PULLDOWN_TEST for all the platforms.
XXX should be moved to somewhere else when stabilized
 1.10 27-Jun-2000  soren Shrink a little again to avoid firmware limits.
 1.9 22-Jun-2000  fvdl Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC.
 1.8 14-Jun-2000  veego branches: 1.8.2;
Remove the obsolete config fragments for kernel crypto, because the IPsec
crypto code is now in the kernel source tree.
 1.7 01-Jun-2000  soren Further cripple the GENERIC configuration. It seems that the firmware
limits are 1000000/2500000 bytes compressed/uncompressed. Sigh.
A boot loader would be nice.
 1.6 01-Jun-2000  soren Add ext2fs.
 1.5 08-May-2000  augustss branches: 1.5.2;
Add (sometimes commented out) MIIVERBOSE option.
 1.4 27-Apr-2000  soren Use siop(4).
 1.3 22-Apr-2000  groo name change; rl -> rtk. Still commented out.
 1.2 19-Apr-2000  itojun add stf pseudo interface (commented out due to possible security risks)
 1.1 30-Mar-2000  soren Customary GENERIC configuration.

Unfortunately, the Cobalt firmware seems to fail loading kernels larger
than about 2.5 megs before compression, so without a boot loader, this
is a rather amputated GENERIC.
 1.5.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.8.2.4 01-May-2001  he Pull up revision 1.14 (requested by he):
Add pseudo-device vlan.
Make sure "rnd is EXPERIMENTAL" comment is removed.
 1.8.2.3 14-Nov-2000  tv Pullup patch [soren]:
It appears that the 1.5 version of siop(4) does not work on at
least Cobalts without any SCSI devices attached, so disable it
for now.
 1.8.2.2 27-Jun-2000  soren Pull up rev. 1.10:
Shrink a little again to avoid firmware limits.
 1.8.2.1 23-Jun-2000  fvdl As on the trunk, update these for the move of ffs_softdep.c into the
kernel source itself. Remove prefix construction, and add the SOFTDEP
option to GENERIC kernels.
 1.13.2.6 02-Apr-2001  bouyer ahc compiles now, and it works on sparc64 so I can't see why it wouldn't
work on something else :)
 1.13.2.5 28-Mar-2001  bouyer ahc not ready yet.
 1.13.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.13.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.13.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.13.2.1 24-Sep-2000  bouyer file GENERIC was added on branch thorpej_scsipi on 2000-11-20 20:07:01 +0000
 1.17.2.8 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.17.2.7 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.17.2.6 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.17.2.5 16-Mar-2002  jdolecek Catch up with -current.
 1.17.2.4 11-Feb-2002  jdolecek Sync w/ -current.
 1.17.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.17.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.17.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.20.6.9 11-Dec-2002  thorpej Sync with HEAD.
 1.20.6.8 11-Nov-2002  nathanw Catch up to -current
 1.20.6.7 18-Oct-2002  nathanw Catch up to -current.
 1.20.6.6 20-Jun-2002  nathanw Catch up to -current.
 1.20.6.5 17-Apr-2002  nathanw Catch up to -current.
 1.20.6.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.20.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.20.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.20.6.1 01-Sep-2001  nathanw file GENERIC was added on branch nathanw_sa on 2002-01-08 00:23:59 +0000
 1.31.4.3 24-Oct-2002  lukem Pull up upgrade to IPfilter 3.4.29 (requested by martti in ticket #905).
Affected files & revisions:

dist/ipf/HISTORY 1.14
dist/ipf/fils.c 1.17-1.21
dist/ipf/ipf.c 1.11-1.13
dist/ipf/ipfs.c 1.8-1.10
dist/ipf/ipft_ef.c 1.6-1.7
dist/ipf/ipft_td.c 1.6-1.7
dist/ipf/ipft_tx.c 1.7-1.8
dist/ipf/ipmon.c 1.12-1.17
dist/ipf/ipnat.c 1.11-1.12
dist/ipf/ipsend/ip_var.h 1.2
dist/ipf/ipsend/ipsend.c 1.8
dist/ipf/ipsend/iptests.c 1.5
dist/ipf/ipt.c 1.8-1.10
dist/ipf/kmem.c 1.8-1.10
dist/ipf/man/ipf.4 1.10
dist/ipf/man/ipf.5 1.8
dist/ipf/man/ipftest.1 1.3
dist/ipf/man/ipmon.8 1.10
dist/ipf/man/ipnat.5 1.9-1.10
dist/ipf/man/ipnat.8 1.4
dist/ipf/misc.c 1.7
dist/ipf/natparse.c 1.10
dist/ipf/parse.c 1.13
dist/ipf/printnat.c 1.8-1.10
dist/ipf/relay.c 1.5-1.6
dist/ipf/rules/example.9 1.2
etc/rc.d/ipnat 1.8
regress/sys/kern/ipf/Makefile 1.3-1.4
regress/sys/kern/ipf/dotest6 1.2
regress/sys/kern/ipf/expected/f13 1.1.1.2
regress/sys/kern/ipf/expected/i12 1.1.1.1
regress/sys/kern/ipf/expected/ni3 1.1.1.1
regress/sys/kern/ipf/expected/ni5 1.2
regress/sys/kern/ipf/input/f13 1.1.1.2
regress/sys/kern/ipf/input/ipv6.1 1.1.1.1
regress/sys/kern/ipf/input/ni3 1.1.1.1
regress/sys/kern/ipf/regress/i12 1.1.1.1
regress/sys/kern/ipf/regress/ipv6.1 1.1.1.1
regress/sys/kern/ipf/regress/ni3.ipf 1.1.1.1
regress/sys/kern/ipf/regress/ni3.nat 1.1.1.1
sys/arch/alpha/conf/ALPHA 1.169,1.171
sys/arch/amiga/conf/GENERIC 1.185-1.186
sys/arch/arc/conf/GENERIC 1.71-1.72
sys/arch/atari/conf/GENERIC.in 1.24-1.25
sys/arch/cats/conf/GENERIC 1.31-1.32
sys/arch/cobalt/conf/GENERIC 1.34-1.35
sys/arch/hp300/conf/GENERIC 1.83-1.84
sys/arch/i386/conf/CARDBUS 1.66-1.67
sys/arch/i386/conf/GENERIC 1.510,1.512
sys/arch/i386/conf/GENERIC_LAPTOP 1.58-1.59
sys/arch/i386/conf/GENERIC_PS2TINY 1.19-1.20
sys/arch/i386/conf/GENERIC_TINY 1.47-1.48
sys/arch/luna68k/conf/GENERIC 1.33-1.33
sys/arch/mac68k/conf/GENERIC 1.130-1.131
sys/arch/mac68k/conf/GENERICSBC 1.21-1.22
sys/arch/mac68k/conf/SMALLRAM 1.4-1.5
sys/arch/macppc/conf/GENERIC 1.142-1.143
sys/arch/mipsco/conf/GENERIC 1.21-1.22
sys/arch/mmeye/conf/GENERIC 1.44-1.45
sys/arch/news68k/conf/GENERIC 1.36-1.37
sys/arch/news68k/conf/GENERIC_TINY 1.18-1.19
sys/arch/newsmips/conf/GENERIC 1.50-1.51
sys/arch/ofppc/conf/GENERIC 1.56-1.57
sys/arch/pmax/conf/GENERIC 1.103-1.104
sys/arch/prep/conf/GENERIC 1.55-1.56
sys/arch/sbmips/conf/GENERIC 1.11-1.12
sys/arch/sgimips/conf/GENERIC 1.7-1.8
sys/arch/sparc/conf/GENERIC 1.138-1.139
sys/arch/sparc64/conf/GENERIC32 1.46-1.47
sys/arch/vax/conf/GENERIC 1.102-1.103
sys/arch/x68k/conf/ALL 1.55-1.56
sys/arch/x68k/conf/GENERIC 1.80-1.81
sys/lkm/netinet/if_ipl/mln_ipl.c 1.29
sys/netinet/fil.c 1.57-1.58
sys/netinet/ip_auth.c 1.29-1.30
sys/netinet/ip_compat.h 1.30-1.31
sys/netinet/ip_fil.c 1.81-1.86
sys/netinet/ip_fil.h 1.46-1.49
sys/netinet/ip_frag.c 1.33-1.34
sys/netinet/ip_frag.h 1.18
sys/netinet/ip_ftp_pxy.c 1.25-1.26
sys/netinet/ip_h323_pxy.c 1.5-1.6
sys/netinet/ip_log.c 1.22-1.23
sys/netinet/ip_nat.c 1.51-1.53
sys/netinet/ip_nat.h 1.27
sys/netinet/ip_netbios_pxy.c 1.4
sys/netinet/ip_proxy.c 1.35-1.36
sys/netinet/ip_proxy.h 1.18
sys/netinet/ip_state.c 1.41-1.42
sys/netinet/ip_state.h 1.23
sys/netinet/ipl.h 1.14
 1.31.4.2 01-Sep-2002  lukem Apply patch provided by soren in ticket #750, as described below:

some recent changes have contributed to pushing the /cobalt 1.6 kernel
over the firmware size limit [yes, the port does need a boot loader].

For 1.6, removing the raid and siop drivers from GENERIC along with
gzip -4'ing kernels gives us the required headroom.
 1.31.4.1 01-Aug-2002  lukem Pull up revision 1.32 (requested by lukem in ticket #312):
Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
 1.31.2.1 14-Jul-2002  gehenna catch up with -current.
 1.43.2.12 11-Dec-2005  christos Sync with head.
 1.43.2.11 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.43.2.10 01-Apr-2005  skrll Sync with HEAD.
 1.43.2.9 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.43.2.8 15-Feb-2005  skrll Sync with HEAD.
 1.43.2.7 04-Feb-2005  skrll Sync with HEAD.
 1.43.2.6 24-Jan-2005  skrll Sync with HEAD.
 1.43.2.5 29-Nov-2004  skrll Sync with HEAD.
 1.43.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.43.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.43.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.43.2.1 03-Aug-2004  skrll Sync with HEAD
 1.54.2.3 15-Jul-2004  he branches: 1.54.2.3.2;
Pull up revision 1.61 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.54.2.2 02-Jul-2004  he Pull up revision 1.60 (requested by bouyer in ticket #573):
Add options P1003_1B_SEMAPHORE to all GENERIC-like kernel
config files where SYSV* options were already present
(commented out if the SYSV* options are commented out).
Fixes PR#25897 and PR#25898.
 1.54.2.1 30-Jun-2004  jdc Pull up revision 1.59 (requested by abs in ticket #567).

Add (commented out) ALTQ options to all GENERIC-like files
 1.54.2.3.2.1 02-Apr-2005  he Pull up revision 1.64 (requested by bouyer in ticket #1019):
Add pdcsata(4), a driver for the Promise SATA150 (aka PDC203xx) series of
controllers.
 1.64.4.1 29-Apr-2005  kent sync with -current
 1.65.2.3 26-Mar-2005  yamt sync with head.
 1.65.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.65.2.1 12-Feb-2005  yamt sync with head.
 1.70.2.6 25-Aug-2006  ghen Pull up following revision(s) (requested by tsutsui in ticket #1478):
sys/arch/cobalt/conf/GENERIC: revision 1.102
sys/arch/cobalt/conf/INSTALL: revision 1.24
Add options SOSEND_NO_LOAN. See the following comment for details:
---
 1.70.2.5 05-Nov-2005  tron branches: 1.70.2.5.2;
Pull up following revision(s) (requested by chs in ticket #929):
sys/arch/hp300/conf/GENERIC: revision 1.124
sys/arch/acorn32/conf/GENERIC: revision 1.62
sys/arch/pdp10/conf/GENERIC: revision 1.19
sys/arch/mvme68k/conf/GENERIC: revision 1.61
sys/arch/netwinder/conf/GENERIC: revision 1.70
sys/arch/sbmips/conf/GENERIC: revision 1.46
sys/arch/macppc/conf/GENERIC: revision 1.214
sys/arch/bebox/conf/GENERIC: revision 1.89
sys/arch/cobalt/conf/GENERIC: revision 1.83
sys/arch/cats/conf/GENERIC: revision 1.92
sys/arch/shark/conf/GENERIC: revision 1.53
sys/arch/amiga/conf/GENERIC.in: revision 1.45
sys/arch/acorn26/conf/GENERIC: revision 1.37
sys/arch/cesfic/conf/GENERIC: revision 1.38
sys/arch/iyonix/conf/GENERIC: revision 1.21
sys/arch/alpha/conf/GENERIC: revision 1.277
sys/arch/vax/conf/GENERIC: revision 1.143
sys/arch/atari/conf/GENERIC.in: revision 1.56
sys/arch/mipsco/conf/GENERIC: revision 1.53
sys/arch/ofppc/conf/GENERIC: revision 1.85
sys/arch/next68k/conf/GENERIC: revision 1.96
sys/arch/arc/conf/GENERIC: revision 1.125
sys/arch/dreamcast/conf/GENERIC: revision 1.62
turn off DEBUG and DIAGNOSTIC in GENERIC kernels so that they
are compatible with the LKMs that are part of the release.
 1.70.2.4 14-Aug-2005  riz Pull up revision 1.77 (requested by hubertf in ticket #625):
Add support for reading cloop2 compressed filesystem images,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.70.2.3 18-Jul-2005  riz Pull up revision 1.75 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.70.2.2 01-Jun-2005  riz Pull up revision 1.72 (requested by tron in ticket #362):
Remove attachment for the piixide(4) driver from all non-x86 kernel
configurations because Intel IDE disk controllers only exist as part
of Intel chipsets for x86 systems.
 1.70.2.1 27-Mar-2005  tron Pull up revision 1.71 (requested by tsutsui in ticket #67):
Switch cobalt port to use MI pci_configure_bus(9)
with options PCI_NETBSD_CONFIGURE.
Patch from KIYOHARA Takashi on port-cobalt.
This change makes siop(4) (and maybe all other PCI devices
using pci mem space) work on cobalt.
 1.70.2.5.2.1 26-Aug-2006  ghen Pull up following revision(s) (requested by tsutsui in ticket #1478):
sys/arch/cobalt/conf/GENERIC: revision 1.102
sys/arch/cobalt/conf/INSTALL: revision 1.24
Add options SOSEND_NO_LOAN. See the following comment for details:
---
 1.74.2.6 17-Mar-2008  yamt sync with head.
 1.74.2.5 21-Jan-2008  yamt sync with head
 1.74.2.4 15-Nov-2007  yamt sync with head.
 1.74.2.3 03-Sep-2007  yamt sync with head.
 1.74.2.2 30-Dec-2006  yamt sync with head.
 1.74.2.1 21-Jun-2006  yamt sync with head.
 1.83.2.1 29-Nov-2005  yamt sync with head.
 1.89.4.1 09-Sep-2006  rpaulo sync with head
 1.89.2.1 18-Feb-2006  yamt sync with head.
 1.90.2.2 01-Jun-2006  kardel Sync with head.
 1.90.2.1 22-Apr-2006  simonb Sync with head.
 1.92.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.92.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.92.2.4 03-Sep-2006  yamt sync with head.
 1.92.2.3 11-Aug-2006  yamt sync with head
 1.92.2.2 24-May-2006  yamt sync with head.
 1.92.2.1 11-Apr-2006  yamt sync with head
 1.98.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.100.2.3 22-Sep-2006  riz Pull up following revision(s) (requested by tsutsui in ticket #170):
sys/arch/sparc64/conf/GENERIC: revision 1.63
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.55
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.54
sys/arch/next68k/conf/GENERIC: revision 1.105
sys/arch/ews4800mips/conf/GENERIC: revision 1.12
sys/arch/arc/conf/GENERIC: revision 1.142
sys/arch/sun3/conf/GENERIC3X: revision 1.91
sys/arch/amd64/conf/GENERIC: revision 1.105
sys/arch/sun2/conf/GENERIC: revision 1.58
sys/arch/amiga/conf/GENERIC.in: revision 1.55
sys/arch/mac68k/conf/GENERIC: revision 1.175
sys/arch/acorn26/conf/GENERIC: revision 1.46
sys/arch/shark/conf/GENERIC: revision 1.65
sys/arch/cesfic/conf/GENERIC: revision 1.45
sys/arch/sandpoint/conf/GENERIC: revision 1.36
sys/arch/iyonix/conf/GENERIC: revision 1.32
sys/arch/mvme68k/conf/GENERIC: revision 1.69
sys/arch/evbarm/conf/ARMADILLO210: revision 1.3
sys/arch/vax/conf/GENERIC: revision 1.154
sys/arch/mipsco/conf/GENERIC: revision 1.61
sys/arch/evbarm/conf/ARMADILLO9: revision 1.14
sys/arch/cobalt/conf/GENERIC: revision 1.103
sys/arch/ofppc/conf/GENERIC: revision 1.94
sys/arch/hp700/conf/GENERIC: revision 1.69
sys/arch/playstation2/conf/GENERIC: revision 1.8
sys/arch/dreamcast/conf/GENERIC: revision 1.73
sys/arch/news68k/conf/GENERIC: revision 1.81
sys/arch/macppc/conf/GENERIC: revision 1.234
sys/arch/hp300/conf/GENERIC: revision 1.134
sys/arch/mmeye/conf/GENERIC: revision 1.83
sys/arch/ibmnws/conf/GENERIC: revision 1.26
sys/arch/cats/conf/GENERIC: revision 1.109
sys/arch/sparc/conf/GENERIC: revision 1.191
sys/arch/pdp10/conf/GENERIC: revision 1.27
sys/arch/acorn32/conf/GENERIC: revision 1.75
sys/arch/luna68k/conf/GENERIC: revision 1.74
sys/arch/bebox/conf/GENERIC: revision 1.101
sys/arch/pmax/conf/GENERIC: revision 1.148
sys/arch/x68k/conf/GENERIC: revision 1.130
sys/arch/sun3/conf/GENERIC: revision 1.134
sys/arch/prep/conf/GENERIC: revision 1.126
sys/arch/alpha/conf/GENERIC: revision 1.293
sys/arch/newsmips/conf/GENERIC: revision 1.94
sys/arch/netwinder/conf/GENERIC: revision 1.83
sys/arch/hpcsh/conf/GENERIC: revision 1.69
sys/arch/sbmips/conf/GENERIC: revision 1.55
sys/arch/pc532/conf/GENERIC: revision 1.65
sys/arch/hpcmips/conf/GENERIC: revision 1.192
Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.100.2.2 25-Aug-2006  ghen Pull up following revision(s) (requested by tsutsui in ticket #60):
sys/arch/cobalt/conf/GENERIC: revision 1.102
sys/arch/cobalt/conf/INSTALL: revision 1.24
Add options SOSEND_NO_LOAN. See the following comment for details:
---
 1.100.2.1 14-Aug-2006  tron Pull up following revision(s) (requested by elad in ticket #17):
sys/arch/sparc/conf/KRUPS: revision 1.38
sys/arch/i386/conf/XEN2_DOMU: revision 1.2
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.197
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.53
sys/arch/evbsh5/conf/SIMULATOR: revision 1.12
sys/arch/sparc/conf/MRCOFFEE: revision 1.17
sys/arch/next68k/conf/GENERIC: revision 1.104
sys/arch/i386/conf/VIRTUALPC: revision 1.44
sys/arch/ews4800mips/conf/GENERIC: revision 1.11
sys/arch/evbsh5/conf/CAYMAN: revision 1.23
sys/arch/arc/conf/GENERIC: revision 1.141
sys/arch/amd64/conf/GENERIC: revision 1.103
sys/arch/sun3/conf/GENERIC3X: revision 1.90
sys/arch/evbarm/conf/HDL_G: revision 1.3
sys/arch/sun2/conf/GENERIC: revision 1.57
sys/arch/news68k/conf/GENERIC_TINY: revision 1.51
sys/arch/evbppc/conf/EXPLORA451: revision 1.27
sys/arch/amiga/conf/GENERIC.in: revision 1.54
sys/arch/mac68k/conf/GENERIC: revision 1.174
sys/arch/acorn26/conf/GENERIC: revision 1.45
sys/arch/shark/conf/GENERIC: revision 1.64
sys/arch/cesfic/conf/GENERIC: revision 1.44
sys/arch/mvme68k/conf/GENERIC: revision 1.68
sys/arch/i386/conf/XEN2_DOM0: revision 1.4
sys/arch/atari/conf/GENERIC.in: revision 1.63
sys/arch/amiga/conf/GENERIC: revision 1.240
sys/arch/i386/conf/LAMB: revision 1.65
sys/arch/i386/conf/GENERIC: revision 1.773
sys/arch/acorn32/conf/EB7500ATX: revision 1.26
sys/arch/x68k/conf/GENERIC: revision 1.128
sys/arch/vax/conf/GENERIC: revision 1.153
sys/arch/atari/conf/ATARITT: revision 1.81
sys/arch/mipsco/conf/GENERIC: revision 1.60
sys/arch/cobalt/conf/GENERIC: revision 1.101
sys/arch/evbarm/conf/ARMADILLO9: revision 1.13
sys/arch/ofppc/conf/GENERIC: revision 1.93
sys/arch/atari/conf/MILAN-PCIIDE: revision 1.51
sys/arch/arc/conf/RPC44: revision 1.26
sys/arch/sparc64/conf/GENERIC: revision 1.59
sys/arch/i386/conf/XEN3_DOMU: revision 1.2
sys/arch/hp700/conf/GENERIC: revision 1.68
sys/arch/atari/conf/MILAN-ISAIDE: revision 1.47
sys/arch/macppc/conf/GENERIC: revision 1.231
sys/arch/dreamcast/conf/GENERIC: revision 1.72
sys/arch/news68k/conf/GENERIC: revision 1.80
sys/arch/hp300/conf/GENERIC: revision 1.133
sys/arch/mmeye/conf/GENERIC: revision 1.82
sys/arch/macppc/conf/MAMBO: revision 1.2
sys/arch/cats/conf/GENERIC: revision 1.107
sys/arch/atari/conf/FALCON: revision 1.79
sys/arch/acorn32/conf/GENERIC: revision 1.71
sys/arch/sparc/conf/GENERIC: revision 1.190
sys/arch/news68k/conf/LIBERO: revision 1.40
sys/arch/amiga/conf/DRACO: revision 1.114
sys/arch/cobalt/conf/INSTALL: revision 1.23
sys/arch/luna68k/conf/GENERIC: revision 1.73
sys/arch/bebox/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.147
sys/arch/amiga/conf/WSCONS: revision 1.52
sys/arch/macppc/conf/POWERMAC_G5: revision 1.2
sys/arch/alpha/conf/ALPHA: revision 1.218
sys/arch/sun3/conf/GENERIC: revision 1.133
sys/arch/prep/conf/GENERIC: revision 1.124
sys/arch/alpha/conf/GENERIC: revision 1.291
sys/arch/atari/conf/HADES: revision 1.71
sys/arch/newsmips/conf/GENERIC: revision 1.93
sys/arch/netwinder/conf/GENERIC: revision 1.82
sys/arch/hpcmips/conf/GENERIC: revision 1.190
sys/arch/amiga/conf/AMIGA: revision 1.98
sys/arch/sbmips/conf/GENERIC: revision 1.54
sys/arch/pc532/conf/GENERIC: revision 1.64
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.53
Disable SYSTRACE by default on all kernels (discussed with core)
 1.104.4.2 10-Dec-2006  yamt sync with head.
 1.104.4.1 22-Oct-2006  yamt sync with head
 1.104.2.2 12-Jan-2007  ad Sync with head.
 1.104.2.1 18-Nov-2006  ad Sync with head.
 1.107.18.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.107.16.1 26-Jun-2007  garbled Sync with HEAD.
 1.107.10.1 11-Jul-2007  mjf Sync with head.
 1.107.8.2 03-Dec-2007  ad Sync with HEAD.
 1.107.8.1 09-Jun-2007  ad Sync with head.
 1.107.2.1 05-Jun-2007  bouyer Pull up following revision(s) (requested by martin in ticket #699):
sys/arch/hpcmips/conf/GENERIC: revision 1.196
sys/arch/hp700/conf/GENERIC: revision 1.74
sys/arch/i386/conf/GENERIC: revision 1.831
sys/arch/next68k/conf/GENERIC: revision 1.108
sys/arch/alpha/conf/GENERIC: revision 1.313
sys/arch/arc/conf/GENERIC: revision 1.146
sys/arch/cats/conf/GENERIC: revision 1.115
sys/arch/ews4800mips/conf/GENERIC: revision 1.18
sys/arch/landisk/conf/GENERIC: revision 1.8 via patch
sys/arch/sparc64/conf/GENERIC: revision 1.85
sys/arch/pmax/conf/GENERIC: revision 1.152
sys/arch/iyonix/conf/GENERIC: revision 1.38 via patch
sys/arch/amiga/conf/GENERIC: revision 1.245
sys/arch/vax/conf/GENERIC: revision 1.157
sys/arch/prep/conf/GENERIC: revision 1.135
sys/arch/pc532/conf/GENERIC: revision 1.70
sys/arch/sbmips/conf/GENERIC: revision 1.61
sys/arch/mipsco/conf/GENERIC: revision 1.65
sys/arch/cobalt/conf/GENERIC: revision 1.108
sys/arch/ofppc/conf/GENERIC: revision 1.98
sys/arch/amd64/conf/GENERIC: revision 1.148
sys/arch/acorn26/conf/GENERIC: revision 1.50
sys/arch/dreamcast/conf/GENERIC: revision 1.78
sys/arch/mac68k/conf/GENERIC: revision 1.181
sys/arch/hp300/conf/GENERIC: revision 1.139
sys/arch/mmeye/conf/GENERIC: revision 1.88
sys/arch/news68k/conf/GENERIC: revision 1.88
sys/arch/mvme68k/conf/GENERIC: revision 1.71
sys/arch/acorn32/conf/GENERIC: revision 1.79
sys/arch/sparc/conf/GENERIC: revision 1.199
sys/arch/luna68k/conf/GENERIC: revision 1.78
sys/arch/bebox/conf/GENERIC: revision 1.105
sys/arch/macppc/conf/GENERIC: revision 1.256 via patch
sys/arch/x68k/conf/GENERIC: revision 1.134
sys/arch/sun3/conf/GENERIC: revision 1.138
sys/arch/newsmips/conf/GENERIC: revision 1.98
Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
 1.108.14.1 13-Nov-2007  bouyer Sync with HEAD
 1.108.10.3 23-Mar-2008  matt sync with HEAD
 1.108.10.2 09-Jan-2008  matt sync with HEAD
 1.108.10.1 06-Nov-2007  matt sync with HEAD
 1.108.8.1 04-Nov-2007  jmcneill Sync with HEAD.
 1.110.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.110.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.111.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.111.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.111.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.111.2.1 24-Mar-2008  keiichi sync with head.
 1.115.10.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.115.10.1 19-Oct-2008  haad Sync with HEAD.
 1.115.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.115.4.3 11-Aug-2010  yamt sync with head.
 1.115.4.2 11-Mar-2010  yamt sync with head
 1.115.4.1 04-May-2009  yamt sync with head.
 1.117.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.117.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.119.6.1 28-Feb-2010  matt Adapt to new common interrupts.
Enable cobalt64
 1.123.4.4 31-May-2011  rmind sync with head
 1.123.4.3 21-Apr-2011  rmind sync with head
 1.123.4.2 05-Mar-2011  rmind sync with head
 1.123.4.1 30-May-2010  rmind sync with head
 1.123.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.123.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.127.4.2 05-Mar-2011  bouyer Sync with HEAD
 1.127.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.127.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.131.2.3 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.131.2.2 30-Oct-2012  yamt sync with head
 1.131.2.1 17-Apr-2012  yamt sync with head
 1.132.2.2 11-Mar-2012  mrg sync to latest -current
 1.132.2.1 18-Feb-2012  mrg merge to -current.
 1.133.2.1 15-Aug-2012  sborrill Pull up the following revisions(s) (requested by martin in ticket #502):
sys/arch/cobalt/conf/GENERIC: patch
sys/arch/i386/conf/GENERIC: patch
sys/arch/i386/conf/XEN3_DOM0: patch
sys/arch/i386/conf/XEN3_DOMU: patch
sys/arch/mvmeppc/conf/GENERIC: patch
sys/arch/shark/conf/GENERIC: patch
sys/arch/sparc64/conf/GENERIC: patch
sys/arch/sparc64/conf/GENERIC.DEBUG: patch
sys/arch/zaurus/conf/GENERIC: patch

Switch off DIAGNOSTIC and/or DEBUG on release kernels.
Enable DIAGNOSTIC in DEBUG kernels to allow for option
being switched off in GENERIC.
 1.134.2.4 03-Dec-2017  jdolecek update from HEAD
 1.134.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.134.2.2 23-Jun-2013  tls resync from head
 1.134.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.141.2.1 28-Aug-2013  rmind sync with head
 1.142.4.1 10-Aug-2014  tls Rebase.
 1.143.2.3 18-Nov-2014  snj Pull up following revision(s) (requested by manu in ticket #251):
sys/arch/acorn26/conf/GENERIC: revision 1.81
sys/arch/acorn32/conf/GENERIC: revision 1.116
sys/arch/alpha/conf/GENERIC: revision 1.362
sys/arch/amd64/conf/ALL: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.404
sys/arch/amd64/conf/XEN3_DOM0: revision 1.112
sys/arch/amd64/conf/XEN3_DOMU: revision 1.60
sys/arch/amiga/conf/GENERIC.in: revision 1.129
sys/arch/amiga/conf/GENERIC: revision 1.311
sys/arch/amigappc/conf/GENERIC: revision 1.24
sys/arch/arc/conf/GENERIC: revision 1.184
sys/arch/bebox/conf/GENERIC: revision 1.145
sys/arch/cats/conf/GENERIC: revision 1.155
sys/arch/cesfic/conf/GENERIC: revision 1.65
sys/arch/cobalt/conf/GENERIC: revision 1.147
sys/arch/dreamcast/conf/GENERIC: revision 1.121
sys/arch/emips/conf/GENERIC: revision 1.15
sys/arch/epoc32/conf/GENERIC: revision 1.8
sys/arch/ews4800mips/conf/GENERIC: revision 1.51
sys/arch/hp300/conf/GENERIC: revision 1.190
sys/arch/hpcmips/conf/GENERIC: revision 1.229
sys/arch/hpcsh/conf/GENERIC: revision 1.106
sys/arch/hppa/conf/GENERIC: revision 1.6
sys/arch/i386/conf/ALL: revision 1.389
sys/arch/i386/conf/GENERIC: revision 1.1118
sys/arch/i386/conf/XEN3_DOM0: revision 1.93
sys/arch/i386/conf/XEN3_DOMU: revision 1.65
sys/arch/ibmnws/conf/GENERIC: revision 1.46
sys/arch/iyonix/conf/GENERIC: revision 1.88
sys/arch/landisk/conf/GENERIC: revision 1.45
sys/arch/luna68k/conf/GENERIC: revision 1.119
sys/arch/mac68k/conf/GENERIC: revision 1.220
sys/arch/macppc/conf/GENERIC: revision 1.320
sys/arch/macppc/conf/MAMBO: revision 1.24
sys/arch/macppc/conf/POWERMAC_G5: revision 1.25
sys/arch/mipsco/conf/GENERIC: revision 1.88
sys/arch/mmeye/conf/GENERIC: revision 1.120
sys/arch/mvme68k/conf/GENERIC: revision 1.94
sys/arch/mvmeppc/conf/GENERIC: revision 1.24
sys/arch/netwinder/conf/GENERIC: revision 1.126
sys/arch/news68k/conf/GENERIC: revision 1.125
sys/arch/newsmips/conf/GENERIC: revision 1.129
sys/arch/next68k/conf/GENERIC: revision 1.139
sys/arch/ofppc/conf/GENERIC: revision 1.157
sys/arch/pmax/conf/GENERIC64: revision 1.21
sys/arch/pmax/conf/GENERIC: revision 1.185
sys/arch/prep/conf/GENERIC: revision 1.174
sys/arch/rs6000/conf/GENERIC: revision 1.33
sys/arch/sandpoint/conf/GENERIC: revision 1.88
sys/arch/sbmips/conf/GENERIC: revision 1.101
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.28
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.104
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.106
sys/arch/shark/conf/GENERIC: revision 1.121
sys/arch/sparc/conf/GENERIC: revision 1.248
sys/arch/sparc/conf/TADPOLE3GX: revision 1.65
sys/arch/sparc64/conf/GENERIC: revision 1.177
sys/arch/sparc64/conf/NONPLUS64: revision 1.44
sys/arch/sun2/conf/GENERIC: revision 1.94
sys/arch/sun3/conf/GENERIC: revision 1.171
sys/arch/vax/conf/GENERIC: revision 1.193
sys/arch/vax/conf/VAX780: revision 1.19
sys/arch/x68k/conf/GENERIC: revision 1.179
sys/arch/zaurus/conf/GENERIC: revision 1.65
sys/ufs/files.ufs: revision 1.38
Remove unused extended attributes kernel options

As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
 1.143.2.2 14-Nov-2014  martin Pull up following revision(s) (requested by manu in ticket #232):
sys/arch/next68k/conf/GENERIC: revision 1.138
sys/arch/cobalt/conf/GENERIC: revision 1.146
sys/arch/mvme68k/conf/GENERIC: revision 1.93
sys/arch/vax/conf/VAX780: revision 1.18
sys/arch/newsmips/conf/GENERIC: revision 1.128
sys/arch/luna68k/conf/GENERIC: revision 1.118
sys/arch/sbmips/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.184
sys/arch/alpha/conf/GENERIC: revision 1.361
sys/arch/sparc64/conf/GENERIC: revision 1.176
sys/arch/sun3/conf/GENERIC: revision 1.170
sys/arch/shark/conf/GENERIC: revision 1.120
sys/arch/landisk/conf/GENERIC: revision 1.44
sys/arch/bebox/conf/GENERIC: revision 1.144
sys/arch/sparc64/conf/NONPLUS64: revision 1.43
sys/arch/sandpoint/conf/GENERIC: revision 1.87
sys/arch/emips/conf/GENERIC: revision 1.14
sys/arch/amd64/conf/XEN3_DOM0: revision 1.111
sys/arch/dreamcast/conf/GENERIC: revision 1.120
sys/arch/cesfic/conf/GENERIC: revision 1.64
sys/arch/mmeye/conf/GENERIC: revision 1.119
sys/arch/epoc32/conf/GENERIC: revision 1.7
sys/arch/x68k/conf/GENERIC: revision 1.178
sys/arch/iyonix/conf/GENERIC: revision 1.87
sys/arch/sun2/conf/GENERIC: revision 1.93
sys/arch/ews4800mips/conf/GENERIC: revision 1.50
sys/arch/amd64/conf/XEN3_DOMU: revision 1.59
sys/arch/acorn26/conf/GENERIC: revision 1.80
sys/arch/acorn32/conf/GENERIC: revision 1.115
sys/arch/macppc/conf/POWERMAC_G5: revision 1.24
sys/arch/i386/conf/GENERIC: revision 1.1117
sys/arch/arc/conf/GENERIC: revision 1.183
sys/arch/cats/conf/GENERIC: revision 1.154
sys/arch/amiga/conf/GENERIC.in: revision 1.128
sys/arch/zaurus/conf/GENERIC: revision 1.64
sys/arch/netwinder/conf/GENERIC: revision 1.125
sys/arch/hppa/conf/GENERIC: revision 1.5
sys/arch/mvmeppc/conf/GENERIC: revision 1.23
sys/arch/macppc/conf/GENERIC: revision 1.319
sys/arch/amiga/conf/GENERIC: revision 1.310
sys/arch/pmax/conf/GENERIC64: revision 1.20
sys/arch/macppc/conf/MAMBO: revision 1.23
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.27
sys/arch/amigappc/conf/GENERIC: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.403
sys/arch/ofppc/conf/GENERIC: revision 1.156
sys/arch/mac68k/conf/GENERIC: revision 1.219
sys/arch/i386/conf/XEN3_DOMU: revision 1.64
sys/arch/mipsco/conf/GENERIC: revision 1.87
sys/arch/hp300/conf/GENERIC: revision 1.189
sys/arch/vax/conf/GENERIC: revision 1.192
sys/arch/news68k/conf/GENERIC: revision 1.124
sys/arch/ibmnws/conf/GENERIC: revision 1.45
sys/arch/hpcsh/conf/GENERIC: revision 1.105
sys/arch/sparc/conf/TADPOLE3GX: revision 1.64
sys/arch/i386/conf/XEN3_DOM0: revision 1.92
sys/arch/sparc/conf/GENERIC: revision 1.247
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.105
sys/arch/prep/conf/GENERIC: revision 1.173
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.103
sys/arch/rs6000/conf/GENERIC: revision 1.32
sys/arch/hpcmips/conf/GENERIC: revision 1.228
Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels
This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr
Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
 1.143.2.1 10-Oct-2014  snj Apply patch (requested by bouyer/martin in ticket #116):
Disable DIAGNOSTIC and/or DEBUG.
 1.147.2.3 28-Aug-2017  skrll Sync with HEAD
 1.147.2.2 05-Feb-2017  skrll Sync with HEAD
 1.147.2.1 22-Sep-2015  skrll Sync with HEAD
 1.148.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.151.8.4 18-Apr-2018  martin Requested by skrll in ticket #60:
sys/arch/amd64/conf/GENERIC
sys/arch/amd64/conf/XEN3_DOM0
sys/arch/amd64/conf/XEN3_DOMU
sys/arch/cobalt/conf/GENERIC
sys/arch/evbarm/conf/BEAGLEBONE
sys/arch/evbarm/conf/BEAGLEBOARD
sys/arch/evbarm/conf/BEAGLEBOARDXM
sys/arch/evbarm/conf/GENERIC.common
sys/arch/i386/conf/GENERIC
sys/arch/i386/conf/XEN3_DOM0
sys/arch/i386/conf/XEN3_DOMU
sys/arch/mvmeppc/conf/GENERIC
sys/arch/shark/conf/GENERIC
sys/arch/sparc64/conf/GENERIC
sys/arch/zaurus/conf/GENERIC

Remove option DIAGNOSTIC.
 1.151.8.3 26-Jan-2018  martin Pull up following revision(s) (requested by sevan in ticket #510):
sys/arch/sun3/conf/GENERIC3X: revision 1.130
sys/arch/sparc64/conf/GENERIC: revision 1.203
sys/arch/news68k/conf/LIBERO: revision 1.66
sys/arch/amiga/conf/DRACO: revision 1.185
sys/arch/evbarm/conf/MV2120: revision 1.35
sys/arch/x68k/conf/GENERIC: revision 1.187
sys/arch/rs6000/conf/GENERIC: revision 1.39
sys/arch/news68k/conf/GENERIC_TINY: revision 1.86
sys/arch/i386/conf/XEN3_DOMU: revision 1.88
sys/arch/iyonix/conf/GENERIC: revision 1.97
sys/arch/evbarm64/conf/A64EMUL: revision 1.11
sys/arch/mvme68k/conf/GENERIC: revision 1.98
sys/arch/acorn32/conf/GENERIC: revision 1.124
sys/arch/i386/conf/XEN3_DOM0: revision 1.125
sys/arch/cobalt/conf/INSTALL: revision 1.65
sys/arch/macppc/conf/GENERIC_601: revision 1.16
sys/arch/hppa/conf/GENERIC: revision 1.17
sys/arch/amiga/conf/GENERIC.in: revision 1.137
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.33
sys/arch/netwinder/conf/GENERIC: revision 1.134
sys/arch/amd64/conf/XEN3_DOMU: revision 1.83
sys/arch/mac68k/conf/GENERIC: revision 1.225
sys/arch/arc/conf/RPC44: revision 1.54
sys/arch/mipsco/conf/GENERIC: revision 1.92
sys/arch/cats/conf/GENERIC: revision 1.166
sys/arch/amd64/conf/XEN3_DOM0: revision 1.145
sys/arch/amigappc/conf/GENERIC: revision 1.33
sys/arch/sun3/conf/GENERIC: revision 1.176
sys/arch/news68k/conf/GENERIC: revision 1.130
sys/arch/hpcsh/conf/GENERIC: revision 1.110
sys/arch/hp300/conf/GENERIC: revision 1.198
sys/arch/atari/conf/GENERIC.in: revision 1.115
sys/arch/sparc/conf/MRCOFFEE: revision 1.54
sys/arch/evbppc/conf/EXPLORA451: revision 1.62
sys/arch/cesfic/conf/GENERIC: revision 1.69
sys/arch/vax/conf/GENERIC: revision 1.204
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.115
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.112
sys/arch/sparc/conf/GENERIC: revision 1.258
sys/arch/next68k/conf/GENERIC: revision 1.145
sys/arch/evbarm/conf/MMNET_GENERIC: revision 1.34
sys/arch/prep/conf/GENERIC: revision 1.185
sys/arch/amiga/conf/INSTALL: revision 1.129
sys/arch/newsmips/conf/GENERIC: revision 1.133
sys/arch/cobalt/conf/GENERIC: revision 1.156
sys/arch/sun2/conf/GENERIC: revision 1.99
sys/arch/luna68k/conf/INSTALL: revision 1.25
sys/arch/amigappc/conf/NULL: revision 1.53
sys/arch/acorn26/conf/GENERIC: revision 1.85
sys/arch/vax/conf/VAX780: revision 1.25
sys/arch/luna68k/conf/GENERIC: revision 1.125
sys/arch/ews4800mips/conf/GENERIC: revision 1.56
sys/arch/macppc/conf/POWERMAC_G5: revision 1.29
sys/arch/arc/conf/GENERIC: revision 1.189
sys/arch/macppc/conf/MAMBO: revision 1.27
sys/arch/acorn32/conf/EB7500ATX: revision 1.64
sys/arch/pmax/conf/GENERIC: revision 1.196
sys/arch/pmax/conf/GENERIC64: revision 1.28
sys/arch/amiga/conf/GENERIC: revision 1.319
sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.55
sys/arch/macppc/conf/GENERIC: revision 1.339
sys/arch/emips/conf/GENERIC: revision 1.21
sys/arch/sandpoint/conf/GENERIC: revision 1.97
sys/arch/landisk/conf/GENERIC: revision 1.58
sys/arch/bebox/conf/GENERIC: revision 1.157
sys/arch/alpha/conf/GENERIC: revision 1.379
Alternate buffer queue strategies no longer considered experimental, update
description.
Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.151.8.2 29-Aug-2017  martin Requested by skrll in ticket #60:
sys/arch/amd64/conf/GENERIC
sys/arch/amd64/conf/XEN3_DOM0
sys/arch/amd64/conf/XEN3_DOMU
sys/arch/cobalt/conf/GENERIC
sys/arch/evbarm/conf/BEAGLEBONE
sys/arch/evbarm/conf/BEAGLEBOARD
sys/arch/evbarm/conf/BEAGLEBOARDXM
sys/arch/evbarm/conf/GENERIC.common
sys/arch/i386/conf/GENERIC
sys/arch/i386/conf/XEN3_DOM0
sys/arch/i386/conf/XEN3_DOMU
sys/arch/mvmeppc/conf/GENERIC
sys/arch/shark/conf/GENERIC
sys/arch/sparc64/conf/GENERIC
sys/arch/zaurus/conf/GENERIC


Re-enable option DIAGNOSTIC for now, will remove it again later.
 1.151.8.1 05-Jul-2017  martin Remove options DIAGNOSTIC/DEBUG and PAX debug options.
Requested by snj in #60.
 1.156.2.4 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.156.2.3 30-Sep-2018  pgoyette Ssync with HEAD
 1.156.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.156.2.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.158.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.158.2.1 10-Jun-2019  christos Sync with HEAD
 1.162.4.1 25-Jan-2020  ad Sync with head.
 1.162.2.1 21-Nov-2019  martin In preparation for the upcoming release, turn off DIAGNOSTIC in most
kernel configs, modules and libc.
 1.172.4.1 09-Oct-2023  snj Apply patch (requested by martin in ticket #401):
Disable DIAGNOSTIC/DEBUG.
 1.1 17-Dec-2009  matt branches: 1.1.4;
Enable mips64 support for cobalt.
 1.1.4.2 11-Mar-2010  yamt sync with head
 1.1.4.1 17-Dec-2009  yamt file GENERIC32 was added on branch yamt-nfs-mp on 2010-03-11 15:02:12 +0000
 1.2 22-Nov-2016  skrll s/COMPAT_NETBSD64/COMPAT_NETBSD32/ so userland works
 1.1 17-Dec-2009  matt branches: 1.1.4; 1.1.6; 1.1.26; 1.1.44; 1.1.48;
Enable mips64 support for cobalt.
 1.1.48.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.44.1 05-Dec-2016  skrll Sync with HEAD
 1.1.26.1 03-Dec-2017  jdolecek update from HEAD
 1.1.6.2 11-Mar-2010  yamt sync with head
 1.1.6.1 17-Dec-2009  yamt file GENERIC64 was added on branch yamt-nfs-mp on 2010-03-11 15:02:12 +0000
 1.1.4.2 28-Feb-2010  matt Adapt to new common interrupts.
Enable cobalt64
 1.1.4.1 17-Dec-2009  matt file GENERIC64 was added on branch matt-nb5-mips64 on 2010-02-28 04:04:46 +0000
 1.77 29-Jan-2024  christos PR/57889: Ricardo Branco: ext2fs does not have user immutable and append
file flags, only system ones. Restrict those to the superuser. Before
the behavior was controlled by EXT2FS_SYSTEM_FLAGS. Make that behavior the
default.
 1.76 27-Sep-2020  roy vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.75 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.74 25-Jan-2020  thorpej Retire "le* at pci?" from the shipped kernel configs:
- If the config had both an le@pci and a pcn, simply remove le@pci
(pcn would match at a higher priority anyway).
- If the config had le@pci enabled, but no pcn, change le@pci to pcn.
- If the config had le@pci commented out, but no pcn, change le@pci
to pcn and leave it commented out.

The pcn driver supports more chips than le@pci and does DMA directly
to/from mbufs rather than memory copies.
 1.73 20-Jan-2020  thorpej Remove FDDI support.
 1.72 19-Jan-2020  thorpej Remove HIPPI support and the esh(4) driver that uses it. There have not
been any users of HIPPI for some time, and it is unlikely to be resurrected.
 1.71 19-Jan-2020  thorpej Remove the strip(4) - Starmode Radio IP - pseudo-device driver. It is
long since obsolete.
 1.70 12-Dec-2018  maxv branches: 1.70.6;
Remove references to "lmc" in the kernel configurations.
 1.69 06-Sep-2018  maxv Retire the 'midway' driver. Discussed on tech-net@ recently and also three
years ago, part of removing the network ATM code.
 1.68 01-Aug-2018  maxv Unreference IPF/PF from all the config files, and enable NPF instead when
wanted. This also fixes some inconsistencies I saw in several files (eg
IPF options while IPF was not compiled, IPF+PF enabled by default, etc).
 1.67 09-Apr-2018  christos branches: 1.67.2;
rename panel to lcdpanel.
 1.66 09-Apr-2018  christos rename the cobalt panel to ledpanel to avoid conflict with fdt.
 1.65 23-Jan-2018  sevan branches: 1.65.2;
Alternate buffer queue strategies no longer considered experimental, update
description.

Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.64 14-Sep-2017  mrg clean up COMPAT_* options for native netbsd code:
- new series of files that are useful for saying "i want everything
since netbsd 1.4", etc.
- use the fact COMPAT_* options have future dependancies to remove
many redundant options.

removes about 3000 lines total across kernel configuration files.
tested about 30 random kernels in the changed list.
 1.63 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.62 13-Dec-2016  christos branches: 1.62.8;
wildcard speaker attachments, now that we can handle many of them.
 1.61 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.60 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.59 21-Aug-2015  uebayasi branches: 1.59.2;
Add `pseudo-device ksyms' where `options DDB' is used, because
config(1)/config(5) can't handle module dependency correctly at this
moment.

(This is another proof that shared file definition (`file xxx.c a|b')
is a bad idea.)
 1.58 12-Aug-2015  maxv Remove KMEMSTATS.
 1.57 23-Aug-2014  dholland branches: 1.57.2;
Systematize (and in many cases, fix) the comments on options COMPAT_NN.

There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
 1.56 20-Jul-2014  alnsn Add commented out bpfjit options to mips kernels.
While here, add 2 missing RCS ids.
 1.55 30-Jun-2013  rmind branches: 1.55.4;
G/C PFIL_HOOKS from the kernel configs.
 1.54 05-Jun-2013  christos branches: 1.54.2;
remove obsolete networking options
 1.53 27-Apr-2013  christos more bogus number removal
 1.52 27-Apr-2013  christos the bogus number police
 1.51 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.50 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.49 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.48 10-Mar-2012  joerg branches: 1.48.2;
P1003_1B_SEMAPHORE is no longer optional.
 1.47 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.46 22-Nov-2011  tls branches: 1.46.2;

The rnd pseudo-device is not really optional, because it is in the same
source file as the entropy-pool code itself. Move it to std. This
will be cleaned up more when I split the sources up as they should be.

This fixes build breaks on several ports. Thanks to Havard Eidnes for
pointing them out.
 1.45 30-Jun-2011  wiz branches: 1.45.2;
dependant -> dependent
 1.44 03-May-2011  tsutsui TAB/space cosmetics.
 1.43 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.42 23-Nov-2010  hannken branches: 1.42.2; 1.42.4;
Remove unused count from pseudo-device md.
 1.41 05-Dec-2009  pooka branches: 1.41.4;
Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.40 06-Mar-2009  joerg Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
 1.39 24-Nov-2008  ad branches: 1.39.4;
Remove softdep, pass 1. We are focused on improving journalling.

Proposed on tech-kern@.
 1.38 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.37 30-Oct-2008  tsutsui - fix (commented out) SBLive! driver name; it's emuxki, not sbl
- add commented out audio* at audiobus? line
 1.36 30-Oct-2008  tsutsui Our ever glowing kernel reaches the firmware limit,
so disable several options to shrink the INSTALL kernel that will
be used as an emergency kernel loaded by the firmware directly.
 1.35 11-Oct-2008  tsutsui branches: 1.35.2;
Now the cobalt kernel can detect boot device properly by boot strings
passed from the firmware, so change root file system type from
explicit nfs to generic '?' so that the INSTALL kernel can also be used
as a rescue kernel on localdisk.
 1.34 31-Jul-2008  simonb Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.33 27-Mar-2008  tsutsui branches: 1.33.4; 1.33.6; 1.33.10;
Add zsc(4) and zstty(4) for Qube 2700.
 1.32 01-Mar-2008  tsutsui Enable bpfilter, which is required by dhclient(8).
 1.31 01-Mar-2008  tsutsui Comment out some PCIIDE devices which wouldn't be available for a PCI slot.
 1.30 01-Mar-2008  tsutsui Enable puc at pci and com at puc, which might be useful Qube2700.
 1.29 28-Feb-2008  tsutsui Add options COMPAT_40.
 1.28 31-Dec-2007  ad branches: 1.28.2; 1.28.6;
Remove systrace. Ok core@.
 1.27 18-Nov-2006  tsutsui branches: 1.27.2; 1.27.28; 1.27.34; 1.27.42; 1.27.46;
Remove options SOSEND_NO_LOAN. Now it's handled in mips/pmap.c.
 1.26 27-Sep-2006  manu - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.25 26-Aug-2006  christos branches: 1.25.2; 1.25.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.24 22-Aug-2006  tsutsui Add options SOSEND_NO_LOAN. See the following comment for details:
---
# XXX Disable zero-copy page loaning in sosend() temporarily:
# PV mappings created by sosend_loan() in sys/kern/uipc_socket.c may
# produce virtual cache aliases and it seems to cause TLB MISS panic
# in cache flush code called from bus_dmamap_sync(9) PREWRITE ops
# during heavy TX packet traffic on tlp(4).
 1.23 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.22 19-Jul-2006  tsutsui branches: 1.22.2;
Use CPUFLAGS="-march=vr5000 -mabi=32".
 1.21 15-May-2006  tsutsui According to src/gnu/dist/binutils/gas/config/tc-mips.c
and src/gnu/dist/gcc/gcc/config/mips/mips.c,
CPUFLAGS="-mips2 -mtune=vr5000" is enough even for Rm523x CPUs.
 1.20 14-May-2006  tsutsui Specify CPUFLAGS for Rm523x:
> makeoptions CPUFLAGS="-mips2 -Wa,-mips2 -Wa,-mtune=rm5230"

before:
5693.654u 1059.921s 1:52:29.76 100.0% 0+0k 310+8815io 2493pf+0w

after:
5680.013u 983.282s 1:51:00.49 100.0% 0+0k 311+9015io 2494pf+0w
 1.19 15-Apr-2006  tsutsui Switch cobalt port to use MI todr(9) functions and MI mc146818 driver.
Tested on RaQ2 and Qube2 on port-cobalt.
 1.18 05-Feb-2006  cube branches: 1.18.2; 1.18.4; 1.18.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.17 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.16 20-Dec-2005  thorpej branches: 1.16.2; 1.16.4; 1.16.6;
Remove the tablet line discipline.
 1.15 07-Dec-2005  tsutsui branches: 1.15.2;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.14 25-Nov-2005  thorpej swcr -> swcrypto
 1.13 25-Nov-2005  thorpej "pseudo-device crypto" really refers to the /dev/crypto API to the
opencrypto framework, not the framework itself. Update the comment
accordingly.
 1.12 25-Nov-2005  thorpej Add "pseudo-device swcr" (commented out if "pseudo-device crypto" is also
commented out).
 1.11 23-Nov-2005  tsutsui - use -mmemcpy (it saves ~12kbytes)
- fix ident
 1.10 19-Aug-2005  christos branches: 1.10.6;
Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.9 19-Aug-2005  christos 64 bit inode changes.
 1.8 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.7 09-Jun-2005  tsutsui branches: 1.7.2;
- Rename options NEW_BUFQ_STRATEGY -> options BUFQ_READPRIO.
(still commented out)
- Add (also commented out) options BUFQ_PRIOCSCAN.

Suggested by perry and soda on tech-kern.
Please refer options(4) for details for these options.
 1.6 31-May-2005  tron Remove attachment for the piixide(4) driver from all non-x86 kernel
configurations because Intel IDE disk controllers only exist as part
of Intel chipsets for x86 systems.
 1.5 25-Mar-2005  tsutsui branches: 1.5.2;
Switch cobalt port to use MI pci_configure_bus(9)
with options PCI_NETBSD_CONFIGURE.
Patch from KIYOHARA Takashi on port-cobalt.

This change makes siop(4) (and maybe all other PCI devices
using pci mem space) work on cobalt.
 1.4 25-Feb-2005  simonb branches: 1.4.2;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.3 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.2 11-Feb-2005  dsl Add 'option FFS_SNAPSHOT' to most of the config files.
Commented out for kernels that appear to hace space constraints.
 1.1 23-Jan-2005  cdi branches: 1.1.2; 1.1.4;
New kernel configuration for use during Cobalt netboot or as a rescue kernel
image. The idea is to keep INSTALL as small as possible (XXXVERBOSE options are
off, no IP filtering, SCSI support etc.) to shoehorn into size limits imposed
by the Cobalt's firmware and to have full-blown GENERIC kernel which uses
NetBSD bootloader anyway.
 1.1.4.3 26-Mar-2005  yamt sync with head.
 1.1.4.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.4.1 12-Feb-2005  yamt sync with head.
 1.1.2.7 11-Dec-2005  christos Sync with head.
 1.1.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.1.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.2.3 15-Feb-2005  skrll Sync with HEAD.
 1.1.2.2 24-Jan-2005  skrll Sync with HEAD.
 1.1.2.1 23-Jan-2005  skrll file INSTALL was added on branch ktrace-lwp on 2005-01-24 08:34:06 +0000
 1.4.2.4 25-Aug-2006  ghen Pull up following revision(s) (requested by tsutsui in ticket #1478):
sys/arch/cobalt/conf/GENERIC: revision 1.102
sys/arch/cobalt/conf/INSTALL: revision 1.24
Add options SOSEND_NO_LOAN. See the following comment for details:
---
 1.4.2.3 18-Jul-2005  riz branches: 1.4.2.3.2;
Pull up revision 1.8 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.4.2.2 01-Jun-2005  riz Pull up revision 1.6 (requested by tron in ticket #362):
Remove attachment for the piixide(4) driver from all non-x86 kernel
configurations because Intel IDE disk controllers only exist as part
of Intel chipsets for x86 systems.
 1.4.2.1 27-Mar-2005  tron Pull up revision 1.5 (requested by tsutsui in ticket #67):
Switch cobalt port to use MI pci_configure_bus(9)
with options PCI_NETBSD_CONFIGURE.
Patch from KIYOHARA Takashi on port-cobalt.
This change makes siop(4) (and maybe all other PCI devices
using pci mem space) work on cobalt.
 1.4.2.3.2.1 26-Aug-2006  ghen Pull up following revision(s) (requested by tsutsui in ticket #1478):
sys/arch/cobalt/conf/GENERIC: revision 1.102
sys/arch/cobalt/conf/INSTALL: revision 1.24
Add options SOSEND_NO_LOAN. See the following comment for details:
---
 1.5.2.2 29-Apr-2005  kent sync with -current
 1.5.2.1 25-Mar-2005  kent file INSTALL was added on branch kent-audio2 on 2005-04-29 11:28:06 +0000
 1.7.2.4 17-Mar-2008  yamt sync with head.
 1.7.2.3 21-Jan-2008  yamt sync with head
 1.7.2.2 30-Dec-2006  yamt sync with head.
 1.7.2.1 21-Jun-2006  yamt sync with head.
 1.10.6.1 29-Nov-2005  yamt sync with head.
 1.15.2.2 16-Dec-2005  jmc Pullup patch (requested by tsutsui in ticket #10176)

The cobalt firmware has a size restriction on loading kernel.
so we should also have a smaller kernel binary for bootstrap install.
 1.15.2.1 07-Dec-2005  jmc file INSTALL was added on branch netbsd-2 on 2005-12-16 18:16:45 +0000
 1.16.6.2 01-Jun-2006  kardel Sync with head.
 1.16.6.1 22-Apr-2006  simonb Sync with head.
 1.16.4.1 09-Sep-2006  rpaulo sync with head
 1.16.2.1 18-Feb-2006  yamt sync with head.
 1.18.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.18.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.18.2.3 03-Sep-2006  yamt sync with head.
 1.18.2.2 11-Aug-2006  yamt sync with head
 1.18.2.1 24-May-2006  yamt sync with head.
 1.22.2.2 25-Aug-2006  ghen Pull up following revision(s) (requested by tsutsui in ticket #60):
sys/arch/cobalt/conf/GENERIC: revision 1.102
sys/arch/cobalt/conf/INSTALL: revision 1.24
Add options SOSEND_NO_LOAN. See the following comment for details:
---
 1.22.2.1 14-Aug-2006  tron Pull up following revision(s) (requested by elad in ticket #17):
sys/arch/sparc/conf/KRUPS: revision 1.38
sys/arch/i386/conf/XEN2_DOMU: revision 1.2
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.197
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.53
sys/arch/evbsh5/conf/SIMULATOR: revision 1.12
sys/arch/sparc/conf/MRCOFFEE: revision 1.17
sys/arch/next68k/conf/GENERIC: revision 1.104
sys/arch/i386/conf/VIRTUALPC: revision 1.44
sys/arch/ews4800mips/conf/GENERIC: revision 1.11
sys/arch/evbsh5/conf/CAYMAN: revision 1.23
sys/arch/arc/conf/GENERIC: revision 1.141
sys/arch/amd64/conf/GENERIC: revision 1.103
sys/arch/sun3/conf/GENERIC3X: revision 1.90
sys/arch/evbarm/conf/HDL_G: revision 1.3
sys/arch/sun2/conf/GENERIC: revision 1.57
sys/arch/news68k/conf/GENERIC_TINY: revision 1.51
sys/arch/evbppc/conf/EXPLORA451: revision 1.27
sys/arch/amiga/conf/GENERIC.in: revision 1.54
sys/arch/mac68k/conf/GENERIC: revision 1.174
sys/arch/acorn26/conf/GENERIC: revision 1.45
sys/arch/shark/conf/GENERIC: revision 1.64
sys/arch/cesfic/conf/GENERIC: revision 1.44
sys/arch/mvme68k/conf/GENERIC: revision 1.68
sys/arch/i386/conf/XEN2_DOM0: revision 1.4
sys/arch/atari/conf/GENERIC.in: revision 1.63
sys/arch/amiga/conf/GENERIC: revision 1.240
sys/arch/i386/conf/LAMB: revision 1.65
sys/arch/i386/conf/GENERIC: revision 1.773
sys/arch/acorn32/conf/EB7500ATX: revision 1.26
sys/arch/x68k/conf/GENERIC: revision 1.128
sys/arch/vax/conf/GENERIC: revision 1.153
sys/arch/atari/conf/ATARITT: revision 1.81
sys/arch/mipsco/conf/GENERIC: revision 1.60
sys/arch/cobalt/conf/GENERIC: revision 1.101
sys/arch/evbarm/conf/ARMADILLO9: revision 1.13
sys/arch/ofppc/conf/GENERIC: revision 1.93
sys/arch/atari/conf/MILAN-PCIIDE: revision 1.51
sys/arch/arc/conf/RPC44: revision 1.26
sys/arch/sparc64/conf/GENERIC: revision 1.59
sys/arch/i386/conf/XEN3_DOMU: revision 1.2
sys/arch/hp700/conf/GENERIC: revision 1.68
sys/arch/atari/conf/MILAN-ISAIDE: revision 1.47
sys/arch/macppc/conf/GENERIC: revision 1.231
sys/arch/dreamcast/conf/GENERIC: revision 1.72
sys/arch/news68k/conf/GENERIC: revision 1.80
sys/arch/hp300/conf/GENERIC: revision 1.133
sys/arch/mmeye/conf/GENERIC: revision 1.82
sys/arch/macppc/conf/MAMBO: revision 1.2
sys/arch/cats/conf/GENERIC: revision 1.107
sys/arch/atari/conf/FALCON: revision 1.79
sys/arch/acorn32/conf/GENERIC: revision 1.71
sys/arch/sparc/conf/GENERIC: revision 1.190
sys/arch/news68k/conf/LIBERO: revision 1.40
sys/arch/amiga/conf/DRACO: revision 1.114
sys/arch/cobalt/conf/INSTALL: revision 1.23
sys/arch/luna68k/conf/GENERIC: revision 1.73
sys/arch/bebox/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.147
sys/arch/amiga/conf/WSCONS: revision 1.52
sys/arch/macppc/conf/POWERMAC_G5: revision 1.2
sys/arch/alpha/conf/ALPHA: revision 1.218
sys/arch/sun3/conf/GENERIC: revision 1.133
sys/arch/prep/conf/GENERIC: revision 1.124
sys/arch/alpha/conf/GENERIC: revision 1.291
sys/arch/atari/conf/HADES: revision 1.71
sys/arch/newsmips/conf/GENERIC: revision 1.93
sys/arch/netwinder/conf/GENERIC: revision 1.82
sys/arch/hpcmips/conf/GENERIC: revision 1.190
sys/arch/amiga/conf/AMIGA: revision 1.98
sys/arch/sbmips/conf/GENERIC: revision 1.54
sys/arch/pc532/conf/GENERIC: revision 1.64
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.53
Disable SYSTRACE by default on all kernels (discussed with core)
 1.25.4.2 10-Dec-2006  yamt sync with head.
 1.25.4.1 22-Oct-2006  yamt sync with head
 1.25.2.2 12-Jan-2007  ad Sync with head.
 1.25.2.1 18-Nov-2006  ad Sync with head.
 1.27.46.2 01-Nov-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #1217):
sys/arch/cobalt/conf/INSTALL: revision 1.32
Enable bpfilter, which is required by dhclient(8).
 1.27.46.1 01-Nov-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #1217):
sys/arch/cobalt/conf/INSTALL: revision 1.35
Now the cobalt kernel can detect boot device properly by boot strings
passed from the firmware, so change root file system type from
explicit nfs to generic '?' so that the INSTALL kernel can also be used
as a rescue kernel on localdisk.
 1.27.42.1 02-Jan-2008  bouyer Sync with HEAD
 1.27.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.27.28.2 23-Mar-2008  matt sync with HEAD
 1.27.28.1 09-Jan-2008  matt sync with HEAD
 1.27.2.2 01-Nov-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #1217):
sys/arch/cobalt/conf/INSTALL: revision 1.32
Enable bpfilter, which is required by dhclient(8).
 1.27.2.1 01-Nov-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #1217):
sys/arch/cobalt/conf/INSTALL: revision 1.35
Now the cobalt kernel can detect boot device properly by boot strings
passed from the firmware, so change root file system type from
explicit nfs to generic '?' so that the INSTALL kernel can also be used
as a rescue kernel on localdisk.
 1.28.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.28.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.28.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.28.2.1 24-Mar-2008  keiichi sync with head.
 1.33.10.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.33.10.1 19-Oct-2008  haad Sync with HEAD.
 1.33.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.33.4.2 11-Mar-2010  yamt sync with head
 1.33.4.1 04-May-2009  yamt sync with head.
 1.35.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.35.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.39.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.41.4.3 31-May-2011  rmind sync with head
 1.41.4.2 21-Apr-2011  rmind sync with head
 1.41.4.1 05-Mar-2011  rmind sync with head
 1.42.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.42.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.45.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.45.2.1 17-Apr-2012  yamt sync with head
 1.46.2.2 11-Mar-2012  mrg sync to latest -current
 1.46.2.1 18-Feb-2012  mrg merge to -current.
 1.48.2.3 03-Dec-2017  jdolecek update from HEAD
 1.48.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.48.2.1 23-Jun-2013  tls resync from head
 1.54.2.1 28-Aug-2013  rmind sync with head
 1.55.4.1 10-Aug-2014  tls Rebase.
 1.57.2.3 28-Aug-2017  skrll Sync with HEAD
 1.57.2.2 05-Feb-2017  skrll Sync with HEAD
 1.57.2.1 22-Sep-2015  skrll Sync with HEAD
 1.59.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.62.8.1 26-Jan-2018  martin Pull up following revision(s) (requested by sevan in ticket #510):
sys/arch/sun3/conf/GENERIC3X: revision 1.130
sys/arch/sparc64/conf/GENERIC: revision 1.203
sys/arch/news68k/conf/LIBERO: revision 1.66
sys/arch/amiga/conf/DRACO: revision 1.185
sys/arch/evbarm/conf/MV2120: revision 1.35
sys/arch/x68k/conf/GENERIC: revision 1.187
sys/arch/rs6000/conf/GENERIC: revision 1.39
sys/arch/news68k/conf/GENERIC_TINY: revision 1.86
sys/arch/i386/conf/XEN3_DOMU: revision 1.88
sys/arch/iyonix/conf/GENERIC: revision 1.97
sys/arch/evbarm64/conf/A64EMUL: revision 1.11
sys/arch/mvme68k/conf/GENERIC: revision 1.98
sys/arch/acorn32/conf/GENERIC: revision 1.124
sys/arch/i386/conf/XEN3_DOM0: revision 1.125
sys/arch/cobalt/conf/INSTALL: revision 1.65
sys/arch/macppc/conf/GENERIC_601: revision 1.16
sys/arch/hppa/conf/GENERIC: revision 1.17
sys/arch/amiga/conf/GENERIC.in: revision 1.137
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.33
sys/arch/netwinder/conf/GENERIC: revision 1.134
sys/arch/amd64/conf/XEN3_DOMU: revision 1.83
sys/arch/mac68k/conf/GENERIC: revision 1.225
sys/arch/arc/conf/RPC44: revision 1.54
sys/arch/mipsco/conf/GENERIC: revision 1.92
sys/arch/cats/conf/GENERIC: revision 1.166
sys/arch/amd64/conf/XEN3_DOM0: revision 1.145
sys/arch/amigappc/conf/GENERIC: revision 1.33
sys/arch/sun3/conf/GENERIC: revision 1.176
sys/arch/news68k/conf/GENERIC: revision 1.130
sys/arch/hpcsh/conf/GENERIC: revision 1.110
sys/arch/hp300/conf/GENERIC: revision 1.198
sys/arch/atari/conf/GENERIC.in: revision 1.115
sys/arch/sparc/conf/MRCOFFEE: revision 1.54
sys/arch/evbppc/conf/EXPLORA451: revision 1.62
sys/arch/cesfic/conf/GENERIC: revision 1.69
sys/arch/vax/conf/GENERIC: revision 1.204
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.115
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.112
sys/arch/sparc/conf/GENERIC: revision 1.258
sys/arch/next68k/conf/GENERIC: revision 1.145
sys/arch/evbarm/conf/MMNET_GENERIC: revision 1.34
sys/arch/prep/conf/GENERIC: revision 1.185
sys/arch/amiga/conf/INSTALL: revision 1.129
sys/arch/newsmips/conf/GENERIC: revision 1.133
sys/arch/cobalt/conf/GENERIC: revision 1.156
sys/arch/sun2/conf/GENERIC: revision 1.99
sys/arch/luna68k/conf/INSTALL: revision 1.25
sys/arch/amigappc/conf/NULL: revision 1.53
sys/arch/acorn26/conf/GENERIC: revision 1.85
sys/arch/vax/conf/VAX780: revision 1.25
sys/arch/luna68k/conf/GENERIC: revision 1.125
sys/arch/ews4800mips/conf/GENERIC: revision 1.56
sys/arch/macppc/conf/POWERMAC_G5: revision 1.29
sys/arch/arc/conf/GENERIC: revision 1.189
sys/arch/macppc/conf/MAMBO: revision 1.27
sys/arch/acorn32/conf/EB7500ATX: revision 1.64
sys/arch/pmax/conf/GENERIC: revision 1.196
sys/arch/pmax/conf/GENERIC64: revision 1.28
sys/arch/amiga/conf/GENERIC: revision 1.319
sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.55
sys/arch/macppc/conf/GENERIC: revision 1.339
sys/arch/emips/conf/GENERIC: revision 1.21
sys/arch/sandpoint/conf/GENERIC: revision 1.97
sys/arch/landisk/conf/GENERIC: revision 1.58
sys/arch/bebox/conf/GENERIC: revision 1.157
sys/arch/alpha/conf/GENERIC: revision 1.379
Alternate buffer queue strategies no longer considered experimental, update
description.
Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.65.2.4 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.65.2.3 30-Sep-2018  pgoyette Ssync with HEAD
 1.65.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.65.2.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.67.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.67.2.1 10-Jun-2019  christos Sync with HEAD
 1.70.6.1 25-Jan-2020  ad Sync with head.
 1.1 17-Dec-2009  matt branches: 1.1.4;
Enable mips64 support for cobalt.
 1.1.4.2 11-Mar-2010  yamt sync with head
 1.1.4.1 17-Dec-2009  yamt file INSTALL32 was added on branch yamt-nfs-mp on 2010-03-11 15:02:12 +0000
 1.2 22-Nov-2016  skrll s/COMPAT_NETBSD64/COMPAT_NETBSD32/ so userland works
 1.1 17-Dec-2009  matt branches: 1.1.4; 1.1.24; 1.1.42; 1.1.46;
Enable mips64 support for cobalt.
 1.1.46.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.42.1 05-Dec-2016  skrll Sync with HEAD
 1.1.24.1 03-Dec-2017  jdolecek update from HEAD
 1.1.4.2 11-Mar-2010  yamt sync with head
 1.1.4.1 17-Dec-2009  yamt file INSTALL64 was added on branch yamt-nfs-mp on 2010-03-11 15:02:12 +0000
 1.6 03-Dec-2000  matt Use shared Makefile.mips
 1.5 21-May-2000  soren branches: 1.5.6;
Also share BE ldscripts.
 1.4 09-May-2000  hubertf Add "install" target, so "make install" after building the kernel
does something useful. The target can be redefined by putting a
install-kernel-${MACHINE_NAME} target that fits your needs into
/etc/mk.conf.
 1.3 09-May-2000  thorpej HAVE_GCC28 -> HAVE_EGCS, and make it match gcc 2.9 as well. Also,
make the use of -Wno-uninitialized explicit, don't rely on a compiler
hack to do it for us.
 1.2 30-Mar-2000  soren Remove local hack.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.5.6.3 08-Dec-2000  bouyer Sync with HEAD.
 1.5.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.6.1 21-May-2000  bouyer file Makefile.cobalt was added on branch thorpej_scsipi on 2000-11-20 20:07:01 +0000
 1.8 22-Jul-2017  christos we need to get on a diet
 1.7 21-Feb-2016  christos bump size.
 1.6 29-Sep-2014  msaitoh branches: 1.6.2;
Increase ramdisk size.
 1.5 03-May-2011  tsutsui branches: 1.5.14; 1.5.30;
TAB/space cosmetics.
 1.4 23-Nov-2010  hannken branches: 1.4.2;
Remove unused count from pseudo-device md.
 1.3 06-Feb-2009  jym branches: 1.3.6;
Changes to MEMORY_RBFLAGS option:
- renamed to MEMORY_DISK_RBFLAGS to better fit the rest of the
MEMORY_DISK options(4)
- change default value to RB_AUTOBOOT instead of RB_SINGLE, and adapt
the config(5) files accordingly
- document this option inside options(4)

See also http://mail-index.netbsd.org/tech-kern/2008/12/25/msg003924.html

Reviewed by abs@ in private mail.
 1.2 13-Sep-2008  tsutsui branches: 1.2.2;
- enable dhclient(8) in RAMDISK kernel
- bump mdroot size
 1.1 02-Feb-2008  tsutsui branches: 1.1.2; 1.1.4; 1.1.10; 1.1.12; 1.1.16; 1.1.18; 1.1.22;
Add RAMDISK config, which has GENERIC + mdroot stuff.
 1.1.22.1 19-Oct-2008  haad Sync with HEAD.
 1.1.18.1 24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.1.16.1 04-May-2009  yamt sync with head.
 1.1.12.2 23-Mar-2008  matt sync with HEAD
 1.1.12.1 02-Feb-2008  matt file RAMDISK was added on branch matt-armv6 on 2008-03-23 02:03:57 +0000
 1.1.10.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.4.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.4.1 02-Feb-2008  mjf file RAMDISK was added on branch mjf-devfs on 2008-02-18 21:04:25 +0000
 1.1.2.2 04-Feb-2008  yamt sync with head.
 1.1.2.1 02-Feb-2008  yamt file RAMDISK was added on branch yamt-lazymbuf on 2008-02-04 09:21:47 +0000
 1.2.2.1 03-Mar-2009  skrll Sync with HEAD.
 1.3.6.2 31-May-2011  rmind sync with head
 1.3.6.1 05-Mar-2011  rmind sync with head
 1.4.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.5.30.1 07-Jan-2015  msaitoh Pull up following revision(s) (requested by martin in ticket #388):
sys/arch/cobalt/conf/RAMDISK: revision 1.6
distrib/cobalt/ramdisk/Makefile: revision 1.9
Increase ramdisk size.
 1.5.14.1 03-Dec-2017  jdolecek update from HEAD
 1.6.2.2 28-Aug-2017  skrll Sync with HEAD
 1.6.2.1 19-Mar-2016  skrll Sync with HEAD
 1.1 17-Dec-2009  matt branches: 1.1.4;
Enable mips64 support for cobalt.
 1.1.4.2 11-Mar-2010  yamt sync with head
 1.1.4.1 17-Dec-2009  yamt file RAMDISK32 was added on branch yamt-nfs-mp on 2010-03-11 15:02:12 +0000
 1.2 22-Nov-2016  skrll s/COMPAT_NETBSD64/COMPAT_NETBSD32/ so userland works
 1.1 17-Dec-2009  matt branches: 1.1.4; 1.1.24; 1.1.42; 1.1.46;
Enable mips64 support for cobalt.
 1.1.46.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.42.1 05-Dec-2016  skrll Sync with HEAD
 1.1.24.1 03-Dec-2017  jdolecek update from HEAD
 1.1.4.2 11-Mar-2010  yamt sync with head
 1.1.4.1 17-Dec-2009  yamt file RAMDISK64 was added on branch yamt-nfs-mp on 2010-03-11 15:02:12 +0000
 1.10 16-Feb-2001  soren Nuke.
 1.9 27-Nov-2000  soren Removed increased BUFCACHE/BUFPAGES.
 1.8 24-Sep-2000  jdolecek branches: 1.8.2;
don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.7 28-Jun-2000  soren Drop kernfs.
 1.6 29-May-2000  soren No Linux compat yet, but Ultrix works.
 1.5 27-Apr-2000  soren branches: 1.5.2;
Use siop(4).
 1.4 31-Mar-2000  soren Some cleanups.
 1.3 24-Mar-2000  soren Let's try NCR_IOMAPPED.
 1.2 22-Mar-2000  cgd add commented out option PCI_CONFIG_DUMP whever there's a PCIVERBOSE.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.5.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.8.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.8.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.8.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.8.2.1 24-Sep-2000  bouyer file RAQ was added on branch thorpej_scsipi on 2000-11-20 20:07:01 +0000
 1.43 04-Sep-2021  tsutsui Use MI subr_disk_mbr.c for proper MBR and bi-endian supprot.

No special MD handling in previous. Briefly tested on gxemul 0.6.3.
 1.42 24-Apr-2021  thorpej 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.41 09-Apr-2018  christos branches: 1.41.16;
rename panel to lcdpanel.
 1.40 09-Apr-2018  christos rename the cobalt panel to ledpanel to avoid conflict with fdt.
 1.39 20-Jan-2018  skrll branches: 1.39.2;
Switch cobalt to common bus_space.

Tested on raq 2
 1.38 29-Jul-2014  skrll Convert cobalt to generic mips bus_dma.
 1.37 20-Jul-2014  alnsn Include sljit files.
 1.36 02-Oct-2012  christos branches: 1.36.10;
move common/bus_dma/ -> dev/bus_dma/
 1.35 20-Feb-2011  matt branches: 1.35.4; 1.35.14;
Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).
 1.34 21-Aug-2009  thorpej branches: 1.34.4; 1.34.6; 1.34.8;
Use bus_dmamem_common.
 1.33 28-May-2008  tsutsui branches: 1.33.16;
Include files.bluetooth.
 1.32 27-Mar-2008  tsutsui branches: 1.32.2; 1.32.4; 1.32.6;
Add kernel support for optional Z85C30 serial console on Cobalt Qube 2700.
There is some interrupt related issue (in MI z8530tty driver?) on heavy load,
but useful enough for debugging.
 1.31 22-Mar-2008  tsutsui Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.
 1.30 20-Feb-2008  drochner branches: 1.30.6;
Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
 1.29 10-Apr-2007  macallan branches: 1.29.14;
include files.wsfb
 1.28 10-Sep-2006  tsutsui branches: 1.28.6; 1.28.10; 1.28.12;
Remove or comment out now unused code after MI mips3_clockintr migration.
 1.27 08-Sep-2006  gdamore Various improvements to make the common mips3 clock handling more generally
useful. The functions delay, cpu_initclocks, and setstatclcokrate have been
renamed to mips3_delay, mips3_initclocks, and mips3_setstatclockrate.

We provide weak aliases for the original names, so machdep code doesn't have
to provide wrapper routines. (Giving good performance.)

I've moved mips3_clockintr, mips3_initclocks, and mips3_setstatclockrate to
their own mips3_clockintr file, because some ports may not be able to use
these, and its senseless to carry that baggage.
 1.26 07-Sep-2006  gdamore branches: 1.26.2;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.
 1.25 15-Apr-2006  tsutsui Switch cobalt port to use MI todr(9) functions and MI mc146818 driver.
Tested on RaQ2 and Qube2 on port-cobalt.
 1.24 07-Apr-2006  tsutsui Add include "dev/usb/files.usb".
 1.23 11-Dec-2005  christos branches: 1.23.4; 1.23.6; 1.23.8; 1.23.10; 1.23.12;
merge ktrace-lwp.
 1.22 11-Jul-2005  kiyohara ieee1394 import from FreeBSD.
 1.21 04-Feb-2005  joff branches: 1.21.6;
Even though we don't use wscons on cobalt, still bring in dev/wscons/files.wscons
so we can get various opt_*.h generated.
 1.20 29-Aug-2004  tsutsui branches: 1.20.4; 1.20.6;
- rename comcnprobe() and comcninit() to com_mainbus_cnprobe() and
com_mainbus_cninit() and move these cn functions from cobalt/console.c
to dev/com_mainbus.c
- call cninit() only once
- remove unneeded includes
- use ANSI function decls
 1.19 17-Oct-2003  cdi branches: 1.19.4;
Change console code to use cninit() and null console. Add serial console
check.
 1.18 08-Oct-2003  bouyer pciide_machdep.c depends on pciide_common, not pciide.
Pointed out and fix tested by Marc Recht.
 1.17 12-Sep-2003  tsutsui Use common mips generic software interrupt routines.
 1.16 27-Jul-2003  thorpej Since everyone uses clock_subr.c (or should, if they don't currently),
list it in conf/files instead of in every port's files.*.
 1.15 20-Jan-2003  soren branches: 1.15.2;
Attachment for the HD44780 display and keypad on the front of Cobalt machines.
 1.14 26-Oct-2002  jdolecek now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
 1.13 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.12 16-Apr-2002  thorpej branches: 1.12.2;
* Move the mii_bitbang attribute into dev/mii/files.mii
* Pull in dev/mii/files.mii from conf/files, rather than playing
the magic "files include order" dance in N machine-dependent
configuration definitions.
 1.11 13-Mar-2002  simonb All the mips ports had an identical procfs_machdep.c, so use a common
file under arch/mips/mips.
 1.10 17-Jan-2001  fvdl branches: 1.10.4; 1.10.8;
Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
 1.9 26-Nov-2000  ad lsu -> ld, by popular request.
 1.8 21-Nov-2000  soren Use dev/md_root.c.
 1.7 08-Nov-2000  ad branches: 1.7.2;
Pull in dev/i2o/files.i2o.
 1.6 23-Oct-2000  ad Add `major' for lsu.
 1.5 06-Jun-2000  soren branches: 1.5.2;
Fix unused device declaration.
 1.4 27-May-2000  soren branches: 1.4.2;
Correct ones, even.
 1.3 27-May-2000  soren Forgot to define sd and cd majors.
 1.2 31-Mar-2000  soren Some cleanups.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.4.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.5.2.1 25-Oct-2001  he Pull up revision 1.7 (requested by ad):
Add Mylex DACC960, CAC-EISA, and I2O block/SCSI drivers.
 1.7.2.5 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.7.2.4 08-Dec-2000  bouyer Sync with HEAD.
 1.7.2.3 22-Nov-2000  bouyer Sync with HEAD.
 1.7.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.2.1 08-Nov-2000  bouyer file files.cobalt was added on branch thorpej_scsipi on 2000-11-20 20:07:01 +0000
 1.10.8.4 11-Nov-2002  nathanw Catch up to -current
 1.10.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.10.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.10.8.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.10.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.10.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.10.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.12.2.2 17-May-2002  gehenna Remove old block majors list.
 1.12.2.1 16-May-2002  gehenna Include the list of block/character major numbers.
 1.15.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.15.2.5 04-Feb-2005  skrll Sync with HEAD.
 1.15.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.2 03-Sep-2004  skrll Sync with HEAD
 1.15.2.1 03-Aug-2004  skrll Sync with HEAD
 1.19.4.1 16-Dec-2005  jmc Pullup rev 1.20 (requested by tsutsui in ticket #10175)

Cobalt kernel hangs in the second
consinit() call if it is loaded by the native bootloader,
so there is no bootstrap way to install other than to use
an older kernel.
 1.20.6.1 12-Feb-2005  yamt sync with head.
 1.20.4.1 29-Apr-2005  kent sync with -current
 1.21.6.5 24-Mar-2008  yamt sync with head.
 1.21.6.4 27-Feb-2008  yamt sync with head.
 1.21.6.3 03-Sep-2007  yamt sync with head.
 1.21.6.2 30-Dec-2006  yamt sync with head.
 1.21.6.1 21-Jun-2006  yamt sync with head.
 1.23.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.23.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.23.8.3 14-Sep-2006  yamt sync with head.
 1.23.8.2 24-May-2006  yamt sync with head.
 1.23.8.1 11-Apr-2006  yamt sync with head
 1.23.6.1 22-Apr-2006  simonb Sync with head.
 1.23.4.1 09-Sep-2006  rpaulo sync with head
 1.26.2.1 18-Nov-2006  ad Sync with head.
 1.28.12.1 11-Jul-2007  mjf Sync with head.
 1.28.10.1 10-Apr-2007  ad Sync with head.
 1.28.6.1 15-Apr-2007  yamt sync with head.
 1.29.14.1 23-Mar-2008  matt sync with HEAD
 1.30.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.30.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.32.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.32.4.2 16-Sep-2009  yamt sync with head
 1.32.4.1 04-May-2009  yamt sync with head.
 1.32.2.1 04-Jun-2008  yamt sync with head
 1.33.16.1 05-Feb-2010  matt Change to deal with new method of invoking softints. Remove mips/softintr.c
from config files. Fix SYMTAB_SPACE for WGT62V43
 1.34.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.34.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.34.4.1 05-Mar-2011  rmind sync with head
 1.35.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.35.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.35.4.1 30-Oct-2012  yamt sync with head
 1.36.10.1 10-Aug-2014  tls Rebase.
 1.39.2.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.41.16.1 20-Mar-2021  thorpej There is no need to have the "pcibus" interface attribute on mainbus;
PCI bus instances to not attach there.
 1.36 29-Jun-2021  nia Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.
 1.35 04-Apr-2020  jdolecek branches: 1.35.8;
mark nsmb major obsolete
 1.34 04-Mar-2020  thorpej panel -> lcdpanel

Part of PR port-cobalt/55009
 1.33 29-Jan-2020  maya remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.
 1.32 28-Jan-2019  dholland branches: 1.32.4; 1.32.6;
Systematize handling of removed drivers.

- Every driver that was removed and whose number hasn't already been
reused is now listed with a commented-out "obsolete" line.
- The format of these has been systematized. Future format changes can
probably be safely done with a script.
- This does not include a few cases of assignments that only lasted a
couple days, or stuff from before major reorgs. Some of these may
be included nonetheless, because there was a lot of ground to cover
and therefore not a lot of time to dig into history in detail.

Note that the obsolete listings do not mean the major numbers can
never be reused; that's up to portmasters and/or core. It does mean
that they won't be reused by accident, however, which in some cases
(depending on the driver, how widely used it was, its family of device
nodes, their default permissions, etc.) can be quite dangerous.

Note that some of the things now explicitly listed as obsolete are
really ancient history. My scan went back as far as when the majors
files were added. (But not before that.)
 1.31 23-Sep-2018  maxv Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.
 1.30 30-Jun-2011  wiz branches: 1.30.52; 1.30.54;
dependant -> dependent
 1.29 03-May-2011  tsutsui TAB/space cosmetics.
 1.28 06-Mar-2010  plunky branches: 1.28.2; 1.28.4;
use a MI major number for uhso(4) driver
(requested by mrg)
 1.27 06-Mar-2010  plunky add major device for usho(4) driver
 1.26 14-Nov-2009  tsutsui Preserve wscons(4) device numbers for forthcoming udl(4) USB display.
 1.25 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.24 12-Oct-2008  tsutsui branches: 1.24.2;
Add sequencer and vcoda.
 1.23 10-Oct-2008  tsutsui Add audio and midi devices, per report from Mike Hebel on port-cobalt.
 1.22 08-Jun-2008  tsutsui branches: 1.22.4;
Add device nodes for usb devices.
 1.21 27-Mar-2008  tsutsui branches: 1.21.2; 1.21.4; 1.21.6;
Add kernel support for optional Z85C30 serial console on Cobalt Qube 2700.
There is some interrupt related issue (in MI z8530tty driver?) on heavy load,
but useful enough for debugging.
 1.20 31-Dec-2007  ad branches: 1.20.6;
Remove systrace. Ok core@.
 1.19 04-Mar-2007  tsutsui branches: 1.19.20; 1.19.26; 1.19.32;
Add pci(4) node for pcictl(8).
 1.18 24-Nov-2006  wiz branches: 1.18.4;
s/independant/independent/, from Zafer.
 1.17 11-Dec-2005  christos branches: 1.17.20; 1.17.22;
merge ktrace-lwp.
 1.16 17-Sep-2005  yamt make VMSWAP optional again.
 1.15 31-Jul-2005  yamt revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
 1.14 30-Jul-2005  yamt defflag VMSWAP.
 1.13 10-May-2005  jdolecek branches: 1.13.2;
assign major for nsmb(4)
 1.12 10-Oct-2004  jdolecek allocate major for alpq - PR port-cobalt/17675
 1.11 10-Dec-2003  jmc Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
 1.10 10-Oct-2003  jdolecek reassing majors for crypto and pf to use the newly defined MI major
range
 1.9 10-Oct-2003  jdolecek update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
 1.8 05-Oct-2003  jdolecek Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
 1.7 22-Aug-2003  itojun create /dev/crypto
 1.6 27-Jul-2003  itojun reserve cdev major # for PF. ok'ed by technical-exec
 1.5 25-Apr-2003  ragge branches: 1.5.2;
Add ksyms device major.
 1.4 20-Jan-2003  soren Attachment for the HD44780 display and keypad on the front of Cobalt machines.
 1.3 04-Oct-2002  elric branches: 1.3.2;
assign majors for raw and cooked cgd's.
 1.2 06-Sep-2002  gehenna branches: 1.2.2;
Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 16-May-2002  gehenna branches: 1.1.2;
file majors.cobalt was initially added on branch gehenna-devsw.
 1.1.2.3 14-Jul-2002  gehenna catch up with -current.
 1.1.2.2 30-May-2002  gehenna Add $NetBSD$
 1.1.2.1 16-May-2002  gehenna Add the list of block/character majors.
 1.2.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.2.2.1 06-Sep-2002  nathanw file majors.cobalt was added on branch nathanw_sa on 2002-09-17 21:14:08 +0000
 1.3.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.1 04-Oct-2002  jdolecek file majors.cobalt was added on branch kqueue on 2002-10-10 18:32:18 +0000
 1.5.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.4 19-Oct-2004  skrll Sync with HEAD
 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.13.2.4 21-Jan-2008  yamt sync with head
 1.13.2.3 03-Sep-2007  yamt sync with head.
 1.13.2.2 30-Dec-2006  yamt sync with head.
 1.13.2.1 21-Jun-2006  yamt sync with head.
 1.17.22.1 10-Dec-2006  yamt sync with head.
 1.17.20.1 12-Jan-2007  ad Sync with head.
 1.18.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.19.32.1 02-Jan-2008  bouyer Sync with HEAD
 1.19.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.19.20.1 09-Jan-2008  matt sync with HEAD
 1.20.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.20.6.2 29-Jun-2008  mjf Sync with HEAD.
 1.20.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.21.6.2 10-Oct-2008  skrll Sync with HEAD.
 1.21.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.21.4.2 11-Mar-2010  yamt sync with head
 1.21.4.1 04-May-2009  yamt sync with head.
 1.21.2.1 17-Jun-2008  yamt sync with head.
 1.22.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.22.4.1 19-Oct-2008  haad Sync with HEAD.
 1.24.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.28.4.1 06-Jun-2011  jruoho Sync with HEAD.
 1.28.2.1 31-May-2011  rmind sync with head
 1.30.54.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.30.54.1 10-Jun-2019  christos Sync with HEAD
 1.30.52.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.32.6.1 29-Feb-2020  ad Sync with head.
 1.32.4.1 20-Jun-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #962):

sys/arch/cobalt/conf/majors.cobalt: revision 1.34
etc/MAKEDEV.awk: revision 1.29
etc/etc.cobalt/MAKEDEV.conf: revision 1.18
etc/etc.cobalt/MAKEDEV.conf: revision 1.19

panel -> lcdpanel

Part of PR port-cobalt/55009

When reading in the MD MAKEDEV.conf, perform block / char major
substitutions that may be present in that file.
PR port-cobalt/55009

Create a compatibility symlink panel0 -> lcdpanel0
PR port-cobalt/55009

Fix leading 8 spaces to a tab.
 1.35.8.1 01-Aug-2021  thorpej Sync with HEAD.
 1.16 14-Jul-2021  thorpej Enable VMSWAP_DEFAULT_PLAINTEXT as default.
 1.15 20-Feb-2011  matt branches: 1.15.72;
Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).
 1.14 17-Dec-2009  matt branches: 1.14.4; 1.14.6; 1.14.8;
Enable mips64 support for cobalt.
 1.13 18-Jul-2006  tsutsui branches: 1.13.62; 1.13.80;
- always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
(XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
by default.
 1.12 11-Dec-2005  christos branches: 1.12.4; 1.12.8;
merge ktrace-lwp.
 1.11 17-Sep-2005  yamt include "conf/std".
 1.10 15-Mar-2004  rafal branches: 1.10.16;
Remove references to no-longer-existing options (MIPS3_L2CACHE_PRESENT and
MIPS3_5200).
 1.9 13-Dec-2003  sekiya Remove MIPS3_L2CACHE_ABSENT.
 1.8 12-Sep-2003  tsutsui Use common mips generic software interrupt routines.
 1.7 30-Aug-2003  chs add "makeoptions MACHINE_ARCH=..." in std.* for mips ports
where it is constant (to ease cross-building).
 1.6 09-Dec-2002  simonb branches: 1.6.6;
Remove the explicit `makeoptions MACHINE_ARCH="mipse{b,l}"' for kernel
builds and use the endianness of the toolchain being used to determine
the endianness of the kernel.
 1.5 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.4 23-Oct-2001  thorpej branches: 1.4.4;
For MIPS kernel Makefiles, don't set ENDIAN in std.${MACHINE}. Instead,
explicitly set MACHINE_ARCH to the appropriate thing. Makefile.mips will
then set all of the internal variables it needs to accordingly.
 1.3 03-Dec-2000  matt branches: 1.3.4;
Revert back to a machinearch (really cputype) of mips. Put ENDIAN back.
 1.2 22-Jun-2000  fvdl branches: 1.2.2;
Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC.
 1.1 19-Mar-2000  soren branches: 1.1.4;
NetBSD/cobalt. Work-in-progress.
 1.1.4.1 23-Jun-2000  fvdl As on the trunk, update these for the move of ffs_softdep.c into the
kernel source itself. Remove prefix construction, and add the SOFTDEP
option to GENERIC kernels.
 1.2.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 22-Jun-2000  bouyer file std.cobalt was added on branch thorpej_scsipi on 2000-11-20 20:07:01 +0000
 1.3.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.4.3 11-Dec-2002  thorpej Sync with HEAD.
 1.4.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.4.1 23-Oct-2001  nathanw file std.cobalt was added on branch nathanw_sa on 2002-01-08 00:24:00 +0000
 1.6.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.6.1 03-Aug-2004  skrll Sync with HEAD
 1.10.16.2 30-Dec-2006  yamt sync with head.
 1.10.16.1 21-Jun-2006  yamt sync with head.
 1.12.8.1 11-Aug-2006  yamt sync with head
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.80.1 28-Feb-2010  matt Adapt to new common interrupts.
Enable cobalt64
 1.13.62.1 11-Mar-2010  yamt sync with head
 1.14.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.14.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.14.4.1 05-Mar-2011  rmind sync with head
 1.15.72.1 01-Aug-2021  thorpej Sync with HEAD.
 1.22 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.21 20-Jan-2018  skrll branches: 1.21.2; 1.21.4;
Switch cobalt to common bus_space.

Tested on raq 2
 1.20 09-Jun-2015  matt #include <sys/cpu.h> or <mips/cpuregs.h> as needed
 1.19 09-Jul-2011  matt branches: 1.19.12; 1.19.30;
Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h
 1.18 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.17 27-Mar-2008  tsutsui Add kernel support for optional Z85C30 serial console on Cobalt Qube 2700.
There is some interrupt related issue (in MI z8530tty driver?) on heavy load,
but useful enough for debugging.
 1.16 22-Mar-2008  tsutsui Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.
 1.15 14-Mar-2008  cube Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend). Use proper types and ansify where appropriate.
 1.14 13-Jul-2006  gdamore branches: 1.14.34; 1.14.54; 1.14.58;
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.13 19-May-2006  tsutsui branches: 1.13.2;
Use cobalt_id to probe com at mainbus.
 1.12 15-Apr-2006  tsutsui branches: 1.12.2;
u_int32_t -> uint32_t
 1.11 06-Apr-2006  tsutsui Use bus_space_map(9) to get bus_space_handle_t on each driver
and remove bogus bus_space_handle_t member from mainbus_attach_args.
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.6; 1.10.8; 1.10.10; 1.10.12;
merge ktrace-lwp.
 1.9 29-Aug-2004  tsutsui branches: 1.9.12;
- rename comcnprobe() and comcninit() to com_mainbus_cnprobe() and
com_mainbus_cninit() and move these cn functions from cobalt/console.c
to dev/com_mainbus.c
- call cninit() only once
- remove unneeded includes
- use ANSI function decls
 1.8 17-Oct-2003  cdi branches: 1.8.4;
Change console code to use cninit() and null console. Add serial console
check.
 1.7 12-Sep-2003  tsutsui Use common mips generic software interrupt routines.
 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 13-Jan-2002  augustss Implement pci_intr_disestablish().
 1.2 31-Mar-2000  soren branches: 1.2.6; 1.2.10; 1.2.14;
Some cleanups.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.2.14.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.14.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.10.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.10.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 31-Mar-2000  bouyer file com_mainbus.c was added on branch thorpej_scsipi on 2000-11-20 20:07:02 +0000
 1.5.6.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.3 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.2 03-Sep-2004  skrll Sync with HEAD
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.4.1 16-Dec-2005  jmc Pullup rev 1.9 (requested by tsutsui in ticket #10175)

Cobalt kernel hangs in the second
consinit() call if it is loaded by the native bootloader,
so there is no bootstrap way to install other than to use
an older kernel.
 1.9.12.4 24-Mar-2008  yamt sync with head.
 1.9.12.3 17-Mar-2008  yamt sync with head.
 1.9.12.2 30-Dec-2006  yamt sync with head.
 1.9.12.1 21-Jun-2006  yamt sync with head.
 1.10.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.10.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.10.8.3 11-Aug-2006  yamt sync with head
 1.10.8.2 24-May-2006  yamt sync with head.
 1.10.8.1 11-Apr-2006  yamt sync with head
 1.10.6.2 01-Jun-2006  kardel Sync with head.
 1.10.6.1 22-Apr-2006  simonb Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.12.2.1 19-Jun-2006  chap Sync with head.
 1.13.2.1 15-Jun-2006  gdamore Another com_mainbus.c. There are a few more of them left... Again, only
compile tested at this point.
 1.14.58.1 03-Apr-2008  mjf Sync with HEAD.
 1.14.54.1 24-Mar-2008  keiichi sync with head.
 1.14.34.1 23-Mar-2008  matt sync with HEAD
 1.19.30.1 22-Sep-2015  skrll Sync with HEAD
 1.19.12.1 03-Dec-2017  jdolecek update from HEAD
 1.21.4.1 10-Jun-2019  christos Sync with HEAD
 1.21.2.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.2 11-Dec-2005  christos branches: 1.2.22;
merge ktrace-lwp.
 1.1 29-Aug-2004  tsutsui branches: 1.1.2;
- rename comcnprobe() and comcninit() to com_mainbus_cnprobe() and
com_mainbus_cninit() and move these cn functions from cobalt/console.c
to dev/com_mainbus.c
- call cninit() only once
- remove unneeded includes
- use ANSI function decls
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Sep-2004  skrll Sync with HEAD
 1.1.2.1 29-Aug-2004  skrll file com_mainbusvar.h was added on branch ktrace-lwp on 2004-09-03 12:44:29 +0000
 1.2.22.2 10-Sep-2006  riz Pull up following revision(s) (requested by tsutsui in ticket #10175):
sys/arch/cobalt/dev/com_mainbusvar.h: revision 1.1
sys/arch/cobalt/conf/files.cobalt: revision 1.20
sys/arch/cobalt/dev/com_mainbus.c: revision 1.9
sys/arch/cobalt/cobalt/console.c: revision 1.8
- rename comcnprobe() and comcninit() to com_mainbus_cnprobe() and
com_mainbus_cninit() and move these cn functions from cobalt/console.c
to dev/com_mainbus.c
- call cninit() only once
- remove unneeded includes
- use ANSI function decls
- rename comcnprobe() and comcninit() to com_mainbus_cnprobe() and
com_mainbus_cninit() and move these cn functions from cobalt/console.c
to dev/com_mainbus.c
- call cninit() only once
- remove unneeded includes
- use ANSI function decls
- rename comcnprobe() and comcninit() to com_mainbus_cnprobe() and
com_mainbus_cninit() and move these cn functions from cobalt/console.c
to dev/com_mainbus.c
- call cninit() only once
- remove unneeded includes
- use ANSI function decls
 1.2.22.1 11-Dec-2005  riz file com_mainbusvar.h was added on branch netbsd-2 on 2006-09-10 14:55:57 +0000
 1.35 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.34 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.33 24-Apr-2021  thorpej branches: 1.33.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.32 07-Jul-2020  thorpej branches: 1.32.4;
Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.
 1.31 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.30 02-Mar-2020  thorpej The PCI I/O space extent map needs to reflect the BUS_{START,END}
not the SYS_{START,END}.

This fixes mapping of the viaide DMA registers on my Qube2.
 1.29 20-Jan-2018  skrll branches: 1.29.4; 1.29.8;
Switch cobalt to common bus_space.

Tested on raq 2
 1.28 27-Jan-2012  para converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.27 09-Jul-2011  matt branches: 1.27.2; 1.27.6;
Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h
 1.26 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.25 17-May-2011  dyoung PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name. Correct that.

Rename PCI_FLAGS_IO_ENABLED to PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_ENABLED to PCI_FLAGS_MEM_OKAY, thus making their names
consistent with the other PCI flags and poisoning 3rd-party driver
sources that use the flags in the old bad way.

This patch produces no binary changes in this set of PCI kernels when
they are compiled w/o 'options DIAGNOSTIC' and w/ -V MKREPRO=yes:

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el 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
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
 1.24 15-Apr-2011  dyoung Don't set pba.pba_flags twice. No functional change intended.
 1.23 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).
 1.22 27-Nov-2009  rmind branches: 1.22.4; 1.22.6; 1.22.8;
- 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.21 09-May-2008  tsutsui branches: 1.21.16;
Split softc/device_t, with misc related changes.
 1.20 10-Sep-2006  tsutsui branches: 1.20.54; 1.20.56; 1.20.58; 1.20.60;
Remove or comment out now unused code after MI mips3_clockintr migration.
 1.19 28-May-2006  tsutsui branches: 1.19.6;
Initialize the GT64x11 PCI timeout and retry register with a value taken
from Linux/MIPS, which improves viaide xfer performance significantly.
 1.18 20-May-2006  tsutsui Change range of PCI I/O space for pci_configure_bus(9)
so that viaide(4) works with PCI fixup (not enabled yet).
 1.17 21-Apr-2006  tsutsui branches: 1.17.2;
Explicitly mask timer0 interrupt until cpu_initclocks(9).
 1.16 16-Apr-2006  tsutsui Pass mips_dcache_align to pci_configure_bus(9) for cacheline_size.
 1.15 05-Apr-2006  tsutsui ANSIfy, KNF
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.6; 1.14.8; 1.14.10; 1.14.12;
merge ktrace-lwp.
 1.13 25-Mar-2005  tsutsui branches: 1.13.2;
Switch cobalt port to use MI pci_configure_bus(9)
with options PCI_NETBSD_CONFIGURE.
Patch from KIYOHARA Takashi on port-cobalt.

This change makes siop(4) (and maybe all other PCI devices
using pci mem space) work on cobalt.
 1.12 30-Aug-2004  drochner branches: 1.12.4; 1.12.6; 1.12.10;
Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
 1.11 28-Aug-2004  tsutsui - Use bus_space(9) to access PCI configuration registers on GT64111.
- Remove unused pci stuff from mainbus.c.
 1.10 28-Aug-2004  tsutsui - Reset timer0 of GT64111 in gt_attach() and start it
in cpu_initclocks(9) via a callback function.
Fixes the "hardclock(9) is called before cpu_initclocks(9)" problem
reported by KIYOHARA Takashi on port-cobalt.
- Use bus_space(9) functions to access GT64111 registers and
add register definitions for GT64111 in gtreg.h.
(XXX this could be in sys/dev/marvell?)
- Move microtime(9) from machdep.c to clock.c, and read timer0 register
via a callback function. Also change microtime(9) like other ports
to guarantee that the time will be greater than the value obtained
by a previous call.
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 15-Jun-2003  fvdl branches: 1.8.2;
Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
 1.7 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 16-May-2002  thorpej branches: 1.5.2;
* Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses. For busses behind a bridge, it points to
a persistent copy of the bridge's pcitag_t. This can be very useful
for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
uses OFW device nodes to enumerate the bus. When a PCI bus that is
behind a bridge is attached, pci_attach_hook() allocates a new PCI
chipset tag for the new bus and sets it's "curnode" to the OFW node
of the bridge. This is used as a starting point when enumerating
that bus. Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
 1.4 29-May-2000  soren branches: 1.4.4; 1.4.8; 1.4.12;
Static poisoning.
 1.3 09-Apr-2000  soren branches: 1.3.2;
Disabling PCI Memory Read Multiple improves Tulip transmit performance 30%.
 1.2 31-Mar-2000  soren Some cleanups.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.3.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.4.12.2 18-Oct-2002  nathanw Catch up to -current.
 1.4.12.1 20-Jun-2002  nathanw Catch up to -current.
 1.4.8.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.8.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.4.1 29-May-2000  bouyer file gt.c was added on branch thorpej_scsipi on 2000-11-20 20:07:02 +0000
 1.5.2.2 16-May-2002  thorpej * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses. For busses behind a bridge, it points to
a persistent copy of the bridge's pcitag_t. This can be very useful
for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
uses OFW device nodes to enumerate the bus. When a PCI bus that is
behind a bridge is attached, pci_attach_hook() allocates a new PCI
chipset tag for the new bus and sets it's "curnode" to the OFW node
of the bridge. This is used as a starting point when enumerating
that bus. Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
 1.5.2.1 16-May-2002  thorpej file gt.c was added on branch gehenna-devsw on 2002-05-16 01:01:36 +0000
 1.8.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.8.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.2 03-Sep-2004  skrll Sync with HEAD
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.10.6 12-Jun-2006  tron Pull up following revision(s) (requested by tsutsui in ticket #1359):
sys/arch/cobalt/dev/gt.c: revision 1.19
Initialize the GT64x11 PCI timeout and retry register with a value taken
from Linux/MIPS, which improves viaide xfer performance significantly.
 1.12.10.5 12-Jun-2006  tron Pull up following revision(s) (requested by tsutsui in ticket #1359):
sys/arch/cobalt/dev/gt.c: revision 1.18
Change range of PCI I/O space for pci_configure_bus(9)
so that viaide(4) works with PCI fixup (not enabled yet).
 1.12.10.4 12-Jun-2006  tron Pull up following revision(s) (requested by tsutsui in ticket #1359):
sys/arch/cobalt/dev/gt.c: revision 1.17
Explicitly mask timer0 interrupt until cpu_initclocks(9).
 1.12.10.3 12-Jun-2006  tron Pull up following revision(s) (requested by tsutsui in ticket #1359):
sys/arch/cobalt/dev/gt.c: revision 1.16
Pass mips_dcache_align to pci_configure_bus(9) for cacheline_size.
 1.12.10.2 12-Jun-2006  tron Pull up following revision(s) (requested by tsutsui in ticket #1359):
sys/arch/cobalt/dev/gt.c: revision 1.15
ANSIfy, KNF
 1.12.10.1 27-Mar-2005  tron Pull up revision 1.13 (requested by tsutsui in ticket #67):
Switch cobalt port to use MI pci_configure_bus(9)
with options PCI_NETBSD_CONFIGURE.
Patch from KIYOHARA Takashi on port-cobalt.
This change makes siop(4) (and maybe all other PCI devices
using pci mem space) work on cobalt.
 1.12.6.1 26-Mar-2005  yamt sync with head.
 1.12.4.1 29-Apr-2005  kent sync with -current
 1.13.2.2 30-Dec-2006  yamt sync with head.
 1.13.2.1 21-Jun-2006  yamt sync with head.
 1.14.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.14.10.2 11-May-2006  elad sync with head
 1.14.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.14.8.4 14-Sep-2006  yamt sync with head.
 1.14.8.3 26-Jun-2006  yamt sync with head.
 1.14.8.2 24-May-2006  yamt sync with head.
 1.14.8.1 11-Apr-2006  yamt sync with head
 1.14.6.2 01-Jun-2006  kardel Sync with head.
 1.14.6.1 22-Apr-2006  simonb Sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.17.2.1 19-Jun-2006  chap Sync with head.
 1.19.6.1 18-Nov-2006  ad Sync with head.
 1.20.60.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.20.58.2 11-Mar-2010  yamt sync with head
 1.20.58.1 16-May-2008  yamt sync with head.
 1.20.56.1 18-May-2008  yamt sync with head.
 1.20.54.1 02-Jun-2008  mjf Sync with HEAD.
 1.21.16.1 20-Jan-2010  matt Adjust things to the new world order.
 1.22.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.22.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.22.4.3 31-May-2011  rmind sync with head
 1.22.4.2 21-Apr-2011  rmind sync with head
 1.22.4.1 05-Mar-2011  rmind sync with head
 1.27.6.1 18-Feb-2012  mrg merge to -current.
 1.27.2.1 17-Apr-2012  yamt sync with head
 1.29.8.1 02-Mar-2020  martin Pull up following revision(s) (requested by thorpej in ticket #751):

sys/arch/cobalt/dev/gt.c: revision 1.30

The PCI I/O space extent map needs to reflect the BUS_{START,END}
not the SYS_{START,END}.

This fixes mapping of the viaide DMA registers on my Qube2.
 1.29.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.32.4.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.33.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 20-Jan-2018  skrll Switch cobalt to common bus_space.

Tested on raq 2
 1.1 20-Jan-2018  skrll Switch cobalt to common bus_space.

Tested on raq 2
 1.4 17-May-2006  tsutsui Add definitions for the PCI timeout and retry register.
 1.3 09-Apr-2006  tsutsui Replace some magic numbers with macro.
 1.2 11-Dec-2005  christos branches: 1.2.4; 1.2.6; 1.2.8; 1.2.10; 1.2.12;
merge ktrace-lwp.
 1.1 28-Aug-2004  tsutsui branches: 1.1.2; 1.1.12; 1.1.14;
- Reset timer0 of GT64111 in gt_attach() and start it
in cpu_initclocks(9) via a callback function.
Fixes the "hardclock(9) is called before cpu_initclocks(9)" problem
reported by KIYOHARA Takashi on port-cobalt.
- Use bus_space(9) functions to access GT64111 registers and
add register definitions for GT64111 in gtreg.h.
(XXX this could be in sys/dev/marvell?)
- Move microtime(9) from machdep.c to clock.c, and read timer0 register
via a callback function. Also change microtime(9) like other ports
to guarantee that the time will be greater than the value obtained
by a previous call.
 1.1.14.1 21-Jun-2006  yamt sync with head.
 1.1.12.2 12-Jun-2006  tron Pull up following revision(s) (requested by tsutsui in ticket #1359):
sys/arch/cobalt/dev/gtreg.h: revision 1.4
Add definitions for the PCI timeout and retry register.
 1.1.12.1 12-Jun-2006  tron Pull up following revision(s) (requested by tsutsui in ticket #1359):
sys/arch/cobalt/dev/gtreg.h: revision 1.3
sys/arch/cobalt/pci/pci_machdep.c: revision 1.21
Replace some magic numbers with macro.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Sep-2004  skrll Sync with HEAD
 1.1.2.1 28-Aug-2004  skrll file gtreg.h was added on branch ktrace-lwp on 2004-09-03 12:44:29 +0000
 1.2.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.2.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.2.8.2 24-May-2006  yamt sync with head.
 1.2.8.1 11-Apr-2006  yamt sync with head
 1.2.6.2 01-Jun-2006  kardel Sync with head.
 1.2.6.1 22-Apr-2006  simonb Sync with head.
 1.2.4.1 09-Sep-2006  rpaulo sync with head
 1.1 20-Jan-2018  skrll Switch cobalt to common bus_space.

Tested on raq 2
 1.1 09-Apr-2018  christos branches: 1.1.2;
rename panel to lcdpanel.
 1.1.2.2 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.1.2.1 09-Apr-2018  pgoyette file lcdpanel.c was added on branch pgoyette-compat on 2018-04-16 01:59:54 +0000
 1.5 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.4 29-Mar-2008  tsutsui Don't forget to initialize sc_dev.
 1.3 28-Mar-2008  tsutsui Split device_t and softc for MI mc146818 clock,
and other related misc cosmetics.
 1.2 10-Jan-2008  tsutsui branches: 1.2.6;
Move todr_attach(9) calls from each MD attachment to MI mc146818_attach().
 1.1 15-Apr-2006  tsutsui branches: 1.1.2; 1.1.4; 1.1.8; 1.1.10; 1.1.14; 1.1.20; 1.1.50; 1.1.56; 1.1.64;
Switch cobalt port to use MI todr(9) functions and MI mc146818 driver.
Tested on RaQ2 and Qube2 on port-cobalt.
 1.1.64.1 10-Jan-2008  bouyer Sync with HEAD
 1.1.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.1.50.1 23-Mar-2008  matt sync with HEAD
 1.1.20.2 09-Sep-2006  rpaulo sync with head
 1.1.20.1 15-Apr-2006  rpaulo file mcclock.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:28 +0000
 1.1.14.3 21-Jan-2008  yamt sync with head
 1.1.14.2 21-Jun-2006  yamt sync with head.
 1.1.14.1 15-Apr-2006  yamt file mcclock.c was added on branch yamt-lazymbuf on 2006-06-21 14:50:07 +0000
 1.1.10.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.1.10.1 15-Apr-2006  tron file mcclock.c was added on branch peter-altq on 2006-05-24 15:47:53 +0000
 1.1.8.2 24-May-2006  yamt sync with head.
 1.1.8.1 15-Apr-2006  yamt file mcclock.c was added on branch yamt-pdpolicy on 2006-05-24 10:56:39 +0000
 1.1.4.2 22-Apr-2006  simonb Sync with head.
 1.1.4.1 15-Apr-2006  simonb file mcclock.c was added on branch simonb-timecounters on 2006-04-22 11:37:21 +0000
 1.1.2.2 19-Apr-2006  elad sync with head - hopefully this will work
 1.1.2.1 15-Apr-2006  elad file mcclock.c was added on branch elad-kernelauth on 2006-04-19 02:32:21 +0000
 1.2.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.25 09-Apr-2018  christos rename panel to lcdpanel.
 1.24 25-Jul-2014  dholland branches: 1.24.26;
Add d_discard to all struct cdevsw instances I could find.

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

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.22 01-Jul-2011  dyoung branches: 1.22.2; 1.22.12; 1.22.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.21 03-May-2011  tsutsui TAB/space cosmetics.
 1.20 31-Aug-2009  tsutsui branches: 1.20.4; 1.20.6;
Replace shutdownhook_establish(9) with pmf_device_register1(9).
Also check howto to print appropriate "Rebooting..." or "Halting..." messages.
 1.19 20-Aug-2009  tsutsui Adjust attach message for failure path (found on gxemul).
 1.18 09-May-2008  tsutsui branches: 1.18.8; 1.18.16;
Split softc/device_t, with misc related changes.
 1.17 22-Mar-2008  tsutsui branches: 1.17.2; 1.17.4; 1.17.6;
Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.
 1.16 04-Mar-2008  tsutsui Print "NetBSD/cobalt Starting up... " to LCD panel on boot, and also
print "NetBSD/cobalt Shutting donw..." on halt via shutdown hook.
This would be useful for users who don't have serial console.

No objection on port-cobalt.
 1.15 01-Mar-2008  rmind Welcome to 4.99.55:

- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call. It will
indicate which event (POLL_IN, POLL_OUT, etc) happen. If unknown,
zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
 1.14 17-Oct-2007  garbled branches: 1.14.12; 1.14.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

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

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.12 04-Mar-2007  christos branches: 1.12.2; 1.12.4; 1.12.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11 24-Jan-2007  hubertf branches: 1.11.2;
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.10 06-Apr-2006  tsutsui branches: 1.10.8; 1.10.12; 1.10.14;
Use bus_space_map(9) to get bus_space_handle_t on each driver
and remove bogus bus_space_handle_t member from mainbus_attach_args.
 1.9 05-Apr-2006  tsutsui - ANSIfy
- KNF
- u_intNN_t -> uintNN_t
- include "ioconf.h" for struct cfdriver panel_cd
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.6; 1.8.8; 1.8.10; 1.8.12;
merge ktrace-lwp.
 1.7 14-Aug-2005  joff hd44780 layer for register reads/writes now takes another argument.
 1.6 04-Feb-2005  joff branches: 1.6.6;
Structure member misnamed. "rows" should be "cols"
 1.5 11-Jan-2005  joff branches: 1.5.2; 1.5.4;
Use hd44780var.h instead of hd44780_subr.h
 1.4 08-Jan-2005  joff Replace the rwrite and rread functions that take a bus_space_tag_t and
bus_space_handle_t with the new writereg and readreg
functions that take a struct hd44780_chip * and a u_int32_t rs (register-select)
 1.3 12-Sep-2003  tsutsui TAB/space cleanup.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 20-Jan-2003  soren branches: 1.1.2;
Attachment for the HD44780 display and keypad on the front of Cobalt machines.
 1.1.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.6 04-Feb-2005  skrll Sync with HEAD.
 1.1.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.1.2.4 17-Jan-2005  skrll Adapt to branch.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.5.4.1 12-Feb-2005  yamt sync with head.
 1.5.2.1 29-Apr-2005  kent sync with -current
 1.6.6.5 24-Mar-2008  yamt sync with head.
 1.6.6.4 17-Mar-2008  yamt sync with head.
 1.6.6.3 03-Sep-2007  yamt sync with head.
 1.6.6.2 26-Feb-2007  yamt sync with head.
 1.6.6.1 21-Jun-2006  yamt sync with head.
 1.8.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.8.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.8.8.1 11-Apr-2006  yamt sync with head
 1.8.6.1 22-Apr-2006  simonb Sync with head.
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.10.14.1 03-Jun-2008  skrll Sync with netbsd-4.
 1.10.12.1 24-Mar-2008  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1103):
sys/arch/cobalt/dev/panel.c: revision 1.16
Print "NetBSD/cobalt Starting up... " to LCD panel on boot, and also
print "NetBSD/cobalt Shutting donw..." on halt via shutdown hook.
This would be useful for users who don't have serial console.
No objection on port-cobalt.
 1.10.8.1 01-Feb-2007  ad Sync with head.
 1.11.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.12.10.1 03-Oct-2007  garbled Sync with HEAD
 1.12.4.1 11-Jul-2007  mjf Sync with head.
 1.12.2.1 15-Jul-2007  ad Sync with head.
 1.13.10.2 23-Mar-2008  matt sync with HEAD
 1.13.10.1 06-Nov-2007  matt sync with HEAD
 1.14.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.14.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.14.12.1 24-Mar-2008  keiichi sync with head.
 1.17.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.17.4.2 16-Sep-2009  yamt sync with head
 1.17.4.1 16-May-2008  yamt sync with head.
 1.17.2.1 18-May-2008  yamt sync with head.
 1.18.16.1 29-Dec-2010  matt Sync with netbsd-5
 1.18.8.2 03-Oct-2009  snj Pull up following revision(s) (requested by tsutsui in ticket #1053):
sys/arch/cobalt/dev/panel.c: revision 1.20
Replace shutdownhook_establish(9) with pmf_device_register1(9).
Also check howto to print appropriate "Rebooting..." or "Halting..." messages.
 1.18.8.1 03-Oct-2009  snj Pull up following revision(s) (requested by tsutsui in ticket #1053):
sys/arch/cobalt/dev/panel.c: revision 1.19
Adjust attach message for failure path (found on gxemul).
 1.20.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.20.4.1 31-May-2011  rmind sync with head
 1.22.16.1 18-May-2014  rmind sync with head
 1.22.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.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.23.2.1 10-Aug-2014  tls Rebase.
 1.24.26.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.7 11-Sep-2021  andvar Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
 1.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 09-Jun-2015  matt branches: 1.4.32;
#include <sys/cpu.h> or <mips/cpuregs.h> as needed
 1.3 28-Apr-2008  martin branches: 1.3.44; 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 29-Mar-2008  tsutsui branches: 1.2.2; 1.2.4; 1.2.6;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.1 27-Mar-2008  tsutsui Add kernel support for optional Z85C30 serial console on Cobalt Qube 2700.
There is some interrupt related issue (in MI z8530tty driver?) on heavy load,
but useful enough for debugging.
 1.2.6.1 16-May-2008  yamt sync with head.
 1.2.4.1 18-May-2008  yamt sync with head.
 1.2.2.3 02-Jun-2008  mjf Sync with HEAD.
 1.2.2.2 03-Apr-2008  mjf Sync with HEAD.
 1.2.2.1 29-Mar-2008  mjf file zs.c was added on branch mjf-devfs2 on 2008-04-03 12:42:13 +0000
 1.3.64.1 22-Sep-2015  skrll Sync with HEAD
 1.3.44.1 03-Dec-2017  jdolecek update from HEAD
 1.4.32.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.5.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.25 30-Nov-2024  christos Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.24 12-Jul-2018  maxv branches: 1.24.36;
Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.23 21-Dec-2015  christos branches: 1.23.16; 1.23.18;
Add mips fenv.h (From FreeBSD)
 1.22 23-Jul-2014  alnsn branches: 1.22.4;
Rename sljitarch.h to sljit_machdep.h.
 1.21 22-Jul-2014  alnsn Add sljitarch.h to cobalt and pmax.
 1.20 17-Jul-2011  joerg branches: 1.20.12; 1.20.26;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.19 12-Aug-2009  matt Nuke a.out support for MIPS.
 1.18 22-Mar-2008  tsutsui branches: 1.18.4;
Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.
 1.17 09-Feb-2007  ad branches: 1.17.44;
Merge newlock2 to head.
 1.16 26-Jul-2006  drochner branches: 1.16.4;
don't install <machine/db_machdep.h>, this is kernel only
 1.15 11-Dec-2005  christos branches: 1.15.4; 1.15.8;
merge ktrace-lwp.
 1.14 08-May-2004  kleink branches: 1.14.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.13 17-Jan-2003  thorpej branches: 1.13.2;
Merge the nathanw_sa branch.
 1.12 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.11 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.10 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.9 15-Apr-2001  kleink branches: 1.9.2; 1.9.8; 1.9.16;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.8 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.7 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
 1.6 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.5 26-Jun-2000  kleink branches: 1.5.2; 1.5.4;
Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.4 29-Apr-2000  thorpej Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.3 30-Mar-2000  soren Add asm.h like other ports.
 1.2 21-Mar-2000  soren Add math.h.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.5.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.5.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.2.1 26-Jun-2000  bouyer file Makefile was added on branch thorpej_scsipi on 2000-11-20 20:07:02 +0000
 1.9.16.2 30-Aug-2002  gehenna catch up with -current.
 1.9.16.1 19-May-2002  gehenna Remove port-dependent conf.h.
 1.9.8.5 11-Dec-2002  thorpej Sync with HEAD.
 1.9.8.4 17-Sep-2002  nathanw Catch up to -current.
 1.9.8.3 13-Aug-2002  nathanw Catch up to -current.
 1.9.8.2 17-Nov-2001  wdk mcontext support for MIPS based ports.
 1.9.8.1 15-Apr-2001  wdk file Makefile was added on branch nathanw_sa on 2001-11-17 23:12:07 +0000
 1.9.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.2.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.13.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.12.3 24-Mar-2008  yamt sync with head.
 1.14.12.2 26-Feb-2007  yamt sync with head.
 1.14.12.1 30-Dec-2006  yamt sync with head.
 1.15.8.1 11-Aug-2006  yamt sync with head
 1.15.4.1 09-Sep-2006  rpaulo sync with head
 1.16.4.1 01-Feb-2007  ad Header file cleanup.
 1.17.44.1 03-Apr-2008  mjf Sync with HEAD.
 1.18.4.1 19-Aug-2009  yamt sync with head.
 1.20.26.1 10-Aug-2014  tls Rebase.
 1.20.12.2 03-Dec-2017  jdolecek update from HEAD
 1.20.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.23.18.1 10-Jun-2019  christos Sync with HEAD
 1.23.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.24.36.1 02-Aug-2025  perseant Sync with HEAD
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file ansi.h was added on branch thorpej_scsipi on 2000-11-20 20:07:02 +0000
 1.2 12-Aug-2009  matt Nuke a.out support for MIPS.
 1.1 19-Mar-2000  soren branches: 1.1.6; 1.1.136; 1.1.150;
NetBSD/cobalt. Work-in-progress.
 1.1.150.1 24-Oct-2010  jym Sync with HEAD
 1.1.136.1 19-Aug-2009  yamt sync with head.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file aout_machdep.h was added on branch thorpej_scsipi on 2000-11-20 20:07:02 +0000
 1.1 30-Mar-2000  soren branches: 1.1.6;
Add asm.h like other ports.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 30-Mar-2000  bouyer file asm.h was added on branch thorpej_scsipi on 2000-11-20 20:07:02 +0000
 1.6 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.5 17-Dec-2009  matt Enable mips64 support for cobalt.
 1.4 27-Mar-2008  tsutsui branches: 1.4.4;
Add kernel support for optional Z85C30 serial console on Cobalt Qube 2700.
There is some interrupt related issue (in MI z8530tty driver?) on heavy load,
but useful enough for debugging.
 1.3 06-Apr-2006  tsutsui branches: 1.3.62;
Use bus_space_map(9) to get bus_space_handle_t on each driver
and remove bogus bus_space_handle_t member from mainbus_attach_args.
 1.2 05-May-2000  soren branches: 1.2.6; 1.2.46; 1.2.60; 1.2.62; 1.2.64; 1.2.66; 1.2.68;
Add licenses.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.2.68.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.2.66.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.2.64.1 11-Apr-2006  yamt sync with head
 1.2.62.1 22-Apr-2006  simonb Sync with head.
 1.2.60.1 09-Sep-2006  rpaulo sync with head
 1.2.46.1 21-Jun-2006  yamt sync with head.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 05-May-2000  bouyer file autoconf.h was added on branch thorpej_scsipi on 2000-11-20 20:07:02 +0000
 1.3.62.1 03-Apr-2008  mjf Sync with HEAD.
 1.4.4.1 11-Mar-2010  yamt sync with head
 1.10 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).
 1.9 30-Dec-2009  he branches: 1.9.4; 1.9.6; 1.9.8;
Change prototype of lookup_bootinfo() so that it matches the
implementation again.
 1.8 17-Dec-2009  matt Enable mips64 support for cobalt.
 1.7 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.6 17-Oct-2007  garbled branches: 1.6.20; 1.6.28; 1.6.34;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.5 10-Aug-2007  tsutsui branches: 1.5.2;
Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.
 1.4 15-Apr-2006  tsutsui branches: 1.4.12; 1.4.18; 1.4.26; 1.4.28; 1.4.32; 1.4.36;
u_intNN_t -> uintNN_t
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.6; 1.3.8; 1.3.10; 1.3.12;
merge ktrace-lwp.
 1.2 24-Mar-2004  drochner branches: 1.2.4; 1.2.18;
remove license clauses 3 and 4 from my cpoyright notices
 1.1 07-Jan-2004  cdi Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.
 1.2.18.2 03-Sep-2007  yamt sync with head.
 1.2.18.1 21-Jun-2006  yamt sync with head.
 1.2.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.2.4.2 03-Aug-2004  skrll Sync with HEAD
 1.2.4.1 24-Mar-2004  skrll file bootinfo.h was added on branch ktrace-lwp on 2004-08-03 10:33:46 +0000
 1.3.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.3.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.3.8.1 24-May-2006  yamt sync with head.
 1.3.6.1 22-Apr-2006  simonb Sync with head.
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.4.36.1 16-Aug-2007  jmcneill Sync with HEAD.
 1.4.32.1 15-Aug-2007  skrll Sync with HEAD.
 1.4.28.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.4.26.1 03-Oct-2007  garbled Sync with HEAD
 1.4.18.1 20-Aug-2007  ad Sync with HEAD.
 1.4.12.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.5.2.1 06-Nov-2007  matt sync with HEAD
 1.6.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.6.20.2 11-Mar-2010  yamt sync with head
 1.6.20.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.2 12-Aug-2009  matt Nuke a.out support for MIPS.
 1.1 19-Mar-2000  soren branches: 1.1.6; 1.1.136; 1.1.150;
NetBSD/cobalt. Work-in-progress.
 1.1.150.1 24-Oct-2010  jym Sync with HEAD
 1.1.136.1 19-Aug-2009  yamt sync with head.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file bsd-aout.h was added on branch thorpej_scsipi on 2000-11-20 20:07:03 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file bswap.h was added on branch thorpej_scsipi on 2000-11-20 20:07:03 +0000
 1.24 17-Jul-2011  dyoung Switch MIPS and MIPS-ish architectures to new-style <sys/bus.h>. This
involves moving some inline bus_space(9) implementation into .c files.
 1.23 20-Aug-2009  tsutsui Add an empty bus_space_mmap(9) function as temporary workaround
for MI pci(4) mmap function in sys/dev/pci/pci_usrreq.c.
 1.22 28-Apr-2008  martin branches: 1.22.10; 1.22.18;
Remove clause 3 and 4 from TNF licenses
 1.21 04-Mar-2007  christos branches: 1.21.40; 1.21.42; 1.21.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.20 21-Feb-2007  mrg add a pair of new bus_dma(9) functions:
int _bus_dmatag_subregion(bus_dma_tag_t tag,
bus_addr_t min_addr,
bus_addr_t max_addr,
bus_dma_tag_t *newtag,
int flags)
void _bus_dmatag_destroy(bus_dma_tag_t tag)

that allow a (normally broken/limited) device to restrict the bus address
range it can talk to. this is used by bce(4) to limit DMA addresses to
1GB range, the maximum the chip can address.

all this is from Yorick Hardy <yhardy@uj.ac.za> with input from several
people on tech-kern.

XXX: bus_dma(9) needs an update still.
 1.19 26-May-2006  tsutsui branches: 1.19.12;
Tweak bus_space_barrier(9) macro to appease
"left-hand operand of comma expression has no effect"
warnings by gcc4.
 1.18 18-May-2006  tsutsui branches: 1.18.2;
Add bus_space_*_stream_N() macros, which are identical with non-stream ops.
 1.17 16-Apr-2006  tsutsui _ds_vaddr member in struct cobalt_bus_dma_segment is a virtual address,
so it should be vaddr_t rather than bus_addr_t.
 1.16 15-Apr-2006  tsutsui u_intNN_t -> uintNN_t
 1.15 01-Mar-2006  yamt branches: 1.15.2; 1.15.4; 1.15.6;
merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
the latter is more natural to specify an address space.
(and less likely to be abused for random purposes.)
- fix a swdmover race.
 1.14 16-Feb-2006  perry Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.13 24-Dec-2005  perry branches: 1.13.2; 1.13.4; 1.13.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.12 11-Dec-2005  christos merge ktrace-lwp.
 1.11 09-Mar-2005  matt branches: 1.11.4;
Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create). dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
 1.10 15-Jun-2003  fvdl branches: 1.10.2; 1.10.10; 1.10.12;
Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
 1.9 28-Jan-2003  kent Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it.
 1.8 17-Mar-2002  simonb Make sure that private DMA flags don't overlap with standard DMA flags;
start these at 0x10000 to leave room for an increase in the latter.
 1.7 14-Nov-2001  thorpej branches: 1.7.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.6 19-Jul-2001  thorpej branches: 1.6.4;
Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
 1.5 07-Mar-2001  thorpej branches: 1.5.2;
Add the BUS_DMA_STREAMING flag.
 1.4 26-Jun-2000  simonb branches: 1.4.2; 1.4.4;
Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.3 27-May-2000  soren branches: 1.3.4;
The datap argument to the write_{multi,region} calls is const.
 1.2 31-Mar-2000  soren Some cleanups.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.3.4.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.4.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.4.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.4.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.2.1 26-Jun-2000  bouyer file bus.h was added on branch thorpej_scsipi on 2000-11-20 20:07:03 +0000
 1.5.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.2.1 03-Aug-2001  lukem update to -current
 1.6.4.1 13-Nov-2001  thorpej bus_dmamap_sync() optimizes for the virtually-indexed write-back
cache present on the RM52xx CPU that the Cobalt usees.
 1.7.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.7.2.1 14-Nov-2001  nathanw file bus.h was added on branch nathanw_sa on 2002-04-01 07:39:42 +0000
 1.10.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.10.10.1 29-Apr-2005  kent sync with -current
 1.10.2.1 01-Apr-2005  skrll Sync with HEAD.
 1.11.4.3 03-Sep-2007  yamt sync with head.
 1.11.4.2 26-Feb-2007  yamt sync with head.
 1.11.4.1 21-Jun-2006  yamt sync with head.
 1.13.6.2 01-Jun-2006  kardel Sync with head.
 1.13.6.1 22-Apr-2006  simonb Sync with head.
 1.13.4.1 09-Sep-2006  rpaulo sync with head
 1.13.2.2 18-Feb-2006  yamt sync with head.
 1.13.2.1 18-Feb-2006  yamt keep vmspace rather than proc in cobalt_bus_dmamap.
 1.15.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.15.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.15.2.2 26-Jun-2006  yamt sync with head.
 1.15.2.1 24-May-2006  yamt sync with head.
 1.18.2.1 19-Jun-2006  chap Sync with head.
 1.19.12.2 12-Mar-2007  rmind Sync with HEAD.
 1.19.12.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.21.44.2 16-Sep-2009  yamt sync with head
 1.21.44.1 16-May-2008  yamt sync with head.
 1.21.42.1 18-May-2008  yamt sync with head.
 1.21.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.22.18.1 24-Dec-2010  matt Define bus_space_mmap
 1.22.10.1 16-Sep-2009  snj Pull up following revision(s) (requested by mrg in ticket #952):
sys/arch/cobalt/cobalt/bus.c: revision 1.36
sys/arch/cobalt/include/bus.h: revision 1.23
Add an empty bus_space_mmap(9) function as a workaround
for MI pci(4) mmap function in sys/dev/pci/pci_usrreq.c.
 1.4 07-Feb-2019  mrg remove stuff provided by generic mips headers
 1.3 20-Jan-2018  skrll branches: 1.3.4;
Switch cobalt to common bus_space.

Tested on raq 2
 1.2 29-Jul-2014  skrll Convert cobalt to generic mips bus_dma.
 1.1 01-Jul-2011  dyoung branches: 1.1.12; 1.1.26;
Per discussion at
<http://mail-index.netbsd.org/tech-kern/2010/04/02/msg007941.html>,
divide each machine's bus.h into bus_defs.h (constants & data types)
and bus_funcs.h (macro implementations of bus_space(9) routines and MD
prototypes).

Note that some bus_space(9) routines' implementation will move to .c
files from inline subroutines or macros in .h files.

I've only made the split for machine architectures where there is PCI.
All of the non-PCI-having architectures will require a similar split.

These #include files are not referenced by any (committed) Makefiles or
header files, yet. Changes to Makefiles, to <sys/bus.h>, and to some
more machine-dependent files will dribble in before I throw the switch.
 1.1.26.1 10-Aug-2014  tls Rebase.
 1.1.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 10-Jun-2019  christos Sync with HEAD
 1.3 20-Jan-2018  skrll Switch cobalt to common bus_space.

Tested on raq 2
 1.2 29-Jul-2014  skrll Convert cobalt to generic mips bus_dma.
 1.1 01-Jul-2011  dyoung branches: 1.1.12; 1.1.26;
Per discussion at
<http://mail-index.netbsd.org/tech-kern/2010/04/02/msg007941.html>,
divide each machine's bus.h into bus_defs.h (constants & data types)
and bus_funcs.h (macro implementations of bus_space(9) routines and MD
prototypes).

Note that some bus_space(9) routines' implementation will move to .c
files from inline subroutines or macros in .h files.

I've only made the split for machine architectures where there is PCI.
All of the non-PCI-having architectures will require a similar split.

These #include files are not referenced by any (committed) Makefiles or
header files, yet. Changes to Makefiles, to <sys/bus.h>, and to some
more machine-dependent files will dribble in before I throw the switch.
 1.1.26.1 10-Aug-2014  tls Rebase.
 1.1.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file cdefs.h was added on branch thorpej_scsipi on 2000-11-20 20:07:03 +0000
 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 27-Feb-2002  christos branches: 1.2.8;
- define other DEV_ constants that the local port uses.
- delete cdev_decl(mm) since <sys/conf.h> does it.
 1.1 19-Mar-2000  soren branches: 1.1.6; 1.1.10; 1.1.14;
NetBSD/cobalt. Work-in-progress.
 1.1.14.2 17-Sep-2002  nathanw Catch up to -current.
 1.1.14.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.10.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.10.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file conf.h was added on branch thorpej_scsipi on 2000-11-20 20:07:03 +0000
 1.2.8.1 19-May-2002  gehenna Remove port-dependent conf.h.
 1.16 09-Apr-2018  christos rename panel to lcdpanel.
 1.15 03-May-2011  tsutsui branches: 1.15.54;
TAB/space cosmetics.
 1.14 28-May-2008  tsutsui branches: 1.14.20; 1.14.26;
Print boot banner and a loading kernel name onto LCD,
for users who don't have serial console. Bump version.
 1.13 23-Mar-2008  tsutsui branches: 1.13.2; 1.13.4; 1.13.6;
Use macro defined in <machine/cpu.h> for cobalt_id and device addresses etc.
since <machine/leds.h> has been removed.
Also remove redundant address definitions in Makefile and local headers.
Pointed out by dieter roelants.
 1.12 22-Mar-2008  tsutsui Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.
 1.11 15-Apr-2006  tsutsui branches: 1.11.62;
Identify cobalt models at boot and store it to a variable cobalt_id.
Tested on and Qube2 by several people on port-cobalt and my RaQ2.
 1.10 04-Sep-2001  simonb branches: 1.10.6; 1.10.38; 1.10.52; 1.10.54; 1.10.56; 1.10.58; 1.10.60;
May as well include <mips/cpuregs.h> in <mips/cpu.h> once rather than
in every MIPS port's <machine/cpu.h>.
 1.9 04-Sep-2001  simonb Centralise struct cpu_info declaration and related info to <mips/cpu.h>.
 1.8 30-May-2001  mrg branches: 1.8.2;
use _KERNEL_OPT
 1.7 27-May-2000  soren branches: 1.7.6; 1.7.8;
Protect against multiple inclusion.
 1.6 26-May-2000  thorpej First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.

- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).

- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.

- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.5 05-May-2000  soren MIPS_INT_MASK_CLOCK and INT_MASK_REAL_DEV are deprecated.
 1.4 15-Apr-2000  soda remove following symbols which became unnecessary in recent cpu_intr() change:
mips_hardware_intr
MIPS3_INTERNAL_TIMER_INTERRUPT
mips3_intr_cycle_count
mips3_timer_delta
 1.3 24-Mar-2000  soren Revert previous.
 1.2 24-Mar-2000  soren Move sysctl definitions from arch/mips to arch/foo.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.7.8.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.6.1 27-May-2000  bouyer file cpu.h was added on branch thorpej_scsipi on 2000-11-20 20:07:03 +0000
 1.8.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.10.60.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.10.58.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.10.56.1 24-May-2006  yamt sync with head.
 1.10.54.1 22-Apr-2006  simonb Sync with head.
 1.10.52.1 09-Sep-2006  rpaulo sync with head
 1.10.38.2 24-Mar-2008  yamt sync with head.
 1.10.38.1 21-Jun-2006  yamt sync with head.
 1.10.6.2 04-Sep-2001  simonb May as well include <mips/cpuregs.h> in <mips/cpu.h> once rather than
in every MIPS port's <machine/cpu.h>.
 1.10.6.1 04-Sep-2001  simonb file cpu.h was added on branch nathanw_sa on 2001-09-04 06:23:17 +0000
 1.11.62.2 02-Jun-2008  mjf Sync with HEAD.
 1.11.62.1 03-Apr-2008  mjf Sync with HEAD.
 1.13.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.13.4.1 04-May-2009  yamt sync with head.
 1.13.2.1 04-Jun-2008  yamt sync with head
 1.14.26.1 06-Jun-2011  jruoho Sync with HEAD.
 1.14.20.1 31-May-2011  rmind sync with head
 1.15.54.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.1 05-Feb-2003  nakayama Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
 1.3 09-Jul-2011  matt Default to DB_ELF_SYMBOLS and DB_ELFSIZE 32
 1.2 04-Sep-2001  simonb branches: 1.2.6;
Standardise the format of MIPS' <machine/db_machdep.h>.
 1.1 19-Mar-2000  soren branches: 1.1.6; 1.1.10;
NetBSD/cobalt. Work-in-progress.
 1.1.10.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file db_machdep.h was added on branch thorpej_scsipi on 2000-11-20 20:07:03 +0000
 1.2.6.2 04-Sep-2001  simonb Standardise the format of MIPS' <machine/db_machdep.h>.
 1.2.6.1 04-Sep-2001  simonb file db_machdep.h was added on branch nathanw_sa on 2001-09-04 07:43:30 +0000
 1.12 16-May-2013  christos Complete the dosparts -> mbrparts conversion. Only x86k new uses dosparts
because it also uses struct dos_partition.
 1.11 30-Aug-2011  bouyer branches: 1.11.2; 1.11.12;
Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
 1.10 23-Nov-2009  pooka If cpu_disklabel includes struct dkbad, define __HAVE_DISKLABEL_DKBAD.
This allows use of subr_disk_mbr on all archs. Default to it for
the rump disk component. No functional change for regular kernels.
(The other option would've been to include dkbad in disklabels
everywhere, but arguably this approach has less possible side-effects,
especially given that wedges and related magic will take over the
world any second now).
 1.9 11-Dec-2005  christos branches: 1.9.78;
merge ktrace-lwp.
 1.8 12-Jun-2005  dyoung Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.

To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
 1.7 08-Oct-2003  lukem Overhaul MBR handling (part 1):

<sys/bootblock.h>:
* Added definitions for the Master Boot Record (MBR) used by
a variety of systems (primarily i386), including the format
of the BIOS Parameter Block (BPB).
This information was cribbed from a variety of sources
including <sys/disklabel_mbr.h> which this is a superset of.

As part of this, some data structure elements and #defines
were renamed to be more "namespace friendly" and consistent
with other bootblocks and MBR documentation.
Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
* Deprecated in favor of <sys/bootblock.h> (the latter is more
"host tool" friendly).

amd64 & i386:
* Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
be consistent with the naming convention of the msdosfs tools.

* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
and it's confusing to have two functionally equivalent bootblocks,
especially given that "ufs" has multiple meanings (it could be
a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

* Rework pbr.S (the first sector of bootxx_*):
+ Ensure that BPB (bytes 11..89) and the partition table
(bytes 446..509) do not contain code.
+ Add support for booting from FAT partitions if BOOT_FROM_FAT
is defined. (Only set for bootxx_msdos).
+ Remove "dummy" partition 3; if people want to installboot(8)
these to the start of the disk they can use fdisk(8) to
create a real MBR partition table...
+ Compile with TERSE_ERROR so it fits because of the above.
Whilst this is less user friendly, I feel it's important
to have a valid partition table and BPB in the MBR/PBR.

* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
with other platforms.

* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
we can boot off FAT partitions.

* Crank version of /usr/mdec/boot to 3.1, and fix some of the other
entries in the version file.

installboot(8) (i386):
* Read the existing MBR of the filesystem and retain the BIOS
Parameter Block (BPB) in bytes 11..89 and the MBR partition
table in bytes 446..509. (Previously installboot(8) would
trash those two sections of the MBR.)

mbrlabel(8):
* Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
 1.6 12-Sep-2003  tsutsui TAB/space cleanup.
 1.5 28-Jun-2000  soren branches: 1.5.2; 1.5.26;
Whitespace.
 1.4 05-May-2000  soren Add licenses.
 1.3 24-Mar-2000  soren Protect against multiple inclusion.
 1.2 22-Mar-2000  soren Revert to the same scheme as the other MBR-using ports.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.5.26.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.26.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.26.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.26.1 03-Aug-2004  skrll Sync with HEAD
 1.5.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.2.1 28-Jun-2000  bouyer file disklabel.h was added on branch thorpej_scsipi on 2000-11-20 20:07:04 +0000
 1.9.78.1 11-Mar-2010  yamt sync with head
 1.11.12.1 23-Jun-2013  tls resync from head
 1.11.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.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file ecoff_machdep.h was added on branch thorpej_scsipi on 2000-11-20 20:07:04 +0000
 1.2 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.1 19-Mar-2000  soren branches: 1.1.6; 1.1.136; 1.1.154;
NetBSD/cobalt. Work-in-progress.
 1.1.154.1 22-Aug-2009  matt Move ELF{32,64}_MACHDEP_ENDIANNESS to <mips/elf_machdep.h>
 1.1.136.1 11-Mar-2010  yamt sync with head
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file elf_machdep.h was added on branch thorpej_scsipi on 2000-11-20 20:07:04 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file endian.h was added on branch thorpej_scsipi on 2000-11-20 20:07:04 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file endian_machdep.h was added on branch thorpej_scsipi on 2000-11-20 20:07:04 +0000
 1.1 21-Dec-2015  christos branches: 1.1.2; 1.1.18;
Add mips fenv.h (From FreeBSD)
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 21-Dec-2015  jdolecek file fenv.h was added on branch tls-maxphys on 2017-12-03 11:36:00 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 21-Dec-2015  skrll file fenv.h was added on branch nick-nhusb on 2015-12-27 12:09:33 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file float.h was added on branch thorpej_scsipi on 2000-11-20 20:07:04 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file ieee.h was added on branch thorpej_scsipi on 2000-11-20 20:07:05 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file ieeefp.h was added on branch thorpej_scsipi on 2000-11-20 20:07:05 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer constant macros.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
 1.1.12.1 14-Apr-2001  kleink file int_const.h was added on branch nathanw_sa on 2001-04-14 22:38:37 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_const.h was added on branch thorpej_scsipi on 2001-04-21 17:53:27 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_fmtio.h was added on branch nathanw_sa on 2001-04-15 17:13:09 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_fmtio.h was added on branch thorpej_scsipi on 2001-04-21 17:53:27 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_limits.h was added on branch nathanw_sa on 2001-04-15 15:29:06 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_limits.h was added on branch thorpej_scsipi on 2001-04-21 17:53:27 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 14-Apr-2001  kleink file int_mwgwtypes.h was added on branch nathanw_sa on 2001-04-14 12:19:53 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_mwgwtypes.h was added on branch thorpej_scsipi on 2001-04-21 17:53:27 +0000
 1.1 26-Jun-2000  kleink branches: 1.1.2;
Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.1.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.2.1 26-Jun-2000  bouyer file int_types.h was added on branch thorpej_scsipi on 2000-11-20 20:07:05 +0000
 1.33 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).
 1.32 01-Oct-2008  uebayasi branches: 1.32.12; 1.32.16; 1.32.22; 1.32.24;
Typo in a comment.
 1.31 22-Mar-2008  tsutsui branches: 1.31.4; 1.31.6; 1.31.10;
Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.
 1.30 04-Jan-2008  ad branches: 1.30.6;
Fix includes.
 1.29 03-Dec-2007  ad branches: 1.29.6;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.28 17-Oct-2007  garbled branches: 1.28.2;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.27 17-Jun-2007  tsutsui branches: 1.27.8; 1.27.10;
Move declaretions of _spl*() and _{clr,set}softintr() functions
(which are in mips/locore.S) into <mips/locore.h>
from various MD files.
 1.26 27-May-2007  tsutsui Reorder IPL_SOFTSERIAL and IPL_SOFTCLOCK properly.
 1.25 16-Feb-2007  ad branches: 1.25.6; 1.25.8; 1.25.14;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
 1.24 21-Dec-2006  yamt merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.23 07-Sep-2006  gdamore branches: 1.23.2; 1.23.4;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.
 1.22 18-Jul-2006  tsutsui - always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
(XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
by default.
 1.21 31-May-2006  tsutsui Cleanup ICU (i8259 compatible PIC) interrupt handling code:
- move ICU interrupt stuff from pci/pcib.h to cobalt/machdep.c
because ICU should be initialized before pcib is attached
- initialize ICU more properly
- check interrupt types and set ELCR (edge/level control registers)
accordingly in icu_intr_establish()
- check requested IRQ line and call only a necessary hander in icu_intr()
- use specific EOI to ack interrupts rather than AEOI
- use macro defined in <dev/ic/i8259reg.h>
 1.20 21-Apr-2006  tsutsui branches: 1.20.2;
Account interrupts by evcnt(9).
 1.19 21-Apr-2006  tsutsui - add prefix ih_ to cookie_type member in struct cobalt_intrhand
- clear the cookie type in disestablish functions
- some cosmetics
 1.18 21-Apr-2006  tsutsui - remove "extern" from function declarations
- remove unused intrcnt[] declaration
 1.17 04-Jan-2006  tsutsui branches: 1.17.2; 1.17.4; 1.17.6; 1.17.8; 1.17.10;
Add spllpt() macro for lpt at puc. Requrested by Florian Stoehr.

XXX: IMHO, MI lpt(4) should not use such its own priority level...
 1.16 11-Dec-2005  christos branches: 1.16.2;
merge ktrace-lwp.
 1.15 12-Sep-2003  tsutsui branches: 1.15.16;
Use common mips generic software interrupt routines.
 1.14 12-Sep-2003  tsutsui Protect against multiple inclusion.
 1.13 12-Sep-2003  tsutsui TAB/space cleanup.
 1.12 16-Jun-2003  thorpej branches: 1.12.2;
Rename IPL_IMP -> IPL_VM.
 1.11 13-Jan-2002  augustss branches: 1.11.4;
Implement pci_intr_disestablish().
 1.10 13-Apr-2001  thorpej branches: 1.10.2; 1.10.8;
Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
 1.9 14-Jan-2001  thorpej branches: 1.9.2;
Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
 1.8 22-Aug-2000  thorpej branches: 1.8.2;
Add spllock(). See spl(9) for details.
 1.7 21-Aug-2000  thorpej Make sure we provide splsched() as described in spl(9).
 1.6 05-May-2000  soren Add licenses.
 1.5 28-Apr-2000  soren Adapt to cpu_intr() change.
 1.4 03-Apr-2000  soda splsoftnet() should block softclock() too.
 1.3 31-Mar-2000  soren Some cleanups.
 1.2 21-Mar-2000  soren Blocking soft interrupts can be useful..
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.8.2.4 21-Apr-2001  bouyer Sync with HEAD
 1.8.2.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.8.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.8.2.1 22-Aug-2000  bouyer file intr.h was added on branch thorpej_scsipi on 2000-11-20 20:07:05 +0000
 1.9.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.10.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.10.8.1 13-Apr-2001  nathanw file intr.h was added on branch nathanw_sa on 2002-02-28 04:08:47 +0000
 1.10.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.11.4.1 17-Mar-2002  thorpej IPL_IMP -> IPL_VM
 1.12.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.2.1 03-Aug-2004  skrll Sync with HEAD
 1.15.16.7 24-Mar-2008  yamt sync with head.
 1.15.16.6 21-Jan-2008  yamt sync with head
 1.15.16.5 07-Dec-2007  yamt sync with head
 1.15.16.4 03-Sep-2007  yamt sync with head.
 1.15.16.3 26-Feb-2007  yamt sync with head.
 1.15.16.2 30-Dec-2006  yamt sync with head.
 1.15.16.1 21-Jun-2006  yamt sync with head.
 1.16.2.1 15-Jan-2006  yamt sync with head.
 1.17.10.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.17.8.1 11-May-2006  elad sync with head
 1.17.6.4 14-Sep-2006  yamt sync with head.
 1.17.6.3 11-Aug-2006  yamt sync with head
 1.17.6.2 26-Jun-2006  yamt sync with head.
 1.17.6.1 24-May-2006  yamt sync with head.
 1.17.4.2 01-Jun-2006  kardel Sync with head.
 1.17.4.1 22-Apr-2006  simonb Sync with head.
 1.17.2.1 09-Sep-2006  rpaulo sync with head
 1.20.2.1 19-Jun-2006  chap Sync with head.
 1.23.4.1 23-Sep-2006  yamt implement splraiseipl for cobalt.
 1.23.2.1 12-Jan-2007  ad Sync with head.
 1.25.14.1 26-Jun-2007  garbled Sync with HEAD.
 1.25.8.1 11-Jul-2007  mjf Sync with head.
 1.25.6.3 03-Dec-2007  ad Sync with HEAD.
 1.25.6.2 15-Jul-2007  ad Sync with head.
 1.25.6.1 09-Jun-2007  ad Sync with head.
 1.27.10.2 09-Jan-2008  matt sync with HEAD
 1.27.10.1 06-Nov-2007  matt sync with HEAD
 1.27.8.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.28.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.28.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.29.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.30.6.2 05-Oct-2008  mjf Sync with HEAD.
 1.30.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.31.10.1 19-Oct-2008  haad Sync with HEAD.
 1.31.6.1 10-Oct-2008  skrll Sync with HEAD.
 1.31.4.1 04-May-2009  yamt sync with head.
 1.32.24.1 05-Mar-2011  bouyer Sync with HEAD
 1.32.22.1 06-Jun-2011  jruoho Sync with HEAD.
 1.32.16.1 05-Mar-2011  rmind sync with head
 1.32.12.2 28-Feb-2010  matt Adapt to new common interrupts.
Enable cobalt64
 1.32.12.1 06-Feb-2010  matt <mips/softintr.h> is no longer needed.
 1.2 12-Sep-2003  tsutsui Use common mips generic software interrupt routines.
 1.1 13-Jan-2002  augustss branches: 1.1.2; 1.1.4; 1.1.20;
Implement pci_intr_disestablish().
 1.1.20.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 13-Jan-2002  nathanw file intr_machdep.h was added on branch nathanw_sa on 2002-02-28 04:08:47 +0000
 1.1.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.1 13-Jan-2002  jdolecek file intr_machdep.h was added on branch kqueue on 2002-02-11 20:07:35 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file kcore.h was added on branch thorpej_scsipi on 2000-11-20 20:07:05 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file kdbparam.h was added on branch thorpej_scsipi on 2000-11-20 20:07:05 +0000
 1.2 22-Mar-2008  tsutsui Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.
 1.1 19-Mar-2000  soren branches: 1.1.6; 1.1.46; 1.1.132;
NetBSD/cobalt. Work-in-progress.
 1.1.132.1 03-Apr-2008  mjf Sync with HEAD.
 1.1.46.1 24-Mar-2008  yamt sync with head.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file leds.h was added on branch thorpej_scsipi on 2000-11-20 20:07:05 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file limits.h was added on branch thorpej_scsipi on 2000-11-20 20:07:06 +0000
 1.4 06-Aug-2014  joerg Consistently define WARN in a way that passes format string checks, i.e.
always uses the same number of arguments as given in the format string.
 1.3 28-Apr-2008  martin branches: 1.3.44; 1.3.60;
Remove clause 3 and 4 from TNF licenses
 1.2 25-Jan-2006  christos branches: 1.2.72; 1.2.74; 1.2.76;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.1 25-Jun-2003  cdi branches: 1.1.18; 1.1.30;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.30.1 01-Feb-2006  yamt sync with head.
 1.1.18.1 21-Jun-2006  yamt sync with head.
 1.2.76.1 16-May-2008  yamt sync with head.
 1.2.74.1 18-May-2008  yamt sync with head.
 1.2.72.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.60.1 10-Aug-2014  tls Rebase.
 1.3.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2 31-Aug-2001  simonb branches: 1.2.6;
Remove an unneeded comment; ``sync'' with other "just include <mips/foo.h>"
files.
 1.1 29-Apr-2000  thorpej branches: 1.1.6; 1.1.10;
Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.1.10.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 29-Apr-2000  bouyer file lock.h was added on branch thorpej_scsipi on 2000-11-20 20:07:06 +0000
 1.2.6.2 31-Aug-2001  simonb Remove an unneeded comment; ``sync'' with other "just include <mips/foo.h>"
files.
 1.2.6.1 31-Aug-2001  simonb file lock.h was added on branch nathanw_sa on 2001-08-31 03:53:24 +0000
 1.2 05-Jun-2002  simonb Simplify include files that just include <mips/locore.h>.
 1.1 19-Mar-2000  soren branches: 1.1.6; 1.1.10; 1.1.14; 1.1.22;
NetBSD/cobalt. Work-in-progress.
 1.1.22.1 14-Jul-2002  gehenna catch up with -current.
 1.1.14.1 20-Jun-2002  nathanw Catch up to -current.
 1.1.10.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file locore.h was added on branch thorpej_scsipi on 2000-11-20 20:07:06 +0000
 1.1 30-Nov-2024  christos branches: 1.1.4;
Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 30-Nov-2024  perseant file lwp_private.h was added on branch perseant-exfatfs on 2025-08-02 05:55:32 +0000
 1.1 21-Mar-2000  soren branches: 1.1.6;
Add math.h.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 21-Mar-2000  bouyer file math.h was added on branch thorpej_scsipi on 2000-11-20 20:07:06 +0000
 1.2 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 17-Nov-2001  wdk branches: 1.1.2;
file mcontext.h was initially added on branch nathanw_sa.
 1.1.2.1 17-Nov-2001  wdk mcontext support for MIPS based ports.
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file mips_opcode.h was added on branch thorpej_scsipi on 2000-11-20 20:07:06 +0000
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file mutex.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file mutex.h was added on branch yamt-lazymbuf on 2007-02-26 09:06:15 +0000
 1.1 17-Dec-2009  matt branches: 1.1.4; 1.1.6;
Enable mips64 support for cobalt.
 1.1.6.2 11-Mar-2010  yamt sync with head
 1.1.6.1 17-Dec-2009  yamt file netbsd32_machdep.h was added on branch yamt-nfs-mp on 2010-03-11 15:02:12 +0000
 1.1.4.2 28-Feb-2010  matt Adapt to new common interrupts.
Enable cobalt64
 1.1.4.1 17-Dec-2009  matt file netbsd32_machdep.h was added on branch matt-nb5-mips64 on 2010-02-28 04:04:46 +0000
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 12-Sep-2003  tsutsui TAB/space cleanup.
 1.1 19-Mar-2000  soren branches: 1.1.6; 1.1.30;
NetBSD/cobalt. Work-in-progress.
 1.1.30.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.30.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.30.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file nvram.h was added on branch thorpej_scsipi on 2000-11-20 20:07:06 +0000
 1.20 07-Jan-2019  jdolecek move DEV_BSIZE, DEV_BSHIFT out of MD param.h, they are same on all ports

also move BLKDEV_IOSIZE, MAXPHYS, but allow override since some ports
have different value (powerpc uses NBPG for BLKDEV_IOSIZE, sun2/sun3
have lower MAXPHYS)
 1.19 18-Mar-2011  tsutsui branches: 1.19.54; 1.19.56;
Include <mips/mips_param.h> after MACHINE is defined.
 1.18 06-Mar-2011  he Now that MACHINE is defined in user-land in either
mips/include/mips_param.h or powerpc/include/param.h, stop
trying to re-define it in the port-specific param.h files
when _KERNEL isn't defined.
 1.17 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.16 14-Dec-2009  matt branches: 1.16.4; 1.16.6; 1.16.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.15 13-Aug-2009  matt Move MID_MACHINE to <mips/mips_param.h> and use local values so we don't
need to include exec_aout.h
 1.14 26-Sep-2006  tsutsui branches: 1.14.56; 1.14.74;
Protect from multiple inclusion.
 1.13 07-Sep-2006  gdamore branches: 1.13.2; 1.13.4;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.
 1.12 21-Apr-2006  tsutsui - initialize cpuspeed and curcpu() according to cobalt model id
- switch to cpu cyclecounter based delay(9), taken from evbmips
 1.11 16-Feb-2006  perry branches: 1.11.2; 1.11.4; 1.11.6;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.10 24-Dec-2005  perry branches: 1.10.2; 1.10.4; 1.10.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.9 11-Dec-2005  christos merge ktrace-lwp.
 1.8 07-Aug-2003  agc branches: 1.8.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.7 26-Feb-2002  simonb branches: 1.7.16;
Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
 1.6 30-May-2001  mrg branches: 1.6.2; 1.6.8;
use _KERNEL_OPT
 1.5 30-Jun-2000  itojun branches: 1.5.2; 1.5.4;
raise MSIZE from 128 to 256.
- for sizeof(void *) == 8 arch, this is mandatory. MHLEN is too small
already (less than 80) and there are chances for unwanted packet loss due
to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
(even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
extension header)

portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.
 1.4 05-May-2000  soren branches: 1.4.4;
Add licenses.
 1.3 31-Mar-2000  soren Some cleanups.
 1.2 20-Mar-2000  soren Use correct MACHINE_ARCH.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.4.4.1 23-Jul-2000  itojun pullup from main trunc (approved by releng-1-5)

raise MSIZE from 128 to 256.
- for sizeof(void *) == 8 arch, this is mandatory. MHLEN is too small
already (less than 80) and there are chances for unwanted packet loss due
to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
(even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
extension header)

portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.

1.1 -> 1.2 syssrc/sys/arch/amigappc/include/param.h
1.13 -> 1.14 syssrc/sys/arch/arc/include/param.h
1.1 -> 1.2 syssrc/sys/arch/arm26/include/param.h
1.17 -> 1.18 syssrc/sys/arch/arm32/include/param.h
1.6 -> 1.7 syssrc/sys/arch/bebox/include/param.h
1.4 -> 1.5 syssrc/sys/arch/cobalt/include/param.h
1.4 -> 1.5 syssrc/sys/arch/evbsh3/include/param.h
1.2 -> 1.3 syssrc/sys/arch/hpcmips/include/param.h
1.40 -> 1.41 syssrc/sys/arch/i386/include/param.h
1.7 -> 1.8 syssrc/sys/arch/m68k/include/param.h
1.9 -> 1.10 syssrc/sys/arch/macppc/include/param.h
1.4 -> 1.5 syssrc/sys/arch/mmeye/include/param.h
1.6 -> 1.7 syssrc/sys/arch/newsmips/include/param.h
1.7 -> 1.8 syssrc/sys/arch/ofppc/include/param.h
1.23 -> 1.24 syssrc/sys/arch/pc532/include/param.h
1.32 -> 1.33 syssrc/sys/arch/pmax/include/param.h
1.7 -> 1.8 syssrc/sys/arch/powerpc/include/param.h
1.1 -> 1.2 syssrc/sys/arch/prep/include/param.h
1.1 -> 1.2 syssrc/sys/arch/sgimips/include/param.h
1.3 -> 1.4 syssrc/sys/arch/sh3/include/param.h
1.44 -> 1.45 syssrc/sys/arch/sparc/include/param.h
1.21 -> 1.22 syssrc/sys/arch/sparc64/include/param.h
1.43 -> 1.44 syssrc/sys/arch/vax/include/param.h
 1.5.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.2.1 30-Jun-2000  bouyer file param.h was added on branch thorpej_scsipi on 2000-11-20 20:07:06 +0000
 1.6.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.6.8.1 30-May-2001  nathanw file param.h was added on branch nathanw_sa on 2002-02-28 04:08:47 +0000
 1.6.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.7.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.16.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.2 30-Dec-2006  yamt sync with head.
 1.8.16.1 21-Jun-2006  yamt sync with head.
 1.10.6.1 22-Apr-2006  simonb Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.10.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.2 14-Sep-2006  yamt sync with head.
 1.11.2.1 24-May-2006  yamt sync with head.
 1.13.4.1 22-Oct-2006  yamt sync with head
 1.13.2.1 18-Nov-2006  ad Sync with head.
 1.14.74.1 22-Aug-2009  matt Move MACHINE_ARCH definition to <mips/mips_param.h>
Move mbuf related defines to <mips/mips_param.h>
 1.14.56.2 11-Mar-2010  yamt sync with head
 1.14.56.1 19-Aug-2009  yamt sync with head.
 1.16.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.16.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.16.4.2 21-Apr-2011  rmind sync with head
 1.16.4.1 05-Mar-2011  rmind sync with head
 1.19.56.1 10-Jun-2019  christos Sync with HEAD
 1.19.54.1 18-Jan-2019  pgoyette Synch with HEAD
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file pcb.h was added on branch thorpej_scsipi on 2000-11-20 20:07:07 +0000
 1.15 07-Jul-2020  thorpej Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.
 1.14 29-Jul-2014  skrll Convert cobalt to generic mips bus_dma.
 1.13 29-Mar-2014  christos branches: 1.13.2;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.12 27-Oct-2012  chs branches: 1.12.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.11 04-Apr-2011  dyoung branches: 1.11.4; 1.11.14;
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.10 15-Apr-2006  tsutsui branches: 1.10.88; 1.10.94;
u_intNN_t -> uintNN_t
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 25-Mar-2005  tsutsui branches: 1.8.2;
Switch cobalt port to use MI pci_configure_bus(9)
with options PCI_NETBSD_CONFIGURE.
Patch from KIYOHARA Takashi on port-cobalt.

This change makes siop(4) (and maybe all other PCI devices
using pci mem space) work on cobalt.
 1.7 28-Aug-2004  tsutsui branches: 1.7.4; 1.7.6; 1.7.10;
- Use bus_space(9) to access PCI configuration registers on GT64111.
- Remove unused pci stuff from mainbus.c.
 1.6 29-Jul-2004  drochner remove now unnecessary "pci_enumerate_bus" definitions
 1.5 15-May-2002  thorpej branches: 1.5.10;
Let machine-dependent code specify how to enumerate the bus.
Currently, everyone uses pci_enumerate_bus_generic().
 1.4 08-Jun-2001  simonb branches: 1.4.2; 1.4.8;
For ports that wire up pciide in compatibility mode, have
them define __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH
in pci_machdep.h and pciide_map_compat_intr() only calls
pciide_machdep_compat_intr_establish() if that preprocessor
define exists.

Ports that don't need to do this no longer need to supply a
dummy function.
 1.3 28-Dec-2000  sommerfeld branches: 1.3.2;
Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q
 1.2 04-Jun-2000  cgd branches: 1.2.4;
Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.1 19-Mar-2000  soren branches: 1.1.2;
NetBSD/cobalt. Work-in-progress.
 1.1.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.2.4.3 05-Jan-2001  bouyer Sync with HEAD
 1.2.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.4.1 04-Jun-2000  bouyer file pci_machdep.h was added on branch thorpej_scsipi on 2000-11-20 20:07:07 +0000
 1.3.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.4.8.1 08-Jun-2001  nathanw file pci_machdep.h was added on branch nathanw_sa on 2002-06-20 03:38:28 +0000
 1.4.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.10.5 01-Apr-2005  skrll Sync with HEAD.
 1.5.10.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.10.3 18-Sep-2004  skrll Sync with HEAD.
 1.5.10.2 03-Sep-2004  skrll Sync with HEAD
 1.5.10.1 03-Aug-2004  skrll Sync with HEAD
 1.7.10.1 27-Mar-2005  tron Pull up revision 1.8 (requested by tsutsui in ticket #67):
Switch cobalt port to use MI pci_configure_bus(9)
with options PCI_NETBSD_CONFIGURE.
Patch from KIYOHARA Takashi on port-cobalt.
This change makes siop(4) (and maybe all other PCI devices
using pci mem space) work on cobalt.
 1.7.6.1 26-Mar-2005  yamt sync with head.
 1.7.4.1 29-Apr-2005  kent sync with -current
 1.8.2.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.9.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.9.8.1 24-May-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.10.94.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.88.1 21-Apr-2011  rmind sync with head
 1.11.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.11.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.11.4.1 30-Oct-2012  yamt sync with head
 1.12.2.1 18-May-2014  rmind sync with head
 1.13.2.1 10-Aug-2014  tls Rebase.
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file pmap.h was added on branch thorpej_scsipi on 2000-11-20 20:07:07 +0000
 1.2 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.1 07-Aug-2002  briggs branches: 1.1.2; 1.1.4; 1.1.6; 1.1.202; 1.1.204;
Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.1.204.1 10-Jun-2019  christos Sync with HEAD
 1.1.202.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 07-Aug-2002  jdolecek file pmc.h was added on branch kqueue on 2002-09-06 08:33:50 +0000
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 07-Aug-2002  gehenna file pmc.h was added on branch gehenna-devsw on 2002-08-30 00:19:29 +0000
 1.1.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 07-Aug-2002  nathanw file pmc.h was added on branch nathanw_sa on 2002-08-13 02:18:06 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file proc.h was added on branch thorpej_scsipi on 2000-11-20 20:07:07 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file profile.h was added on branch thorpej_scsipi on 2000-11-20 20:07:07 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file psl.h was added on branch thorpej_scsipi on 2000-11-20 20:07:07 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file pte.h was added on branch thorpej_scsipi on 2000-11-20 20:07:07 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file ptrace.h was added on branch thorpej_scsipi on 2000-11-20 20:07:08 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file reg.h was added on branch thorpej_scsipi on 2000-11-20 20:07:08 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file regdef.h was added on branch thorpej_scsipi on 2000-11-20 20:07:08 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file regnum.h was added on branch thorpej_scsipi on 2000-11-20 20:07:08 +0000
 1.2 09-Sep-2001  simonb branches: 1.2.4;
Clean up and standardise across MIPS ports.
 1.1 19-Mar-2000  soren branches: 1.1.6; 1.1.8; 1.1.10;
NetBSD/cobalt. Work-in-progress.
 1.1.10.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.8.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file reloc.h was added on branch thorpej_scsipi on 2000-11-20 20:07:08 +0000
 1.2.4.2 09-Sep-2001  simonb Clean up and standardise across MIPS ports.
 1.2.4.1 09-Sep-2001  simonb file reloc.h was added on branch nathanw_sa on 2001-09-09 04:20:27 +0000
 1.2 05-Feb-2003  nakayama Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
 1.1 06-Jun-2000  soren branches: 1.1.4; 1.1.6;
Add rnd(4) glue for the MIPS3 cycle counter.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 06-Jun-2000  bouyer file rnd.h was added on branch thorpej_scsipi on 2000-11-20 20:07:08 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 06-Jun-2000  minoura file rnd.h was added on branch minoura-xpg4dl on 2000-06-22 16:59:48 +0000
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file rwlock.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file rwlock.h was added on branch yamt-lazymbuf on 2007-02-26 09:06:15 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file setjmp.h was added on branch thorpej_scsipi on 2000-11-20 20:07:09 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file signal.h was added on branch thorpej_scsipi on 2000-11-20 20:07:09 +0000
 1.1 23-Jul-2014  alnsn branches: 1.1.2; 1.1.6;
Rename sljitarch.h to sljit_machdep.h.
 1.1.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 23-Jul-2014  tls file sljit_machdep.h was added on branch tls-maxphys on 2014-08-20 00:02:50 +0000
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 23-Jul-2014  tls file sljit_machdep.h was added on branch tls-earlyentropy on 2014-08-10 06:53:54 +0000
 1.2 23-Jul-2014  alnsn Rename sljitarch.h to sljit_machdep.h.
 1.1 22-Jul-2014  alnsn Add sljitarch.h to cobalt and pmax.
 1.2 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file stdarg.h was added on branch thorpej_scsipi on 2000-11-20 20:07:09 +0000
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file trap.h was added on branch thorpej_scsipi on 2000-11-20 20:07:09 +0000
 1.12 26-Jan-2017  christos provide __HAVE_COMPAT_NETBSD32 and fix multiple include protection consistently.
 1.11 17-Jul-2011  dyoung branches: 1.11.12; 1.11.30; 1.11.34; 1.11.38;
Switch MIPS and MIPS-ish architectures to new-style <sys/bus.h>. This
involves moving some inline bus_space(9) implementation into .c files.
 1.10 20-Jan-2008  joerg Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.9 17-Oct-2007  garbled branches: 1.9.2; 1.9.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.8 14-Jul-2007  ad branches: 1.8.10;
Generic soft interrupts are mandatory.
 1.7 07-Sep-2006  gdamore branches: 1.7.12; 1.7.20;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.
 1.6 04-Sep-2006  tsutsui Switch cobalt to MI todr.
 1.5 11-Dec-2005  christos branches: 1.5.4; 1.5.8;
merge ktrace-lwp.
 1.4 12-Sep-2003  tsutsui branches: 1.4.16;
Use common mips generic software interrupt routines.
 1.3 28-Feb-2002  simonb branches: 1.3.16;
Use "#define<tab>".
 1.2 31-Mar-2000  soren branches: 1.2.6; 1.2.10; 1.2.14;
Some cleanups.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.2.14.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.10.1 16-Mar-2002  jdolecek Catch up with -current.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 31-Mar-2000  bouyer file types.h was added on branch thorpej_scsipi on 2000-11-20 20:07:09 +0000
 1.3.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.16.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.3 21-Jan-2008  yamt sync with head
 1.4.16.2 03-Sep-2007  yamt sync with head.
 1.4.16.1 30-Dec-2006  yamt sync with head.
 1.5.8.1 14-Sep-2006  yamt sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.7.20.1 03-Oct-2007  garbled Sync with HEAD
 1.7.12.1 15-Jul-2007  ad Sync with head.
 1.8.10.2 23-Mar-2008  matt sync with HEAD
 1.8.10.1 06-Nov-2007  matt sync with HEAD
 1.9.8.1 23-Jan-2008  bouyer Sync with HEAD.
 1.9.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.38.1 21-Apr-2017  bouyer Sync with HEAD
 1.11.34.1 20-Mar-2017  pgoyette Sync with HEAD
 1.11.30.1 05-Feb-2017  skrll Sync with HEAD
 1.11.12.1 03-Dec-2017  jdolecek update from HEAD
 1.2 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.1 19-Mar-2000  soren branches: 1.1.6;
NetBSD/cobalt. Work-in-progress.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 19-Mar-2000  bouyer file varargs.h was added on branch thorpej_scsipi on 2000-11-20 20:07:09 +0000
 1.3 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.2 31-Mar-2000  soren branches: 1.2.6; 1.2.136; 1.2.154;
Some cleanups.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.2.154.1 11-Dec-2009  matt Use the default set of VM_FREELISTs in <mips/vmparam.h> but allow them to
be overridden (for pmax).
 1.2.136.1 11-Mar-2010  yamt sync with head
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 31-Mar-2000  bouyer file vmparam.h was added on branch thorpej_scsipi on 2000-11-20 20:07:09 +0000
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 08-May-2004  kleink branches: 1.1.2;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 08-May-2004  skrll file wchar_limits.h was added on branch ktrace-lwp on 2004-08-03 10:33:46 +0000
 1.2 11-Dec-2005  christos branches: 1.2.18;
merge ktrace-lwp.
 1.1 05-Nov-2005  tsutsui branches: 1.1.2;
Add empty <machine/wired_map.h> for the MI mips/wired_map.c.
 1.1.2.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.1 05-Nov-2005  skrll file wired_map.h was added on branch ktrace-lwp on 2005-11-10 13:55:47 +0000
 1.2.18.2 21-Jun-2006  yamt sync with head.
 1.2.18.1 11-Dec-2005  yamt file wired_map.h was added on branch yamt-lazymbuf on 2006-06-21 14:50:07 +0000
 1.2 29-Mar-2008  tsutsui branches: 1.2.2;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.1 27-Mar-2008  tsutsui Add kernel support for optional Z85C30 serial console on Cobalt Qube 2700.
There is some interrupt related issue (in MI z8530tty driver?) on heavy load,
but useful enough for debugging.
 1.2.2.2 03-Apr-2008  mjf Sync with HEAD.
 1.2.2.1 29-Mar-2008  mjf file z8530var.h was added on branch mjf-devfs2 on 2008-04-03 12:42:13 +0000
 1.2 31-Mar-2000  soren Some cleanups.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.11 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.10 09-May-2008  tsutsui Split softc/device_t, with misc related changes.
 1.9 22-Aug-2006  riz branches: 1.9.56; 1.9.58; 1.9.60; 1.9.62;
Vendor GALILEO is now MARVELL.
 1.8 05-Apr-2006  tsutsui branches: 1.8.6;
ANSIfy.
 1.7 11-Dec-2005  christos branches: 1.7.4; 1.7.6; 1.7.8; 1.7.10; 1.7.12;
merge ktrace-lwp.
 1.6 15-Jul-2003  lukem branches: 1.6.6; 1.6.16;
__KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 29-May-2000  soren branches: 1.3.4; 1.3.8; 1.3.12;
Identify system controller model.
 1.2 31-Mar-2000  soren branches: 1.2.2;
Some cleanups.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.2.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.12.1 18-Oct-2002  nathanw Catch up to -current.
 1.3.8.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.4.1 29-May-2000  bouyer file pchb.c was added on branch thorpej_scsipi on 2000-11-20 20:07:10 +0000
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.2 30-Dec-2006  yamt sync with head.
 1.6.16.1 21-Jun-2006  yamt sync with head.
 1.6.6.1 11-Sep-2006  tron Pull up following revision(s) (requested by riz in ticket #10693):
sys/arch/cobalt/pci/pchb.c: revision 1.9 via patch
sys/dev/pci/if_sk.c: revision 1.30 via patch
sys/arch/evbmips/malta/pci/pchb.c: revision 1.9 via patch
Vendor GALILEO is now MARVELL.
 1.7.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.7.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.7.8.2 03-Sep-2006  yamt sync with head.
 1.7.8.1 11-Apr-2006  yamt sync with head
 1.7.6.1 22-Apr-2006  simonb Sync with head.
 1.7.4.1 09-Sep-2006  rpaulo sync with head
 1.8.6.1 08-Sep-2006  rpaulo Pull up following revision(s) (requested by riz in ticket #139):
sys/arch/cobalt/pci/pchb.c: revision 1.9
sys/dev/pci/if_sk.c: revision 1.30
sys/arch/cobalt/pci/pci_machdep.c: revision 1.24
sys/dev/pci/pcidevs: revision 1.820
sys/arch/evbmips/malta/pci/pchb.c: revision 1.9
Rename vendor GALILEO -> vendor MARVELL . Marvell bought Galileo years
ago, we have little existing stuff in the tree, and this will make it
easier to keep certain network drivers in sync with other OSes.
OK matt@, uwe@
Vendor GALILEO is now MARVELL.
 1.9.62.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.9.60.1 16-May-2008  yamt sync with head.
 1.9.58.1 18-May-2008  yamt sync with head.
 1.9.56.1 02-Jun-2008  mjf Sync with HEAD.
 1.38 02-Oct-2015  msaitoh PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.37 09-Jun-2015  matt #include <sys/cpu.h> or <mips/cpuregs.h> as needed
 1.36 29-Jul-2014  skrll branches: 1.36.4;
Convert cobalt to generic mips bus_dma.
 1.35 29-Mar-2014  christos branches: 1.35.2;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.34 26-Mar-2014  christos kill sprintf
 1.33 27-Oct-2012  chs branches: 1.33.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.32 09-Jul-2011  matt branches: 1.32.2; 1.32.12;
Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h
 1.31 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.30 03-May-2011  tsutsui TAB/space cosmetics.
 1.29 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.28 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).
 1.27 30-May-2008  ad branches: 1.27.20; 1.27.26; 1.27.28;
pci_intr_setattr(), allows PCI interrupts to be marked MPSAFE on x86, and
other platforms if the code is added.

pci_intr_map(...)
pci_intr_setattr(pc, ih, PCI_INTR_MPSAFE, 1);
pci_intr_establish(...)
 1.26 22-Mar-2008  tsutsui branches: 1.26.2; 1.26.4; 1.26.6;
Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.
 1.25 18-Feb-2007  tsutsui branches: 1.25.42;
According to info from Byron Servies on port-cobalt,
the interrupt line from the primary (and only) tulip Ethernet
on Qube2700 is connected to CPU INT2, so handle it properly
in pci_intr_map(9).
 1.24 22-Aug-2006  riz branches: 1.24.6; 1.24.8; 1.24.10;
Vendor GALILEO is now MARVELL.
 1.23 15-Jul-2006  tsutsui branches: 1.23.2;
- configure PCI space for viaide so that DMA will work even if the firmware
doesn't map DMA registers properly
- enable viaide secondary port explicitly which isn't enabled by some firmware

Tested on RaQ and RaQ2.
 1.22 18-Apr-2006  tsutsui Check more invalid devices in pci_conf_hook(9).
 1.21 09-Apr-2006  tsutsui Replace some magic numbers with macro.
 1.20 05-Apr-2006  tsutsui ANSIfy.
 1.19 10-Feb-2006  gdamore branches: 1.19.2; 1.19.4; 1.19.6;
PCI_NETBSD_CONFIGURE should allocate (but not map) address space expansion
ROMS by default. Full discussion at
http://mail-index.netbsd.org/tech-kern/2005/12/16/0023.html
Closes PR kern/32467
Reviewed by briggs@
 1.18 11-Dec-2005  christos branches: 1.18.2; 1.18.4; 1.18.6;
merge ktrace-lwp.
 1.17 25-Mar-2005  tsutsui branches: 1.17.2;
Switch cobalt port to use MI pci_configure_bus(9)
with options PCI_NETBSD_CONFIGURE.
Patch from KIYOHARA Takashi on port-cobalt.

This change makes siop(4) (and maybe all other PCI devices
using pci mem space) work on cobalt.
 1.16 28-Aug-2004  tsutsui branches: 1.16.4; 1.16.6; 1.16.10;
- Use bus_space(9) to access PCI configuration registers on GT64111.
- Remove unused pci stuff from mainbus.c.
 1.15 12-Sep-2003  tsutsui Use common mips generic software interrupt routines.
 1.14 12-Sep-2003  tsutsui TAB/space cleanup.
 1.13 15-Jul-2003  lukem __KERNEL_RCSID()
 1.12 13-Jan-2002  augustss branches: 1.12.16;
Implement pci_intr_disestablish().
 1.11 05-Feb-2001  tsutsui branches: 1.11.4; 1.11.8;
Fix typo on pci_intr_map() changes.
Reported by Shigeji Ishikawa <psybear@ogre.rim.or.jp> in port-cobalt/12121.
 1.10 28-Dec-2000  sommerfeld Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q
 1.9 27-Jun-2000  soren branches: 1.9.2;
Don't include <vm/vm.h>.
 1.8 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.7 04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.6 29-May-2000  soren Different form of PCI bug workaround. Should make 2700 system work.
 1.5 09-Apr-2000  soren branches: 1.5.2;
The interrupt line registers for the devices wired directly to the CPU
are not meaningfull. Instead match them by {bus,device,pin}.
 1.4 31-Mar-2000  soren Some cleanups.
 1.3 21-Mar-2000  soren Blocking soft interrupts can be useful..
 1.2 21-Mar-2000  soren Extend the evil interrupt kludge to the second ethernet.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.5.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.9.2.4 11-Feb-2001  bouyer Sync with HEAD.
 1.9.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.9.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.9.2.1 27-Jun-2000  bouyer file pci_machdep.c was added on branch thorpej_scsipi on 2000-11-20 20:07:10 +0000
 1.11.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.11.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.12.16.5 01-Apr-2005  skrll Sync with HEAD.
 1.12.16.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.16.3 18-Sep-2004  skrll Sync with HEAD.
 1.12.16.2 03-Sep-2004  skrll Sync with HEAD
 1.12.16.1 03-Aug-2004  skrll Sync with HEAD
 1.16.10.4 12-Jun-2006  tron Pull up following revision(s) (requested by tsutsui in ticket #1359):
sys/arch/cobalt/pci/pci_machdep.c: revision 1.22
Check more invalid devices in pci_conf_hook(9).
 1.16.10.3 12-Jun-2006  tron Pull up following revision(s) (requested by tsutsui in ticket #1359):
sys/arch/cobalt/dev/gtreg.h: revision 1.3
sys/arch/cobalt/pci/pci_machdep.c: revision 1.21
Replace some magic numbers with macro.
 1.16.10.2 12-Jun-2006  tron Pull up following revision(s) (requested by tsutsui in ticket #1359):
sys/arch/cobalt/pci/pci_machdep.c: revision 1.20
ANSIfy.
 1.16.10.1 27-Mar-2005  tron Pull up revision 1.17 (requested by tsutsui in ticket #67):
Switch cobalt port to use MI pci_configure_bus(9)
with options PCI_NETBSD_CONFIGURE.
Patch from KIYOHARA Takashi on port-cobalt.
This change makes siop(4) (and maybe all other PCI devices
using pci mem space) work on cobalt.
 1.16.6.1 26-Mar-2005  yamt sync with head.
 1.16.4.1 29-Apr-2005  kent sync with -current
 1.17.2.4 24-Mar-2008  yamt sync with head.
 1.17.2.3 26-Feb-2007  yamt sync with head.
 1.17.2.2 30-Dec-2006  yamt sync with head.
 1.17.2.1 21-Jun-2006  yamt sync with head.
 1.18.6.1 22-Apr-2006  simonb Sync with head.
 1.18.4.1 09-Sep-2006  rpaulo sync with head
 1.18.2.1 18-Feb-2006  yamt sync with head.
 1.19.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.19.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.19.2.4 03-Sep-2006  yamt sync with head.
 1.19.2.3 11-Aug-2006  yamt sync with head
 1.19.2.2 24-May-2006  yamt sync with head.
 1.19.2.1 11-Apr-2006  yamt sync with head
 1.23.2.1 08-Sep-2006  rpaulo Pull up following revision(s) (requested by riz in ticket #139):
sys/arch/cobalt/pci/pchb.c: revision 1.9
sys/dev/pci/if_sk.c: revision 1.30
sys/arch/cobalt/pci/pci_machdep.c: revision 1.24
sys/dev/pci/pcidevs: revision 1.820
sys/arch/evbmips/malta/pci/pchb.c: revision 1.9
Rename vendor GALILEO -> vendor MARVELL . Marvell bought Galileo years
ago, we have little existing stuff in the tree, and this will make it
easier to keep certain network drivers in sync with other OSes.
OK matt@, uwe@
Vendor GALILEO is now MARVELL.
 1.24.10.1 03-Jun-2008  skrll Sync with netbsd-4.
 1.24.8.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.24.6.1 09-Mar-2008  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1096):
sys/arch/cobalt/pci/pci_machdep.c: revision 1.25
sys/arch/cobalt/stand/boot/cons.c: revision 1.6
According to info from Byron Servies on port-cobalt,
the interrupt line from the primary (and only) tulip Ethernet
on Qube2700 is connected to CPU INT2, so handle it properly
in pci_intr_map(9).
cnscan() should return -1 (no input) if there is no console device.
Now wd boot works on Qube2700 (which doesn't have serial console).
 1.25.42.2 02-Jun-2008  mjf Sync with HEAD.
 1.25.42.1 03-Apr-2008  mjf Sync with HEAD.
 1.26.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.26.4.1 04-May-2009  yamt sync with head.
 1.26.2.1 04-Jun-2008  yamt sync with head
 1.27.28.1 05-Mar-2011  bouyer Sync with HEAD
 1.27.26.1 06-Jun-2011  jruoho Sync with HEAD.
 1.27.20.3 31-May-2011  rmind sync with head
 1.27.20.2 21-Apr-2011  rmind sync with head
 1.27.20.1 05-Mar-2011  rmind sync with head
 1.32.12.3 03-Dec-2017  jdolecek update from HEAD
 1.32.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.32.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.32.2.1 30-Oct-2012  yamt sync with head
 1.33.2.1 18-May-2014  rmind sync with head
 1.35.2.1 10-Aug-2014  tls Rebase.
 1.36.4.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.36.4.1 22-Sep-2015  skrll Sync with HEAD
 1.22 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.21 09-Jul-2011  matt Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h
 1.20 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.19 09-May-2008  tsutsui Split softc/device_t, with misc related changes.
 1.18 31-May-2006  tsutsui branches: 1.18.60; 1.18.62; 1.18.64; 1.18.66;
Cleanup ICU (i8259 compatible PIC) interrupt handling code:
- move ICU interrupt stuff from pci/pcib.h to cobalt/machdep.c
because ICU should be initialized before pcib is attached
- initialize ICU more properly
- check interrupt types and set ELCR (edge/level control registers)
accordingly in icu_intr_establish()
- check requested IRQ line and call only a necessary hander in icu_intr()
- use specific EOI to ack interrupts rather than AEOI
- use macro defined in <dev/ic/i8259reg.h>
 1.17 21-Apr-2006  tsutsui branches: 1.17.2;
Account interrupts by evcnt(9).
 1.16 21-Apr-2006  tsutsui Oops, fix botch in previous.
 1.15 21-Apr-2006  tsutsui Return if interrupt is handled in icu_intr().
 1.14 21-Apr-2006  tsutsui - add prefix ih_ to cookie_type member in struct cobalt_intrhand
- clear the cookie type in disestablish functions
- some cosmetics
 1.13 21-Apr-2006  tsutsui - replace magic numbers with a dumb macro
- fix typo
 1.12 05-Apr-2006  tsutsui ANSIfy, KNF
 1.11 11-Dec-2005  christos branches: 1.11.4; 1.11.6; 1.11.8; 1.11.10; 1.11.12;
merge ktrace-lwp.
 1.10 23-Apr-2004  itojun branches: 1.10.12;
pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
 1.9 12-Sep-2003  tsutsui Use common mips generic software interrupt routines.
 1.8 12-Sep-2003  tsutsui TAB/space cleanup.
 1.7 15-Jul-2003  lukem __KERNEL_RCSID()
 1.6 02-Oct-2002  thorpej branches: 1.6.6;
Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 10-Mar-2002  augustss Make icu_intr_disestablish() actually work.
 1.3 13-Jan-2002  augustss Implement pci_intr_disestablish().
 1.2 31-Mar-2000  soren branches: 1.2.6; 1.2.10; 1.2.14;
Some cleanups.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.2.14.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.14.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.14.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.10.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.10.2 16-Mar-2002  jdolecek Catch up with -current.
 1.2.10.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 31-Mar-2000  bouyer file pcib.c was added on branch thorpej_scsipi on 2000-11-20 20:07:10 +0000
 1.6.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.6.1 03-Aug-2004  skrll Sync with HEAD
 1.10.12.1 21-Jun-2006  yamt sync with head.
 1.11.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.11.10.2 11-May-2006  elad sync with head
 1.11.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.11.8.3 26-Jun-2006  yamt sync with head.
 1.11.8.2 24-May-2006  yamt sync with head.
 1.11.8.1 11-Apr-2006  yamt sync with head
 1.11.6.2 01-Jun-2006  kardel Sync with head.
 1.11.6.1 22-Apr-2006  simonb Sync with head.
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.17.2.1 19-Jun-2006  chap Sync with head.
 1.18.66.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.18.64.1 16-May-2008  yamt sync with head.
 1.18.62.1 18-May-2008  yamt sync with head.
 1.18.60.1 02-Jun-2008  mjf Sync with HEAD.
 1.10 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.9 09-Jul-2011  matt branches: 1.9.2; 1.9.12;
Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h
 1.8 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.7 05-Apr-2006  tsutsui branches: 1.7.88; 1.7.94;
ANSIfy, KNF
 1.6 11-Dec-2005  christos branches: 1.6.4; 1.6.6; 1.6.8; 1.6.10; 1.6.12;
merge ktrace-lwp.
 1.5 12-Sep-2003  tsutsui branches: 1.5.16;
Use common mips generic software interrupt routines.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 13-Jan-2002  augustss branches: 1.3.16;
Implement pci_intr_disestablish().
 1.2 31-Mar-2000  soren branches: 1.2.6; 1.2.10; 1.2.14;
Some cleanups.
 1.1 19-Mar-2000  soren NetBSD/cobalt. Work-in-progress.
 1.2.14.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.10.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.6.1 31-Mar-2000  bouyer file pciide_machdep.c was added on branch thorpej_scsipi on 2000-11-20 20:07:10 +0000
 1.3.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.16.1 03-Aug-2004  skrll Sync with HEAD
 1.5.16.1 21-Jun-2006  yamt sync with head.
 1.6.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.6.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.6.8.1 11-Apr-2006  yamt sync with head
 1.6.6.1 22-Apr-2006  simonb Sync with head.
 1.6.4.1 09-Sep-2006  rpaulo sync with head
 1.7.94.1 06-Jun-2011  jruoho Sync with HEAD.
 1.7.88.1 21-Apr-2011  rmind sync with head
 1.9.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.2.1 30-Oct-2012  yamt sync with head
 1.3 25-Jun-2003  cdi Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.2 20-Jun-2000  soren branches: 1.2.2; 1.2.4;
s/installboot/installkernel/, so it won't be confused with a real installboot.
 1.1 30-Mar-2000  soren branches: 1.1.2;
Crude kernel installer.
 1.1.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.2.4.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.4.1 20-Jun-2000  bouyer file Makefile was added on branch thorpej_scsipi on 2000-11-20 20:07:10 +0000
 1.2.2.2 20-Jun-2000  soren s/installboot/installkernel/, so it won't be confused with a real installboot.
 1.2.2.1 20-Jun-2000  soren file Makefile was added on branch netbsd-1-5 on 2000-06-20 00:24:04 +0000
 1.2 08-Sep-2016  christos Avoid the PIE
 1.1 30-Mar-2000  soren branches: 1.1.6; 1.1.180; 1.1.200;
Crude kernel installer.
 1.1.200.1 05-Oct-2016  skrll Sync with HEAD
 1.1.180.1 03-Dec-2017  jdolecek update from HEAD
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 30-Mar-2000  bouyer file Makefile.inc was added on branch thorpej_scsipi on 2000-11-20 20:07:10 +0000
 1.32 08-Apr-2017  christos centralize vers.c building for standalone programs.
 1.31 08-Sep-2016  christos branches: 1.31.2;
Avoid the PIE
 1.30 23-Jun-2015  matt branches: 1.30.2;
Always build for mips3. Use -Os instead -O2 for smallest code size.
text goes from 74608 to 63020
 1.29 05-Aug-2014  apb branches: 1.29.4;
Use ${TOOL_GZIP_N} instead of ${TOOL_GZIP} -n, and similarly
use ${TOOL_GZIP_N} -9 instead of ${TOOL_GZIP} -9n, etc.

This will pass -nT instead of just -n if the gzip program is
actually pigz.
 1.28 27-Jan-2014  apb branches: 1.28.2;
Pass the -n flag to gzip invocations.

This prevents it from embedding a timestamp in the output. We pass
"-n" unconditionally, not conditional on MKREPRO, because many other
invocations of gzip already passed the -n flag unconditionally.
 1.27 16-Jan-2014  christos eliminate use of bsd.sys.mk from Makefiles
 1.26 12-Jan-2014  tsutsui Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

XXX: probabry we should have bsd.saprog.mk or something.
 1.25 10-Jul-2011  mrg branches: 1.25.2; 1.25.12; 1.25.16;
don't set MACHINE_ARCH. the CPUFLAGS/etc. is enough, and otherwise this
doesn't work with an isolated $TOOLDIR from the mipse[lb] toolchain.
 1.24 09-Jul-2011  matt Use TOOL_GZIP
 1.23 20-Feb-2011  matt Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).
 1.22 22-Jan-2011  joerg Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
 1.21 27-May-2010  dholland branches: 1.21.2; 1.21.4;
Introduce .WAIT into the cleandir rule for blasting the libsa/libkern/etc.
trees, because it can race with the libsa/libkern/etc. makefiles' own
cleandir rules. I think I've found all of the uses of the offending idiom...
Closes PR 43360.
 1.20 19-Jan-2010  tsutsui branches: 1.20.2; 1.20.4;
Use -DLIBSA_PRINTF_LONGLONG_SUPPORT -DLIBSA_PRINTF_WIDTH_SUPPORT
in debug printf()s.
 1.19 15-Mar-2009  tsutsui Use <bsd.klinks.mk> for MD include dir symlinks.
 1.18 28-May-2008  tsutsui branches: 1.18.6; 1.18.12;
Print boot banner and a loading kernel name onto LCD,
for users who don't have serial console. Bump version.
 1.17 23-Mar-2008  tsutsui branches: 1.17.2; 1.17.4; 1.17.6;
Use macro defined in <machine/cpu.h> for cobalt_id and device addresses etc.
since <machine/leds.h> has been removed.
Also remove redundant address definitions in Makefile and local headers.
Pointed out by dieter roelants.
 1.16 16-Mar-2008  tsutsui Add support for optional Z85C30 serial console on Cobalt Qube 2700.
Bump version.
 1.15 02-Mar-2008  tsutsui WARNSfy
 1.14 01-Mar-2008  tsutsui Split out a PCI configuration space read function into a separate file
so that we could use it in other sources.
 1.13 01-Mar-2008  tsutsui - print cobalt model names in boot banner
- bump version.
 1.12 30-Oct-2007  tsutsui branches: 1.12.12; 1.12.16;
Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.
 1.11 12-Aug-2006  uwe branches: 1.11.6; 1.11.12; 1.11.22; 1.11.30; 1.11.32; 1.11.36;
Link libkern last. It contains functions normally found in libgcc, so
other libraries might have references to them.

Makes this compile with gcc4 (that emits calls to __ash[rl]di3 in libsa).
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.8; 1.10.18;
merge ktrace-lwp.
 1.9 01-Jan-2005  simonb branches: 1.9.10;
Don't specify the object format to pick the right endianness - the
linker already knows if it is big- or little-endian.
 1.8 21-Jun-2004  jmc Ignore errors on some rm -rf's for platforms that aren't quite
POSIX compliant
and return errors on r/o source (FreeBSD) for -rf. Fixes PR#25022
 1.7 10-Apr-2004  tsutsui Add a prompt to specify a kernel filename to be loaded on bootloader.
 1.6 27-Jan-2004  cdi branches: 1.6.2;
Load the boot program at 0x80F00000 to give the boxes with just 16Mb of
RAM a chance to boot. Discussed with soren@, tested on customer's board.

NB: While acceptable as a temporary workaround since most (all?) Cobalt
hardware comes with no less than 16Megs on board, changing a kernel load
address or making a boot loader relocatable could be a better solution.
 1.5 07-Jan-2004  cdi Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.
 1.4 14-Dec-2003  tsutsui Include <bsd.own.mk> at the top so that machine-links are also created
on "make depend". Tested on my RaQ2, and fixes port-cobalt/23711.
While here, two more cosmetics:
- remove redundant definitions
- use NOMAN rather than setting MAN empty
 1.3 26-Oct-2003  lukem Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
 1.2 08-Oct-2003  simonb Define LIB{CRT0,C,CRTBEGIN,CRTEND} as nothing, we don't need to link
against them.
 1.1 25-Jun-2003  cdi branches: 1.1.2;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.2.4 17-Jan-2005  skrll Sync with HEAD.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.2.1 22-Jun-2004  tron branches: 1.6.2.1.2;
Pull up revision 1.8 (requested by jmc in ticket #531):
Ignore errors on some rm -rf's for platforms that aren't quite
POSIX compliant
and return errors on r/o source (FreeBSD) for -rf. Fixes PR#25022
 1.6.2.1.2.1 13-Apr-2005  tron Pull up revision 1.7 (requested by tsutsui in ticket #1070):
Add a prompt to specify a kernel filename to be loaded on bootloader.
 1.9.10.4 24-Mar-2008  yamt sync with head.
 1.9.10.3 17-Mar-2008  yamt sync with head.
 1.9.10.2 15-Nov-2007  yamt sync with head.
 1.9.10.1 30-Dec-2006  yamt sync with head.
 1.10.18.1 15-Aug-2006  tron Pull up following revision(s) (requested by uwe in ticket #23):
sys/arch/cobalt/stand/boot/Makefile: revision 1.11
Link libkern last. It contains functions normally found in libgcc, so
other libraries might have references to them.
Makes this compile with gcc4 (that emits calls to __ash[rl]di3 in libsa).
 1.10.8.1 03-Sep-2006  yamt sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.36.1 13-Nov-2007  bouyer Sync with HEAD
 1.11.32.2 23-Mar-2008  matt sync with HEAD
 1.11.32.1 06-Nov-2007  matt sync with HEAD
 1.11.30.1 31-Oct-2007  joerg Sync with HEAD.
 1.11.22.1 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.11.12.1 03-Dec-2007  ad Sync with HEAD.
 1.11.6.1 04-Nov-2007  pavel Pull up following revisions (requested by tsutsui in ticket #974):
sys/arch/cobalt/cobalt/autoconf.c: revision 1.25-1.26
sys/arch/cobalt/cobalt/machdep.c: revision 1.89
sys/arch/cobalt/stand/boot/Makefile: revision 1.12
sys/arch/cobalt/stand/boot/boot.c: revision 1.10
sys/arch/cobalt/stand/boot/boot.h: revision 1.6
sys/arch/cobalt/stand/boot/cache.c: revision 1.1-1.2
sys/arch/cobalt/stand/boot/clock.c: revision 1.2
sys/arch/cobalt/stand/boot/conf.c: revision 1.5
sys/arch/cobalt/stand/boot/devopen.c: revision 1.4
sys/arch/cobalt/stand/boot/nif_tlp.c: revision 1.1
sys/arch/cobalt/stand/boot/start.S: revision 1.6
sys/arch/cobalt/stand/boot/tlp.c: revision 1.1-1.3
sys/arch/cobalt/stand/boot/version: revision 1.6
sys/lib/libsa/dev_net.h: revision 1.5
Add an extern decl of try_bootp variable here since MD sources could set it.

In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit

Assume netboot if "nfsroot=/path" is specified in bootstring.

Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().

Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.

Fix my stupid bug in cache flush code and remove one kludge for it.

- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.12.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.12.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.12.12.1 24-Mar-2008  keiichi sync with head.
 1.17.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.17.4.3 11-Aug-2010  yamt sync with head.
 1.17.4.2 11-Mar-2010  yamt sync with head
 1.17.4.1 04-May-2009  yamt sync with head.
 1.17.2.1 04-Jun-2008  yamt sync with head
 1.18.12.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.6.1 28-Apr-2009  skrll Sync with HEAD.
 1.20.4.2 05-Mar-2011  rmind sync with head
 1.20.4.1 30-May-2010  rmind sync with head
 1.20.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.21.4.2 05-Mar-2011  bouyer Sync with HEAD
 1.21.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.21.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.25.16.1 18-May-2014  rmind sync with head
 1.25.12.2 03-Dec-2017  jdolecek update from HEAD
 1.25.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.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.28.2.1 10-Aug-2014  tls Rebase.
 1.29.4.3 28-Aug-2017  skrll Sync with HEAD
 1.29.4.2 05-Oct-2016  skrll Sync with HEAD
 1.29.4.1 22-Sep-2015  skrll Sync with HEAD
 1.30.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.31.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.20 22-Jan-2011  joerg Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
 1.19 10-Jan-2010  tsutsui branches: 1.19.4; 1.19.6; 1.19.8;
Make these compile with -D_DEBUG (use proper printf types).
 1.18 16-Dec-2009  matt Make cobalt build again.
 1.17 29-May-2008  tsutsui - also put a boot failure message to LCD
- fix botched (and unused) macro
- use struct lcd_message consistently
 1.16 28-May-2008  tsutsui Print boot banner and a loading kernel name onto LCD,
for users who don't have serial console. Bump version.
 1.15 28-Apr-2008  martin branches: 1.15.2;
Remove clause 3 and 4 from TNF licenses
 1.14 23-Mar-2008  tsutsui branches: 1.14.2; 1.14.4;
Use macro defined in <machine/cpu.h> for cobalt_id and device addresses etc.
since <machine/leds.h> has been removed.
Also remove redundant address definitions in Makefile and local headers.
Pointed out by dieter roelants.
 1.13 02-Mar-2008  tsutsui WARNSfy
 1.12 01-Mar-2008  tsutsui Split out a PCI configuration space read function into a separate file
so that we could use it in other sources.
 1.11 01-Mar-2008  tsutsui - print cobalt model names in boot banner
- bump version.
 1.10 30-Oct-2007  tsutsui branches: 1.10.12; 1.10.16;
Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.
 1.9 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.8 13-Aug-2007  tsutsui branches: 1.8.2; 1.8.6;
Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.7 10-Aug-2007  tsutsui Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.
 1.6 03-Aug-2007  tsutsui branches: 1.6.2;
Misc KNF and cosmetics.
 1.5 25-Nov-2005  tsutsui branches: 1.5.24; 1.5.30; 1.5.38; 1.5.40; 1.5.42; 1.5.44;
No need to include <machine/vmparam.h> here.
 1.4 10-Apr-2004  tsutsui branches: 1.4.12; 1.4.18;
Add a prompt to specify a kernel filename to be loaded on bootloader.
 1.3 07-Jan-2004  cdi branches: 1.3.4;
Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 25-Jun-2003  cdi branches: 1.1.2;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.2.4 11-Dec-2005  christos Sync with head.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.4.1 13-Apr-2005  tron Pull up revision 1.4 (requested by tsutsui in ticket #1070):
Add a prompt to specify a kernel filename to be loaded on bootloader.
 1.4.18.1 29-Nov-2005  yamt sync with head.
 1.4.12.5 24-Mar-2008  yamt sync with head.
 1.4.12.4 17-Mar-2008  yamt sync with head.
 1.4.12.3 15-Nov-2007  yamt sync with head.
 1.4.12.2 03-Sep-2007  yamt sync with head.
 1.4.12.1 21-Jun-2006  yamt sync with head.
 1.5.44.1 15-Aug-2007  skrll Sync with HEAD.
 1.5.42.1 07-Aug-2007  matt Sync with HEAD.
 1.5.40.2 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.5.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.5.38.1 03-Oct-2007  garbled Sync with HEAD
 1.5.30.3 03-Dec-2007  ad Sync with HEAD.
 1.5.30.2 03-Dec-2007  ad Sync with HEAD.
 1.5.30.1 20-Aug-2007  ad Sync with HEAD.
 1.5.24.2 04-Nov-2007  pavel Pull up following revisions (requested by tsutsui in ticket #974):
sys/arch/cobalt/cobalt/autoconf.c: revision 1.25-1.26
sys/arch/cobalt/cobalt/machdep.c: revision 1.89
sys/arch/cobalt/stand/boot/Makefile: revision 1.12
sys/arch/cobalt/stand/boot/boot.c: revision 1.10
sys/arch/cobalt/stand/boot/boot.h: revision 1.6
sys/arch/cobalt/stand/boot/cache.c: revision 1.1-1.2
sys/arch/cobalt/stand/boot/clock.c: revision 1.2
sys/arch/cobalt/stand/boot/conf.c: revision 1.5
sys/arch/cobalt/stand/boot/devopen.c: revision 1.4
sys/arch/cobalt/stand/boot/nif_tlp.c: revision 1.1
sys/arch/cobalt/stand/boot/start.S: revision 1.6
sys/arch/cobalt/stand/boot/tlp.c: revision 1.1-1.3
sys/arch/cobalt/stand/boot/version: revision 1.6
sys/lib/libsa/dev_net.h: revision 1.5
Add an extern decl of try_bootp variable here since MD sources could set it.

In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit

Assume netboot if "nfsroot=/path" is specified in bootstring.

Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().

Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.

Fix my stupid bug in cache flush code and remove one kludge for it.

- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.5.24.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.6.2.3 31-Oct-2007  joerg Sync with HEAD.
 1.6.2.2 16-Aug-2007  jmcneill Sync with HEAD.
 1.6.2.1 03-Aug-2007  jmcneill file boot.c was added on branch jmcneill-pm on 2007-08-16 11:02:16 +0000
 1.8.6.1 13-Nov-2007  bouyer Sync with HEAD
 1.8.2.2 23-Mar-2008  matt sync with HEAD
 1.8.2.1 06-Nov-2007  matt sync with HEAD
 1.10.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.10.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.10.12.1 24-Mar-2008  keiichi sync with head.
 1.14.4.3 11-Mar-2010  yamt sync with head
 1.14.4.2 04-May-2009  yamt sync with head.
 1.14.4.1 16-May-2008  yamt sync with head.
 1.14.2.2 04-Jun-2008  yamt sync with head
 1.14.2.1 18-May-2008  yamt sync with head.
 1.15.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.19.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.19.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.19.4.1 05-Mar-2011  rmind sync with head
 1.13 23-Jun-2015  matt #include <mips/cpuregs.h>
 1.12 29-May-2008  tsutsui branches: 1.12.42; 1.12.62;
- also put a boot failure message to LCD
- fix botched (and unused) macro
- use struct lcd_message consistently
 1.11 28-May-2008  tsutsui Print boot banner and a loading kernel name onto LCD,
for users who don't have serial console. Bump version.
 1.10 28-Apr-2008  martin branches: 1.10.2;
Remove clause 3 and 4 from TNF licenses
 1.9 23-Mar-2008  tsutsui branches: 1.9.2; 1.9.4;
Use macro defined in <machine/cpu.h> for cobalt_id and device addresses etc.
since <machine/leds.h> has been removed.
Also remove redundant address definitions in Makefile and local headers.
Pointed out by dieter roelants.
 1.8 01-Mar-2008  tsutsui Split out a PCI configuration space read function into a separate file
so that we could use it in other sources.
 1.7 01-Mar-2008  tsutsui - print cobalt model names in boot banner
- bump version.
 1.6 30-Oct-2007  tsutsui branches: 1.6.12; 1.6.16;
Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.
 1.5 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.4 03-Aug-2007  tsutsui branches: 1.4.2; 1.4.4; 1.4.8;
Misc KNF and cosmetics.
 1.3 11-Dec-2005  christos branches: 1.3.24; 1.3.30; 1.3.38; 1.3.40; 1.3.42; 1.3.44;
merge ktrace-lwp.
 1.2 10-Apr-2004  tsutsui branches: 1.2.12;
Add a prompt to specify a kernel filename to be loaded on bootloader.
 1.1 25-Jun-2003  cdi branches: 1.1.2; 1.1.6;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.6.1 13-Apr-2005  tron Pull up revision 1.2 (requested by tsutsui in ticket #1070):
Add a prompt to specify a kernel filename to be loaded on bootloader.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.2.12.4 24-Mar-2008  yamt sync with head.
 1.2.12.3 17-Mar-2008  yamt sync with head.
 1.2.12.2 15-Nov-2007  yamt sync with head.
 1.2.12.1 03-Sep-2007  yamt sync with head.
 1.3.44.1 15-Aug-2007  skrll Sync with HEAD.
 1.3.42.1 07-Aug-2007  matt Sync with HEAD.
 1.3.40.2 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.3.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.3.38.1 03-Oct-2007  garbled Sync with HEAD
 1.3.30.3 03-Dec-2007  ad Sync with HEAD.
 1.3.30.2 03-Dec-2007  ad Sync with HEAD.
 1.3.30.1 20-Aug-2007  ad Sync with HEAD.
 1.3.24.2 04-Nov-2007  pavel Pull up following revisions (requested by tsutsui in ticket #974):
sys/arch/cobalt/cobalt/autoconf.c: revision 1.25-1.26
sys/arch/cobalt/cobalt/machdep.c: revision 1.89
sys/arch/cobalt/stand/boot/Makefile: revision 1.12
sys/arch/cobalt/stand/boot/boot.c: revision 1.10
sys/arch/cobalt/stand/boot/boot.h: revision 1.6
sys/arch/cobalt/stand/boot/cache.c: revision 1.1-1.2
sys/arch/cobalt/stand/boot/clock.c: revision 1.2
sys/arch/cobalt/stand/boot/conf.c: revision 1.5
sys/arch/cobalt/stand/boot/devopen.c: revision 1.4
sys/arch/cobalt/stand/boot/nif_tlp.c: revision 1.1
sys/arch/cobalt/stand/boot/start.S: revision 1.6
sys/arch/cobalt/stand/boot/tlp.c: revision 1.1-1.3
sys/arch/cobalt/stand/boot/version: revision 1.6
sys/lib/libsa/dev_net.h: revision 1.5
Add an extern decl of try_bootp variable here since MD sources could set it.

In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit

Assume netboot if "nfsroot=/path" is specified in bootstring.

Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().

Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.

Fix my stupid bug in cache flush code and remove one kludge for it.

- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.3.24.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.4.8.1 13-Nov-2007  bouyer Sync with HEAD
 1.4.4.2 23-Mar-2008  matt sync with HEAD
 1.4.4.1 06-Nov-2007  matt sync with HEAD
 1.4.2.2 31-Oct-2007  joerg Sync with HEAD.
 1.4.2.1 03-Aug-2007  joerg file boot.h was added on branch jmcneill-pm on 2007-10-31 23:13:56 +0000
 1.6.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.6.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.6.12.1 24-Mar-2008  keiichi sync with head.
 1.9.4.2 04-May-2009  yamt sync with head.
 1.9.4.1 16-May-2008  yamt sync with head.
 1.9.2.2 04-Jun-2008  yamt sync with head
 1.9.2.1 18-May-2008  yamt sync with head.
 1.10.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.12.62.1 22-Sep-2015  skrll Sync with HEAD
 1.12.42.1 03-Dec-2017  jdolecek update from HEAD
 1.7 10-Jan-2010  tsutsui Make these compile with -D_DEBUG (use proper printf types).
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 31-Jan-2008  tsutsui branches: 1.5.6; 1.5.8; 1.5.10;
Account bi_size properly.
 1.4 17-Oct-2007  garbled branches: 1.4.2;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.3 03-Aug-2007  tsutsui branches: 1.3.2; 1.3.4;
Misc KNF and cosmetics.
 1.2 11-Dec-2005  christos branches: 1.2.24; 1.2.30; 1.2.38; 1.2.40; 1.2.42; 1.2.44;
merge ktrace-lwp.
 1.1 07-Jan-2004  cdi branches: 1.1.4; 1.1.18;
Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.
 1.1.18.2 04-Feb-2008  yamt sync with head.
 1.1.18.1 03-Sep-2007  yamt sync with head.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 07-Jan-2004  skrll file bootinfo.c was added on branch ktrace-lwp on 2004-08-03 10:33:46 +0000
 1.2.44.1 15-Aug-2007  skrll Sync with HEAD.
 1.2.42.1 07-Aug-2007  matt Sync with HEAD.
 1.2.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.2.38.1 03-Oct-2007  garbled Sync with HEAD
 1.2.30.1 20-Aug-2007  ad Sync with HEAD.
 1.2.24.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.3.4.2 23-Mar-2008  matt sync with HEAD
 1.3.4.1 06-Nov-2007  matt sync with HEAD
 1.3.2.2 03-Aug-2007  tsutsui Misc KNF and cosmetics.
 1.3.2.1 03-Aug-2007  tsutsui file bootinfo.c was added on branch jmcneill-pm on 2007-08-03 13:15:57 +0000
 1.4.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.5.10.2 11-Mar-2010  yamt sync with head
 1.5.10.1 16-May-2008  yamt sync with head.
 1.5.8.1 18-May-2008  yamt sync with head.
 1.5.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 17-Oct-2007  garbled branches: 1.4.16; 1.4.18; 1.4.20;
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.3 03-Aug-2007  tsutsui branches: 1.3.2; 1.3.4;
Misc KNF and cosmetics.
 1.2 11-Dec-2005  christos branches: 1.2.24; 1.2.30; 1.2.38; 1.2.40; 1.2.42; 1.2.44;
merge ktrace-lwp.
 1.1 07-Jan-2004  cdi branches: 1.1.4; 1.1.18;
Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.
 1.1.18.1 03-Sep-2007  yamt sync with head.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 07-Jan-2004  skrll file bootinfo.h was added on branch ktrace-lwp on 2004-08-03 10:33:46 +0000
 1.2.44.1 15-Aug-2007  skrll Sync with HEAD.
 1.2.42.1 07-Aug-2007  matt Sync with HEAD.
 1.2.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.2.38.1 03-Oct-2007  garbled Sync with HEAD
 1.2.30.1 20-Aug-2007  ad Sync with HEAD.
 1.2.24.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.3.4.1 06-Nov-2007  matt sync with HEAD
 1.3.2.2 03-Aug-2007  tsutsui Misc KNF and cosmetics.
 1.3.2.1 03-Aug-2007  tsutsui file bootinfo.h was added on branch jmcneill-pm on 2007-08-03 13:15:57 +0000
 1.4.20.1 16-May-2008  yamt sync with head.
 1.4.18.1 18-May-2008  yamt sync with head.
 1.4.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 30-Oct-2007  tsutsui branches: 1.2.2; 1.2.4; 1.2.8; 1.2.10; 1.2.12; 1.2.14; 1.2.24;
Fix my stupid bug in cache flush code and remove one kludge for it.
 1.1 30-Oct-2007  tsutsui Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.
 1.2.24.2 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.2.24.1 30-Oct-2007  wrstuden file cache.c was added on branch wrstuden-fixsa on 2008-01-06 05:00:53 +0000
 1.2.14.2 03-Dec-2007  ad Sync with HEAD.
 1.2.14.1 30-Oct-2007  ad file cache.c was added on branch vmlocking on 2007-12-03 19:03:07 +0000
 1.2.12.2 15-Nov-2007  yamt sync with head.
 1.2.12.1 30-Oct-2007  yamt file cache.c was added on branch yamt-lazymbuf on 2007-11-15 11:42:40 +0000
 1.2.10.2 13-Nov-2007  bouyer Sync with HEAD
 1.2.10.1 30-Oct-2007  bouyer file cache.c was added on branch bouyer-xenamd64 on 2007-11-13 15:58:19 +0000
 1.2.8.2 06-Nov-2007  matt sync with HEAD
 1.2.8.1 30-Oct-2007  matt file cache.c was added on branch matt-armv6 on 2007-11-06 23:15:44 +0000
 1.2.4.2 04-Nov-2007  pavel Pull up following revisions (requested by tsutsui in ticket #974):
sys/arch/cobalt/cobalt/autoconf.c: revision 1.25-1.26
sys/arch/cobalt/cobalt/machdep.c: revision 1.89
sys/arch/cobalt/stand/boot/Makefile: revision 1.12
sys/arch/cobalt/stand/boot/boot.c: revision 1.10
sys/arch/cobalt/stand/boot/boot.h: revision 1.6
sys/arch/cobalt/stand/boot/cache.c: revision 1.1-1.2
sys/arch/cobalt/stand/boot/clock.c: revision 1.2
sys/arch/cobalt/stand/boot/conf.c: revision 1.5
sys/arch/cobalt/stand/boot/devopen.c: revision 1.4
sys/arch/cobalt/stand/boot/nif_tlp.c: revision 1.1
sys/arch/cobalt/stand/boot/start.S: revision 1.6
sys/arch/cobalt/stand/boot/tlp.c: revision 1.1-1.3
sys/arch/cobalt/stand/boot/version: revision 1.6
sys/lib/libsa/dev_net.h: revision 1.5
Add an extern decl of try_bootp variable here since MD sources could set it.

In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit

Assume netboot if "nfsroot=/path" is specified in bootstring.

Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().

Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.

Fix my stupid bug in cache flush code and remove one kludge for it.

- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.2.4.1 30-Oct-2007  pavel file cache.c was added on branch netbsd-4 on 2007-11-04 16:30:54 +0000
 1.2.2.2 31-Oct-2007  joerg Sync with HEAD.
 1.2.2.1 30-Oct-2007  joerg file cache.c was added on branch jmcneill-pm on 2007-10-31 23:13:57 +0000
 1.5 21-Nov-2014  christos need clock_subr.h for bcdtobin()
 1.4 12-Jan-2009  tsutsui branches: 1.4.24;
Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

satime_t (currently unsigned int):
numbers in seconds returned by the machine dependent getsecs() function
which are used to measure relative time

saseconds_t (currently int):
numbers in seconds used to specify timeout to network drivers

Per discussion on current-users.
 1.3 28-Apr-2008  martin branches: 1.3.8;
Remove clause 3 and 4 from TNF licenses
 1.2 30-Oct-2007  tsutsui branches: 1.2.16; 1.2.18; 1.2.20;
Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.
 1.1 25-Jun-2003  cdi branches: 1.1.18; 1.1.54; 1.1.60; 1.1.70; 1.1.78; 1.1.80; 1.1.84;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.84.1 13-Nov-2007  bouyer Sync with HEAD
 1.1.80.1 06-Nov-2007  matt sync with HEAD
 1.1.78.1 31-Oct-2007  joerg Sync with HEAD.
 1.1.70.1 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.1.60.2 03-Dec-2007  ad Sync with HEAD.
 1.1.60.1 03-Dec-2007  ad Sync with HEAD.
 1.1.54.1 04-Nov-2007  pavel Pull up following revisions (requested by tsutsui in ticket #974):
sys/arch/cobalt/cobalt/autoconf.c: revision 1.25-1.26
sys/arch/cobalt/cobalt/machdep.c: revision 1.89
sys/arch/cobalt/stand/boot/Makefile: revision 1.12
sys/arch/cobalt/stand/boot/boot.c: revision 1.10
sys/arch/cobalt/stand/boot/boot.h: revision 1.6
sys/arch/cobalt/stand/boot/cache.c: revision 1.1-1.2
sys/arch/cobalt/stand/boot/clock.c: revision 1.2
sys/arch/cobalt/stand/boot/conf.c: revision 1.5
sys/arch/cobalt/stand/boot/devopen.c: revision 1.4
sys/arch/cobalt/stand/boot/nif_tlp.c: revision 1.1
sys/arch/cobalt/stand/boot/start.S: revision 1.6
sys/arch/cobalt/stand/boot/tlp.c: revision 1.1-1.3
sys/arch/cobalt/stand/boot/version: revision 1.6
sys/lib/libsa/dev_net.h: revision 1.5
Add an extern decl of try_bootp variable here since MD sources could set it.

In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit

Assume netboot if "nfsroot=/path" is specified in bootstring.

Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().

Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.

Fix my stupid bug in cache flush code and remove one kludge for it.

- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.1.18.1 15-Nov-2007  yamt sync with head.
 1.2.20.2 04-May-2009  yamt sync with head.
 1.2.20.1 16-May-2008  yamt sync with head.
 1.2.18.1 18-May-2008  yamt sync with head.
 1.2.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.4.24.1 03-Dec-2017  jdolecek update from HEAD
 1.7 02-Mar-2008  tsutsui WARNSfy
 1.6 17-Oct-2007  garbled branches: 1.6.12; 1.6.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.5 03-Aug-2007  tsutsui branches: 1.5.2; 1.5.4;
Misc KNF and cosmetics.
 1.4 11-Dec-2005  christos branches: 1.4.24; 1.4.30; 1.4.38; 1.4.40; 1.4.42; 1.4.44;
merge ktrace-lwp.
 1.3 08-Oct-2003  simonb branches: 1.3.16;
Remove tokens at the end of #undef.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 25-Jun-2003  cdi branches: 1.1.2;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.16.2 17-Mar-2008  yamt sync with head.
 1.3.16.1 03-Sep-2007  yamt sync with head.
 1.4.44.1 15-Aug-2007  skrll Sync with HEAD.
 1.4.42.1 07-Aug-2007  matt Sync with HEAD.
 1.4.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.4.38.1 03-Oct-2007  garbled Sync with HEAD
 1.4.30.1 20-Aug-2007  ad Sync with HEAD.
 1.4.24.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.5.4.2 23-Mar-2008  matt sync with HEAD
 1.5.4.1 06-Nov-2007  matt sync with HEAD
 1.5.2.2 03-Aug-2007  tsutsui Misc KNF and cosmetics.
 1.5.2.1 03-Aug-2007  tsutsui file com.c was added on branch jmcneill-pm on 2007-08-03 13:15:57 +0000
 1.6.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.6.12.1 24-Mar-2008  keiichi sync with head.
 1.3 22-Jan-2011  joerg Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
 1.2 28-Apr-2008  martin branches: 1.2.22; 1.2.28; 1.2.30;
Remove clause 3 and 4 from TNF licenses
 1.1 25-Jun-2003  cdi branches: 1.1.104; 1.1.106; 1.1.108;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.108.1 16-May-2008  yamt sync with head.
 1.1.106.1 18-May-2008  yamt sync with head.
 1.1.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.30.1 08-Feb-2011  bouyer Sync with HEAD
 1.2.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.22.1 05-Mar-2011  rmind sync with head
 1.10 13-May-2008  tsutsui On netboot specify only FS_OPS(nfs) explicitly for file_system[] fs_ops.
Trying block device fs_ops like ext2fs on netboot could be problematic
on some conditions since not all libsa functions handle errors properly.
 1.9 13-May-2008  tsutsui Remove an unused extern declaration.
 1.8 02-Dec-2007  tsutsui branches: 1.8.14; 1.8.16; 1.8.18; 1.8.20;
Use __arraycount().
 1.7 01-Dec-2007  tsutsui Add ext2fs support.
 1.6 01-Dec-2007  tsutsui Include both ffsv1 and ffsv2 supports.
 1.5 30-Oct-2007  tsutsui branches: 1.5.2;
Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.
 1.4 11-Dec-2005  christos branches: 1.4.24; 1.4.30; 1.4.40; 1.4.48; 1.4.50; 1.4.54;
merge ktrace-lwp.
 1.3 23-Jun-2005  junyoung branches: 1.3.2;
Use FS_OPS() macro.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 25-Jun-2003  cdi branches: 1.1.2;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.2.2 07-Dec-2007  yamt sync with head
 1.3.2.1 15-Nov-2007  yamt sync with head.
 1.4.54.1 13-Nov-2007  bouyer Sync with HEAD
 1.4.50.2 09-Jan-2008  matt sync with HEAD
 1.4.50.1 06-Nov-2007  matt sync with HEAD
 1.4.48.2 03-Dec-2007  joerg Sync with HEAD.
 1.4.48.1 31-Oct-2007  joerg Sync with HEAD.
 1.4.40.1 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.4.30.1 03-Dec-2007  ad Sync with HEAD.
 1.4.24.1 04-Nov-2007  pavel Pull up following revisions (requested by tsutsui in ticket #974):
sys/arch/cobalt/cobalt/autoconf.c: revision 1.25-1.26
sys/arch/cobalt/cobalt/machdep.c: revision 1.89
sys/arch/cobalt/stand/boot/Makefile: revision 1.12
sys/arch/cobalt/stand/boot/boot.c: revision 1.10
sys/arch/cobalt/stand/boot/boot.h: revision 1.6
sys/arch/cobalt/stand/boot/cache.c: revision 1.1-1.2
sys/arch/cobalt/stand/boot/clock.c: revision 1.2
sys/arch/cobalt/stand/boot/conf.c: revision 1.5
sys/arch/cobalt/stand/boot/devopen.c: revision 1.4
sys/arch/cobalt/stand/boot/nif_tlp.c: revision 1.1
sys/arch/cobalt/stand/boot/start.S: revision 1.6
sys/arch/cobalt/stand/boot/tlp.c: revision 1.1-1.3
sys/arch/cobalt/stand/boot/version: revision 1.6
sys/lib/libsa/dev_net.h: revision 1.5
Add an extern decl of try_bootp variable here since MD sources could set it.

In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit

Assume netboot if "nfsroot=/path" is specified in bootstring.

Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().

Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.

Fix my stupid bug in cache flush code and remove one kludge for it.

- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.5.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.8.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.8.18.1 16-May-2008  yamt sync with head.
 1.8.16.1 18-May-2008  yamt sync with head.
 1.8.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.10 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.9 29-Apr-2008  tsutsui branches: 1.9.22; 1.9.28; 1.9.30;
- reorganize com console code
- remove unused functions
 1.8 23-Mar-2008  tsutsui branches: 1.8.2; 1.8.4;
Use macro defined in <machine/cpu.h> for cobalt_id and device addresses etc.
since <machine/leds.h> has been removed.
Also remove redundant address definitions in Makefile and local headers.
Pointed out by dieter roelants.
 1.7 16-Mar-2008  tsutsui Add support for optional Z85C30 serial console on Cobalt Qube 2700.
Bump version.
 1.6 01-Mar-2008  tsutsui cnscan() should return -1 (no input) if there is no console device.
Now wd boot works on Qube2700 (which doesn't have serial console).
 1.5 17-Oct-2007  garbled branches: 1.5.12; 1.5.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.4 03-Aug-2007  tsutsui branches: 1.4.2; 1.4.4;
Misc KNF and cosmetics.
 1.3 11-Dec-2005  christos branches: 1.3.24; 1.3.30; 1.3.38; 1.3.40; 1.3.42; 1.3.44;
merge ktrace-lwp.
 1.2 07-Aug-2003  agc branches: 1.2.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 25-Jun-2003  cdi branches: 1.1.2;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.2.16.3 24-Mar-2008  yamt sync with head.
 1.2.16.2 17-Mar-2008  yamt sync with head.
 1.2.16.1 03-Sep-2007  yamt sync with head.
 1.3.44.1 15-Aug-2007  skrll Sync with HEAD.
 1.3.42.1 07-Aug-2007  matt Sync with HEAD.
 1.3.40.2 03-Jun-2008  skrll Sync with netbsd-4.
 1.3.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.3.38.1 03-Oct-2007  garbled Sync with HEAD
 1.3.30.1 20-Aug-2007  ad Sync with HEAD.
 1.3.24.2 09-Mar-2008  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1096):
sys/arch/cobalt/pci/pci_machdep.c: revision 1.25
sys/arch/cobalt/stand/boot/cons.c: revision 1.6
According to info from Byron Servies on port-cobalt,
the interrupt line from the primary (and only) tulip Ethernet
on Qube2700 is connected to CPU INT2, so handle it properly
in pci_intr_map(9).
cnscan() should return -1 (no input) if there is no console device.
Now wd boot works on Qube2700 (which doesn't have serial console).
 1.3.24.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.4.4.2 23-Mar-2008  matt sync with HEAD
 1.4.4.1 06-Nov-2007  matt sync with HEAD
 1.4.2.2 03-Aug-2007  tsutsui Misc KNF and cosmetics.
 1.4.2.1 03-Aug-2007  tsutsui file cons.c was added on branch jmcneill-pm on 2007-08-03 13:15:57 +0000
 1.5.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.5.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.5.12.1 24-Mar-2008  keiichi sync with head.
 1.8.4.1 16-May-2008  yamt sync with head.
 1.8.2.1 18-May-2008  yamt sync with head.
 1.9.30.1 17-Feb-2011  bouyer Sync with HEAD
 1.9.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.9.22.1 05-Mar-2011  rmind sync with head
 1.5 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.4 14-Mar-2009  dsl branches: 1.4.4; 1.4.6; 1.4.8;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.3 11-Dec-2005  christos branches: 1.3.78; 1.3.86; 1.3.92;
merge ktrace-lwp.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 25-Jun-2003  cdi branches: 1.1.2;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.78.1 04-May-2009  yamt sync with head.
 1.4.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.4.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.4.4.1 05-Mar-2011  rmind sync with head
 1.7 13-May-2008  tsutsui On netboot specify only FS_OPS(nfs) explicitly for file_system[] fs_ops.
Trying block device fs_ops like ext2fs on netboot could be problematic
on some conditions since not all libsa functions handle errors properly.
 1.6 28-Apr-2008  martin branches: 1.6.2;
Remove clause 3 and 4 from TNF licenses
 1.5 02-Mar-2008  tsutsui branches: 1.5.2; 1.5.4;
WARNSfy
 1.4 30-Oct-2007  tsutsui branches: 1.4.12; 1.4.16;
Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.
 1.3 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.2 03-Aug-2007  tsutsui branches: 1.2.2; 1.2.4; 1.2.8;
Misc KNF and cosmetics.
 1.1 25-Jun-2003  cdi branches: 1.1.18; 1.1.54; 1.1.60; 1.1.68; 1.1.70; 1.1.72; 1.1.74;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.74.1 15-Aug-2007  skrll Sync with HEAD.
 1.1.72.1 07-Aug-2007  matt Sync with HEAD.
 1.1.70.2 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.1.70.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.1.68.1 03-Oct-2007  garbled Sync with HEAD
 1.1.60.2 03-Dec-2007  ad Sync with HEAD.
 1.1.60.1 20-Aug-2007  ad Sync with HEAD.
 1.1.54.2 04-Nov-2007  pavel Pull up following revisions (requested by tsutsui in ticket #974):
sys/arch/cobalt/cobalt/autoconf.c: revision 1.25-1.26
sys/arch/cobalt/cobalt/machdep.c: revision 1.89
sys/arch/cobalt/stand/boot/Makefile: revision 1.12
sys/arch/cobalt/stand/boot/boot.c: revision 1.10
sys/arch/cobalt/stand/boot/boot.h: revision 1.6
sys/arch/cobalt/stand/boot/cache.c: revision 1.1-1.2
sys/arch/cobalt/stand/boot/clock.c: revision 1.2
sys/arch/cobalt/stand/boot/conf.c: revision 1.5
sys/arch/cobalt/stand/boot/devopen.c: revision 1.4
sys/arch/cobalt/stand/boot/nif_tlp.c: revision 1.1
sys/arch/cobalt/stand/boot/start.S: revision 1.6
sys/arch/cobalt/stand/boot/tlp.c: revision 1.1-1.3
sys/arch/cobalt/stand/boot/version: revision 1.6
sys/lib/libsa/dev_net.h: revision 1.5
Add an extern decl of try_bootp variable here since MD sources could set it.

In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit

Assume netboot if "nfsroot=/path" is specified in bootstring.

Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().

Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.

Fix my stupid bug in cache flush code and remove one kludge for it.

- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.1.54.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.1.18.3 17-Mar-2008  yamt sync with head.
 1.1.18.2 15-Nov-2007  yamt sync with head.
 1.1.18.1 03-Sep-2007  yamt sync with head.
 1.2.8.1 13-Nov-2007  bouyer Sync with HEAD
 1.2.4.2 23-Mar-2008  matt sync with HEAD
 1.2.4.1 06-Nov-2007  matt sync with HEAD
 1.2.2.2 31-Oct-2007  joerg Sync with HEAD.
 1.2.2.1 03-Aug-2007  joerg file devopen.c was added on branch jmcneill-pm on 2007-10-31 23:13:57 +0000
 1.4.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.4.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.4.12.1 24-Mar-2008  keiichi sync with head.
 1.5.4.1 16-May-2008  yamt sync with head.
 1.5.2.1 18-May-2008  yamt sync with head.
 1.6.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.3 04-Sep-2018  riastradh Fix some min/max -> uimin/uimax stragglers.

Confirmed by the 2018-09-04T04:40Z autobuild.
 1.2 29-May-2008  tsutsui branches: 1.2.2; 1.2.4; 1.2.8; 1.2.22; 1.2.92; 1.2.94;
- also put a boot failure message to LCD
- fix botched (and unused) macro
- use struct lcd_message consistently
 1.1 28-May-2008  tsutsui Print boot banner and a loading kernel name onto LCD,
for users who don't have serial console. Bump version.
 1.2.94.1 10-Jun-2019  christos Sync with HEAD
 1.2.92.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2.22.2 04-May-2009  yamt sync with head.
 1.2.22.1 29-May-2008  yamt file lcd.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:54 +0000
 1.2.8.2 23-Jun-2008  wrstuden Add files to branch that were added on -current.

After this, all that's left of update is to merge some changes
that had conflicts.
 1.2.8.1 29-May-2008  wrstuden file lcd.c was added on branch wrstuden-revivesa on 2008-06-23 05:02:12 +0000
 1.2.4.2 04-Jun-2008  yamt sync with head
 1.2.4.1 29-May-2008  yamt file lcd.c was added on branch yamt-pf42 on 2008-06-04 02:04:45 +0000
 1.2.2.2 02-Jun-2008  mjf Sync with HEAD.
 1.2.2.1 29-May-2008  mjf file lcd.c was added on branch mjf-devfs2 on 2008-06-02 13:22:00 +0000
 1.3 12-Jan-2009  tsutsui Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

satime_t (currently unsigned int):
numbers in seconds returned by the machine dependent getsecs() function
which are used to measure relative time

saseconds_t (currently int):
numbers in seconds used to specify timeout to network drivers

Per discussion on current-users.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 30-Oct-2007  tsutsui branches: 1.1.2; 1.1.4; 1.1.8; 1.1.10; 1.1.12; 1.1.14; 1.1.24; 1.1.30; 1.1.32; 1.1.34;
Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.
 1.1.34.2 04-May-2009  yamt sync with head.
 1.1.34.1 16-May-2008  yamt sync with head.
 1.1.32.1 18-May-2008  yamt sync with head.
 1.1.30.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.30.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.24.2 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.1.24.1 30-Oct-2007  wrstuden file nif_tlp.c was added on branch wrstuden-fixsa on 2008-01-06 05:00:53 +0000
 1.1.14.2 03-Dec-2007  ad Sync with HEAD.
 1.1.14.1 30-Oct-2007  ad file nif_tlp.c was added on branch vmlocking on 2007-12-03 19:03:10 +0000
 1.1.12.2 15-Nov-2007  yamt sync with head.
 1.1.12.1 30-Oct-2007  yamt file nif_tlp.c was added on branch yamt-lazymbuf on 2007-11-15 11:42:40 +0000
 1.1.10.2 13-Nov-2007  bouyer Sync with HEAD
 1.1.10.1 30-Oct-2007  bouyer file nif_tlp.c was added on branch bouyer-xenamd64 on 2007-11-13 15:58:20 +0000
 1.1.8.2 06-Nov-2007  matt sync with HEAD
 1.1.8.1 30-Oct-2007  matt file nif_tlp.c was added on branch matt-armv6 on 2007-11-06 23:15:46 +0000
 1.1.4.2 04-Nov-2007  pavel Pull up following revisions (requested by tsutsui in ticket #974):
sys/arch/cobalt/cobalt/autoconf.c: revision 1.25-1.26
sys/arch/cobalt/cobalt/machdep.c: revision 1.89
sys/arch/cobalt/stand/boot/Makefile: revision 1.12
sys/arch/cobalt/stand/boot/boot.c: revision 1.10
sys/arch/cobalt/stand/boot/boot.h: revision 1.6
sys/arch/cobalt/stand/boot/cache.c: revision 1.1-1.2
sys/arch/cobalt/stand/boot/clock.c: revision 1.2
sys/arch/cobalt/stand/boot/conf.c: revision 1.5
sys/arch/cobalt/stand/boot/devopen.c: revision 1.4
sys/arch/cobalt/stand/boot/nif_tlp.c: revision 1.1
sys/arch/cobalt/stand/boot/start.S: revision 1.6
sys/arch/cobalt/stand/boot/tlp.c: revision 1.1-1.3
sys/arch/cobalt/stand/boot/version: revision 1.6
sys/lib/libsa/dev_net.h: revision 1.5
Add an extern decl of try_bootp variable here since MD sources could set it.

In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit

Assume netboot if "nfsroot=/path" is specified in bootstring.

Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().

Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.

Fix my stupid bug in cache flush code and remove one kludge for it.

- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.1.4.1 30-Oct-2007  pavel file nif_tlp.c was added on branch netbsd-4 on 2007-11-04 16:30:53 +0000
 1.1.2.2 31-Oct-2007  joerg Sync with HEAD.
 1.1.2.1 30-Oct-2007  joerg file nif_tlp.c was added on branch jmcneill-pm on 2007-10-31 23:13:57 +0000
 1.2.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.5 29-Apr-2008  tsutsui - reorganize com console code
- remove unused functions
 1.4 23-Mar-2008  tsutsui branches: 1.4.2; 1.4.4;
Use macro defined in <machine/cpu.h> for cobalt_id and device addresses etc.
since <machine/leds.h> has been removed.
Also remove redundant address definitions in Makefile and local headers.
Pointed out by dieter roelants.
 1.3 17-Oct-2007  garbled branches: 1.3.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.2 03-Aug-2007  tsutsui branches: 1.2.2; 1.2.4;
Misc KNF and cosmetics.
 1.1 25-Jun-2003  cdi branches: 1.1.18; 1.1.54; 1.1.60; 1.1.68; 1.1.70; 1.1.72; 1.1.74;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.74.1 15-Aug-2007  skrll Sync with HEAD.
 1.1.72.1 07-Aug-2007  matt Sync with HEAD.
 1.1.70.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.1.68.1 03-Oct-2007  garbled Sync with HEAD
 1.1.60.1 20-Aug-2007  ad Sync with HEAD.
 1.1.54.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.1.18.2 24-Mar-2008  yamt sync with head.
 1.1.18.1 03-Sep-2007  yamt sync with head.
 1.2.4.1 06-Nov-2007  matt sync with HEAD
 1.2.2.2 03-Aug-2007  tsutsui Misc KNF and cosmetics.
 1.2.2.1 03-Aug-2007  tsutsui file ns16550.c was added on branch jmcneill-pm on 2007-08-03 13:15:57 +0000
 1.3.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.3.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.4.4.1 16-May-2008  yamt sync with head.
 1.4.2.1 18-May-2008  yamt sync with head.
 1.6 14-May-2008  tsutsui Normalize my licenses.
 1.5 29-Apr-2008  tsutsui branches: 1.5.2;
- reorganize com console code
- remove unused functions
 1.4 23-Mar-2008  tsutsui branches: 1.4.2; 1.4.4;
Use macro defined in <machine/cpu.h> for cobalt_id and device addresses etc.
since <machine/leds.h> has been removed.
Also remove redundant address definitions in Makefile and local headers.
Pointed out by dieter roelants.
 1.3 17-Oct-2007  garbled branches: 1.3.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.2 03-Aug-2007  tsutsui branches: 1.2.2; 1.2.4;
Misc KNF and cosmetics.
 1.1 25-Jun-2003  cdi branches: 1.1.18; 1.1.54; 1.1.60; 1.1.68; 1.1.70; 1.1.72; 1.1.74;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.74.1 15-Aug-2007  skrll Sync with HEAD.
 1.1.72.1 07-Aug-2007  matt Sync with HEAD.
 1.1.70.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.1.68.1 03-Oct-2007  garbled Sync with HEAD
 1.1.60.1 20-Aug-2007  ad Sync with HEAD.
 1.1.54.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.1.18.2 24-Mar-2008  yamt sync with head.
 1.1.18.1 03-Sep-2007  yamt sync with head.
 1.2.4.1 06-Nov-2007  matt sync with HEAD
 1.2.2.2 03-Aug-2007  tsutsui Misc KNF and cosmetics.
 1.2.2.1 03-Aug-2007  tsutsui file ns16550.h was added on branch jmcneill-pm on 2007-08-03 13:15:57 +0000
 1.3.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.3.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.4.4.1 16-May-2008  yamt sync with head.
 1.4.2.1 18-May-2008  yamt sync with head.
 1.5.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.2 14-May-2008  tsutsui Normalize my licenses.
 1.1 01-Mar-2008  tsutsui branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.10; 1.1.12; 1.1.14;
Split out a PCI configuration space read function into a separate file
so that we could use it in other sources.
 1.1.14.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.1.12.1 16-May-2008  yamt sync with head.
 1.1.10.1 18-May-2008  yamt sync with head.
 1.1.8.3 02-Jun-2008  mjf Sync with HEAD.
 1.1.8.2 03-Apr-2008  mjf Sync with HEAD.
 1.1.8.1 01-Mar-2008  mjf file pci.c was added on branch mjf-devfs2 on 2008-04-03 12:42:13 +0000
 1.1.6.2 24-Mar-2008  keiichi sync with head.
 1.1.6.1 01-Mar-2008  keiichi file pci.c was added on branch keiichi-mipv6 on 2008-03-24 07:14:55 +0000
 1.1.4.2 23-Mar-2008  matt sync with HEAD
 1.1.4.1 01-Mar-2008  matt file pci.c was added on branch matt-armv6 on 2008-03-23 02:03:57 +0000
 1.1.2.2 17-Mar-2008  yamt sync with head.
 1.1.2.1 01-Mar-2008  yamt file pci.c was added on branch yamt-lazymbuf on 2008-03-17 09:14:16 +0000
 1.9 11-Jul-2015  kamil Improve spelling: regsiter -> register

This change is non-functional.

Approved by <riastradh>, <pgoyette>
 1.8 28-Apr-2008  martin branches: 1.8.44; 1.8.64;
Remove clause 3 and 4 from TNF licenses
 1.7 17-Oct-2007  garbled branches: 1.7.16; 1.7.18; 1.7.20;
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 03-Aug-2007  tsutsui branches: 1.6.2; 1.6.4;
Misc KNF and cosmetics.
 1.5 11-Dec-2005  christos branches: 1.5.24; 1.5.30; 1.5.38; 1.5.40; 1.5.42; 1.5.44;
merge ktrace-lwp.
 1.4 01-Sep-2004  tsutsui branches: 1.4.12;
- Adapt to the MI wdc driver changes which added the notion of
"shadow registers":
http://mail-index.netbsd.org/source-changes/2004/05/25/0048.html
- While here, also fix accesses to CTL regsters to use the correct address.

Now the cobalt bootloader works again.

XXX Maybe we should make this SA wdc driver MI...
 1.3 03-Jan-2004  thorpej Rename "struct channel_softc" to "struct wdc_channel".
 1.2 14-Dec-2003  tsutsui Change unit and part variables for wd from u_int8_t to u_int.
 1.1 25-Jun-2003  cdi branches: 1.1.2;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Sep-2004  skrll Sync with HEAD
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.12.1 03-Sep-2007  yamt sync with head.
 1.5.44.1 15-Aug-2007  skrll Sync with HEAD.
 1.5.42.1 07-Aug-2007  matt Sync with HEAD.
 1.5.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.5.38.1 03-Oct-2007  garbled Sync with HEAD
 1.5.30.1 20-Aug-2007  ad Sync with HEAD.
 1.5.24.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.6.4.1 06-Nov-2007  matt sync with HEAD
 1.6.2.2 03-Aug-2007  tsutsui Misc KNF and cosmetics.
 1.6.2.1 03-Aug-2007  tsutsui file pciide.c was added on branch jmcneill-pm on 2007-08-03 13:15:57 +0000
 1.7.20.1 16-May-2008  yamt sync with head.
 1.7.18.1 18-May-2008  yamt sync with head.
 1.7.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.64.1 22-Sep-2015  skrll Sync with HEAD
 1.8.44.1 03-Dec-2017  jdolecek update from HEAD
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 02-Mar-2008  tsutsui branches: 1.4.2; 1.4.4;
WARNSfy
 1.3 17-Oct-2007  garbled branches: 1.3.12; 1.3.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.2 03-Aug-2007  tsutsui branches: 1.2.2; 1.2.4;
Misc KNF and cosmetics.
 1.1 25-Jun-2003  cdi branches: 1.1.18; 1.1.54; 1.1.60; 1.1.68; 1.1.70; 1.1.72; 1.1.74;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.74.1 15-Aug-2007  skrll Sync with HEAD.
 1.1.72.1 07-Aug-2007  matt Sync with HEAD.
 1.1.70.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.1.68.1 03-Oct-2007  garbled Sync with HEAD
 1.1.60.1 20-Aug-2007  ad Sync with HEAD.
 1.1.54.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.1.18.2 17-Mar-2008  yamt sync with head.
 1.1.18.1 03-Sep-2007  yamt sync with head.
 1.2.4.2 23-Mar-2008  matt sync with HEAD
 1.2.4.1 06-Nov-2007  matt sync with HEAD
 1.2.2.2 03-Aug-2007  tsutsui Misc KNF and cosmetics.
 1.2.2.1 03-Aug-2007  tsutsui file prf.c was added on branch jmcneill-pm on 2007-08-03 13:15:58 +0000
 1.3.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.3.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.3.12.1 24-Mar-2008  keiichi sync with head.
 1.4.4.1 16-May-2008  yamt sync with head.
 1.4.2.1 18-May-2008  yamt sync with head.
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 30-Oct-2007  tsutsui branches: 1.6.16; 1.6.18; 1.6.20;
Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.
 1.5 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.4 25-Jul-2007  tsutsui branches: 1.4.4; 1.4.6; 1.4.10;
Flush all cache data at the beginning of the bootloader.

Fixes silent hangs after loading 4.0_BETA2 GENERIC kernel
on Qube2 (and RaQ2) with 256MB RAM, reported and tested
by James Hartley on port-cobalt.

Obviously this should be pulled up to netbsd-4.
 1.3 11-Dec-2005  christos branches: 1.3.24; 1.3.30; 1.3.38; 1.3.40; 1.3.42; 1.3.44;
merge ktrace-lwp.
 1.2 07-Jan-2004  cdi branches: 1.2.16;
Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.
 1.1 25-Jun-2003  cdi branches: 1.1.2;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.2.16.2 15-Nov-2007  yamt sync with head.
 1.2.16.1 03-Sep-2007  yamt sync with head.
 1.3.44.1 15-Aug-2007  skrll Sync with HEAD.
 1.3.42.1 07-Aug-2007  matt Sync with HEAD.
 1.3.40.2 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.3.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.3.38.1 03-Oct-2007  garbled Sync with HEAD
 1.3.30.2 03-Dec-2007  ad Sync with HEAD.
 1.3.30.1 20-Aug-2007  ad Sync with HEAD.
 1.3.24.2 04-Nov-2007  pavel Pull up following revisions (requested by tsutsui in ticket #974):
sys/arch/cobalt/cobalt/autoconf.c: revision 1.25-1.26
sys/arch/cobalt/cobalt/machdep.c: revision 1.89
sys/arch/cobalt/stand/boot/Makefile: revision 1.12
sys/arch/cobalt/stand/boot/boot.c: revision 1.10
sys/arch/cobalt/stand/boot/boot.h: revision 1.6
sys/arch/cobalt/stand/boot/cache.c: revision 1.1-1.2
sys/arch/cobalt/stand/boot/clock.c: revision 1.2
sys/arch/cobalt/stand/boot/conf.c: revision 1.5
sys/arch/cobalt/stand/boot/devopen.c: revision 1.4
sys/arch/cobalt/stand/boot/nif_tlp.c: revision 1.1
sys/arch/cobalt/stand/boot/start.S: revision 1.6
sys/arch/cobalt/stand/boot/tlp.c: revision 1.1-1.3
sys/arch/cobalt/stand/boot/version: revision 1.6
sys/lib/libsa/dev_net.h: revision 1.5
Add an extern decl of try_bootp variable here since MD sources could set it.

In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit

Assume netboot if "nfsroot=/path" is specified in bootstring.

Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().

Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.

Fix my stupid bug in cache flush code and remove one kludge for it.

- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.3.24.1 26-Jul-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #793):
sys/arch/cobalt/stand/boot/start.S: revision 1.4
sys/arch/cobalt/stand/boot/version: revision 1.2
Flush all cache data at the beginning of the bootloader.
Fixes silent hangs after loading 4.0_BETA2 GENERIC kernel
on Qube2 (and RaQ2) with 256MB RAM, reported and tested
by James Hartley on port-cobalt.
Obviously this should be pulled up to netbsd-4.
 1.4.10.1 13-Nov-2007  bouyer Sync with HEAD
 1.4.6.1 06-Nov-2007  matt sync with HEAD
 1.4.4.1 31-Oct-2007  joerg Sync with HEAD.
 1.6.20.1 16-May-2008  yamt sync with head.
 1.6.18.1 18-May-2008  yamt sync with head.
 1.6.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.5 29-Apr-2022  rin Fix fallout from libsa change; stand.h includes <sys/param.h> now.

SCANWAIT and PWAIT are renamed to SCANDELAY and SCANWAIT, respectively,
in order not to redefine PWAIT.

XXX
Too many copies for tgets.c...
 1.4 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.3 03-Aug-2007  tsutsui branches: 1.3.2; 1.3.4;
Misc KNF and cosmetics.
 1.2 11-Dec-2005  christos branches: 1.2.24; 1.2.30; 1.2.38; 1.2.40; 1.2.42; 1.2.44;
merge ktrace-lwp.
 1.1 10-Apr-2004  tsutsui branches: 1.1.2; 1.1.14; 1.1.16;
Add a prompt to specify a kernel filename to be loaded on bootloader.
 1.1.16.1 03-Sep-2007  yamt sync with head.
 1.1.14.1 13-Apr-2005  tron Pull up revision 1.1 (requested by tsutsui in ticket #1070):
Add a prompt to specify a kernel filename to be loaded on bootloader.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 10-Apr-2004  skrll file tgets.c was added on branch ktrace-lwp on 2004-08-03 10:33:46 +0000
 1.2.44.1 15-Aug-2007  skrll Sync with HEAD.
 1.2.42.1 07-Aug-2007  matt Sync with HEAD.
 1.2.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.2.38.1 03-Oct-2007  garbled Sync with HEAD
 1.2.30.1 20-Aug-2007  ad Sync with HEAD.
 1.2.24.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.3.4.1 06-Nov-2007  matt sync with HEAD
 1.3.2.2 03-Aug-2007  tsutsui Misc KNF and cosmetics.
 1.3.2.1 03-Aug-2007  tsutsui file tgets.c was added on branch jmcneill-pm on 2007-08-03 13:15:58 +0000
 1.10 24-Jul-2021  andvar Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.9 19-Jan-2010  tsutsui branches: 1.9.80;
Use -DLIBSA_PRINTF_LONGLONG_SUPPORT -DLIBSA_PRINTF_WIDTH_SUPPORT
in debug printf()s.
 1.8 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.7 23-Mar-2008  tsutsui branches: 1.7.2; 1.7.4;
Use macro defined in <machine/cpu.h> for cobalt_id and device addresses etc.
since <machine/leds.h> has been removed.
Also remove redundant address definitions in Makefile and local headers.
Pointed out by dieter roelants.
 1.6 16-Mar-2008  tsutsui Add more wait after sending a setup packet since
21041 on Qube 2700 seems to require more setup time.
 1.5 01-Mar-2008  tsutsui Misc fixes to support 21041 on Qube2700:
- prepare two TX descriptors to avoid race and also use chaind mode
- use a recently added pcicfgread() function to get tulip I/O address
- use cobalt model id to see if we have 21041 or 21143
(XXX maybe it's better to see PCI product ID)
- add code to reset SIA on 21041
- prepare and send filter setup packet on init
- reduce delay in RX polling
- bump version again

Now netboot works fine on Qube 2700 (even without console). Yay.
 1.4 01-Mar-2008  tsutsui Rename some variables to sync with original sandpoint's one.
 1.3 31-Oct-2007  tsutsui branches: 1.3.2; 1.3.4; 1.3.8; 1.3.10; 1.3.12; 1.3.14; 1.3.24; 1.3.26; 1.3.30;
- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.2 30-Oct-2007  tsutsui Fix my stupid bug in cache flush code and remove one kludge for it.
 1.1 30-Oct-2007  tsutsui Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.
 1.3.30.2 02-Jun-2008  mjf Sync with HEAD.
 1.3.30.1 03-Apr-2008  mjf Sync with HEAD.
 1.3.26.1 24-Mar-2008  keiichi sync with head.
 1.3.24.2 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.3.24.1 31-Oct-2007  wrstuden file tlp.c was added on branch wrstuden-fixsa on 2008-01-06 05:00:54 +0000
 1.3.14.2 03-Dec-2007  ad Sync with HEAD.
 1.3.14.1 31-Oct-2007  ad file tlp.c was added on branch vmlocking on 2007-12-03 19:03:11 +0000
 1.3.12.4 24-Mar-2008  yamt sync with head.
 1.3.12.3 17-Mar-2008  yamt sync with head.
 1.3.12.2 15-Nov-2007  yamt sync with head.
 1.3.12.1 31-Oct-2007  yamt file tlp.c was added on branch yamt-lazymbuf on 2007-11-15 11:42:41 +0000
 1.3.10.2 13-Nov-2007  bouyer Sync with HEAD
 1.3.10.1 31-Oct-2007  bouyer file tlp.c was added on branch bouyer-xenamd64 on 2007-11-13 15:58:21 +0000
 1.3.8.3 23-Mar-2008  matt sync with HEAD
 1.3.8.2 06-Nov-2007  matt sync with HEAD
 1.3.8.1 31-Oct-2007  matt file tlp.c was added on branch matt-armv6 on 2007-11-06 23:15:49 +0000
 1.3.4.2 04-Nov-2007  pavel Pull up following revisions (requested by tsutsui in ticket #974):
sys/arch/cobalt/cobalt/autoconf.c: revision 1.25-1.26
sys/arch/cobalt/cobalt/machdep.c: revision 1.89
sys/arch/cobalt/stand/boot/Makefile: revision 1.12
sys/arch/cobalt/stand/boot/boot.c: revision 1.10
sys/arch/cobalt/stand/boot/boot.h: revision 1.6
sys/arch/cobalt/stand/boot/cache.c: revision 1.1-1.2
sys/arch/cobalt/stand/boot/clock.c: revision 1.2
sys/arch/cobalt/stand/boot/conf.c: revision 1.5
sys/arch/cobalt/stand/boot/devopen.c: revision 1.4
sys/arch/cobalt/stand/boot/nif_tlp.c: revision 1.1
sys/arch/cobalt/stand/boot/start.S: revision 1.6
sys/arch/cobalt/stand/boot/tlp.c: revision 1.1-1.3
sys/arch/cobalt/stand/boot/version: revision 1.6
sys/lib/libsa/dev_net.h: revision 1.5
Add an extern decl of try_bootp variable here since MD sources could set it.

In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit

Assume netboot if "nfsroot=/path" is specified in bootstring.

Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().

Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.

Fix my stupid bug in cache flush code and remove one kludge for it.

- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.3.4.1 31-Oct-2007  pavel file tlp.c was added on branch netbsd-4 on 2007-11-04 16:30:55 +0000
 1.3.2.2 31-Oct-2007  joerg Sync with HEAD.
 1.3.2.1 31-Oct-2007  joerg file tlp.c was added on branch jmcneill-pm on 2007-10-31 23:13:58 +0000
 1.7.4.2 11-Mar-2010  yamt sync with head
 1.7.4.1 16-May-2008  yamt sync with head.
 1.7.2.1 18-May-2008  yamt sync with head.
 1.9.80.1 01-Aug-2021  thorpej Sync with HEAD.
 1.11 10-Jan-2010  tsutsui Add support for LBA48 read command to standalone wdc/wd driver.
Thanks to bouyer@ for comments about LBA48 boundary checks.

Tested on:
> Cobalt Qube 2700
> wd0 at atabus0 drive 0: <Hitachi HDS721616PLA380>
> wd0: 153 GB, 319120 cyl, 16 head, 63 sec, 512 bytes/sect x 321672960 sectors
via SATA-IDE converter, and NetBSD partition allocated at:
> 1: NetBSD (sysid 169)
> start 293603940, size 28069020 (13706 MB, Cyls 18276-20023/54/63)

Also bump version.
 1.10 28-May-2008  tsutsui Print boot banner and a loading kernel name onto LCD,
for users who don't have serial console. Bump version.
 1.9 16-Mar-2008  tsutsui branches: 1.9.2; 1.9.4; 1.9.6;
Add support for optional Z85C30 serial console on Cobalt Qube 2700.
Bump version.
 1.8 01-Mar-2008  tsutsui Misc fixes to support 21041 on Qube2700:
- prepare two TX descriptors to avoid race and also use chaind mode
- use a recently added pcicfgread() function to get tulip I/O address
- use cobalt model id to see if we have 21041 or 21143
(XXX maybe it's better to see PCI product ID)
- add code to reset SIA on 21041
- prepare and send filter setup packet on init
- reduce delay in RX polling
- bump version again

Now netboot works fine on Qube 2700 (even without console). Yay.
 1.7 01-Mar-2008  tsutsui - print cobalt model names in boot banner
- bump version.
 1.6 30-Oct-2007  tsutsui branches: 1.6.12; 1.6.16;
Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.
 1.5 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.4 13-Aug-2007  tsutsui branches: 1.4.2; 1.4.6;
Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.3 10-Aug-2007  tsutsui Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.
 1.2 25-Jul-2007  tsutsui branches: 1.2.4;
Flush all cache data at the beginning of the bootloader.

Fixes silent hangs after loading 4.0_BETA2 GENERIC kernel
on Qube2 (and RaQ2) with 256MB RAM, reported and tested
by James Hartley on port-cobalt.

Obviously this should be pulled up to netbsd-4.
 1.1 25-Jun-2003  cdi branches: 1.1.18; 1.1.54; 1.1.60; 1.1.68; 1.1.70; 1.1.72; 1.1.74;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.74.1 15-Aug-2007  skrll Sync with HEAD.
 1.1.72.1 07-Aug-2007  matt Sync with HEAD.
 1.1.70.2 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.1.70.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.1.68.1 03-Oct-2007  garbled Sync with HEAD
 1.1.60.3 03-Dec-2007  ad Sync with HEAD.
 1.1.60.2 03-Dec-2007  ad Sync with HEAD.
 1.1.60.1 20-Aug-2007  ad Sync with HEAD.
 1.1.54.3 04-Nov-2007  pavel Pull up following revisions (requested by tsutsui in ticket #974):
sys/arch/cobalt/cobalt/autoconf.c: revision 1.25-1.26
sys/arch/cobalt/cobalt/machdep.c: revision 1.89
sys/arch/cobalt/stand/boot/Makefile: revision 1.12
sys/arch/cobalt/stand/boot/boot.c: revision 1.10
sys/arch/cobalt/stand/boot/boot.h: revision 1.6
sys/arch/cobalt/stand/boot/cache.c: revision 1.1-1.2
sys/arch/cobalt/stand/boot/clock.c: revision 1.2
sys/arch/cobalt/stand/boot/conf.c: revision 1.5
sys/arch/cobalt/stand/boot/devopen.c: revision 1.4
sys/arch/cobalt/stand/boot/nif_tlp.c: revision 1.1
sys/arch/cobalt/stand/boot/start.S: revision 1.6
sys/arch/cobalt/stand/boot/tlp.c: revision 1.1-1.3
sys/arch/cobalt/stand/boot/version: revision 1.6
sys/lib/libsa/dev_net.h: revision 1.5
Add an extern decl of try_bootp variable here since MD sources could set it.

In device_register(), check booted devices more properly:
- check "tlp" name on netboot
- use ata channel and drive numbers to check wd unit

Assume netboot if "nfsroot=/path" is specified in bootstring.

Use PCI bus/dev/function numbers rather than device unit
to check first tlp in device_register().

Add support for netboot via tlp0 with standalone tlp(4) driver
taken from arch/sandpoint/stand/netboot.
There are still some kludge but it just works on RaQ and RaQ2.

Fix my stupid bug in cache flush code and remove one kludge for it.

- use chaned mode for RX descs and allocate only one desc per each cacheline
to avoid possible race condition between CPU writeback vs DMA write
- remove unnecessary FS and LS bits from RxD->xd0
(sys/dev/ic/tulipvar.h sets them but maybe they are ignored?)
 1.1.54.2 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.1.54.1 26-Jul-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #793):
sys/arch/cobalt/stand/boot/start.S: revision 1.4
sys/arch/cobalt/stand/boot/version: revision 1.2
Flush all cache data at the beginning of the bootloader.
Fixes silent hangs after loading 4.0_BETA2 GENERIC kernel
on Qube2 (and RaQ2) with 256MB RAM, reported and tested
by James Hartley on port-cobalt.
Obviously this should be pulled up to netbsd-4.
 1.1.18.3 17-Mar-2008  yamt sync with head.
 1.1.18.2 15-Nov-2007  yamt sync with head.
 1.1.18.1 03-Sep-2007  yamt sync with head.
 1.2.4.2 31-Oct-2007  joerg Sync with HEAD.
 1.2.4.1 16-Aug-2007  jmcneill Sync with HEAD.
 1.4.6.1 13-Nov-2007  bouyer Sync with HEAD
 1.4.2.2 23-Mar-2008  matt sync with HEAD
 1.4.2.1 06-Nov-2007  matt sync with HEAD
 1.6.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.6.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.6.12.1 24-Mar-2008  keiichi sync with head.
 1.9.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.9.4.2 11-Mar-2010  yamt sync with head
 1.9.4.1 04-May-2009  yamt sync with head.
 1.9.2.1 04-Jun-2008  yamt sync with head
 1.18 08-Jan-2019  jdolecek no need to include <machine/param.h> if <sys/param.h> already included
 1.17 02-Jan-2015  christos branches: 1.17.16; 1.17.18;
We have three sets of DTYPE_ constants in the kernel:
altq Drop Type
disklabel Disk Type
file Descriptor Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.
 1.16 03-Apr-2014  joerg branches: 1.16.6;
Avoid type pruning.
 1.15 17-Jul-2011  joerg branches: 1.15.2; 1.15.12; 1.15.16;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.14 07-Jul-2011  mrg avoid pointer aliasing issues
 1.13 11-Jul-2010  he Include <sys/param.h> for howmany() definition.
OK'ed by tsutsui@.
 1.12 19-Jan-2010  tsutsui branches: 1.12.2; 1.12.4;
Use -DLIBSA_PRINTF_LONGLONG_SUPPORT -DLIBSA_PRINTF_WIDTH_SUPPORT
in debug printf()s.
 1.11 10-Jan-2010  tsutsui Add support for LBA48 read command to standalone wdc/wd driver.
Thanks to bouyer@ for comments about LBA48 boundary checks.

Tested on:
> Cobalt Qube 2700
> wd0 at atabus0 drive 0: <Hitachi HDS721616PLA380>
> wd0: 153 GB, 319120 cyl, 16 head, 63 sec, 512 bytes/sect x 321672960 sectors
via SATA-IDE converter, and NetBSD partition allocated at:
> 1: NetBSD (sysid 169)
> start 293603940, size 28069020 (13706 MB, Cyls 18276-20023/54/63)

Also bump version.
 1.10 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.9 02-Mar-2008  tsutsui branches: 1.9.2; 1.9.4;
WARNSfy
 1.8 17-Oct-2007  garbled branches: 1.8.12; 1.8.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.7 03-Aug-2007  tsutsui branches: 1.7.2; 1.7.4;
Misc KNF and cosmetics.
 1.6 03-Aug-2007  tsutsui Add support for booting off raidframe RAID1 mirrors.

Should close PR port-cobalt/36639, but with a different way
(which is similar with pmax) from a patch in the PR.
 1.5 11-Dec-2005  christos branches: 1.5.24; 1.5.30; 1.5.38; 1.5.40; 1.5.42; 1.5.44;
merge ktrace-lwp.
 1.4 14-Dec-2003  tsutsui branches: 1.4.16;
Change unit and part variables for wd from u_int8_t to u_int.
 1.3 13-Dec-2003  he Adapt to rename of WDC_CAP_LBA48 to ATA_CMD2_LBA48 in atareg.h,
and don't use types which will be promoted when passed as ...,
causing a warning.
 1.2 08-Oct-2003  lukem Overhaul MBR handling (part 1):

<sys/bootblock.h>:
* Added definitions for the Master Boot Record (MBR) used by
a variety of systems (primarily i386), including the format
of the BIOS Parameter Block (BPB).
This information was cribbed from a variety of sources
including <sys/disklabel_mbr.h> which this is a superset of.

As part of this, some data structure elements and #defines
were renamed to be more "namespace friendly" and consistent
with other bootblocks and MBR documentation.
Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
* Deprecated in favor of <sys/bootblock.h> (the latter is more
"host tool" friendly).

amd64 & i386:
* Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
be consistent with the naming convention of the msdosfs tools.

* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
and it's confusing to have two functionally equivalent bootblocks,
especially given that "ufs" has multiple meanings (it could be
a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

* Rework pbr.S (the first sector of bootxx_*):
+ Ensure that BPB (bytes 11..89) and the partition table
(bytes 446..509) do not contain code.
+ Add support for booting from FAT partitions if BOOT_FROM_FAT
is defined. (Only set for bootxx_msdos).
+ Remove "dummy" partition 3; if people want to installboot(8)
these to the start of the disk they can use fdisk(8) to
create a real MBR partition table...
+ Compile with TERSE_ERROR so it fits because of the above.
Whilst this is less user friendly, I feel it's important
to have a valid partition table and BPB in the MBR/PBR.

* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
with other platforms.

* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
we can boot off FAT partitions.

* Crank version of /usr/mdec/boot to 3.1, and fix some of the other
entries in the version file.

installboot(8) (i386):
* Read the existing MBR of the filesystem and retain the BIOS
Parameter Block (BPB) in bytes 11..89 and the MBR partition
table in bytes 446..509. (Previously installboot(8) would
trash those two sections of the MBR.)

mbrlabel(8):
* Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
 1.1 25-Jun-2003  cdi branches: 1.1.2;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.2 17-Mar-2008  yamt sync with head.
 1.4.16.1 03-Sep-2007  yamt sync with head.
 1.5.44.1 15-Aug-2007  skrll Sync with HEAD.
 1.5.42.1 07-Aug-2007  matt Sync with HEAD.
 1.5.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.5.38.1 03-Oct-2007  garbled Sync with HEAD
 1.5.30.1 20-Aug-2007  ad Sync with HEAD.
 1.5.24.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.7.4.2 23-Mar-2008  matt sync with HEAD
 1.7.4.1 06-Nov-2007  matt sync with HEAD
 1.7.2.2 03-Aug-2007  tsutsui Misc KNF and cosmetics.
 1.7.2.1 03-Aug-2007  tsutsui file wd.c was added on branch jmcneill-pm on 2007-08-03 13:15:58 +0000
 1.8.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.8.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.8.12.1 24-Mar-2008  keiichi sync with head.
 1.9.4.3 11-Aug-2010  yamt sync with head.
 1.9.4.2 11-Mar-2010  yamt sync with head
 1.9.4.1 16-May-2008  yamt sync with head.
 1.9.2.1 18-May-2008  yamt sync with head.
 1.12.4.1 05-Mar-2011  rmind sync with head
 1.12.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.15.16.1 18-May-2014  rmind sync with head
 1.15.12.2 03-Dec-2017  jdolecek update from HEAD
 1.15.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.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.16.6.1 06-Apr-2015  skrll Sync with HEAD
 1.17.18.1 10-Jun-2019  christos Sync with HEAD
 1.17.16.1 18-Jan-2019  pgoyette Synch with HEAD
 1.16 08-Jan-2019  christos no need for <machine/param.h>
 1.15 08-Jan-2019  christos Someone should merge all the wdc copies.
Include <sys/param.h> for DEV_BSIZE/DEV_BSHIFT
 1.14 03-Apr-2014  joerg branches: 1.14.28; 1.14.30;
GC found.
 1.13 19-Jan-2010  tsutsui branches: 1.13.12; 1.13.22; 1.13.26;
Use -DLIBSA_PRINTF_LONGLONG_SUPPORT -DLIBSA_PRINTF_WIDTH_SUPPORT
in debug printf()s.
 1.12 10-Jan-2010  tsutsui Add support for LBA48 read command to standalone wdc/wd driver.
Thanks to bouyer@ for comments about LBA48 boundary checks.

Tested on:
> Cobalt Qube 2700
> wd0 at atabus0 drive 0: <Hitachi HDS721616PLA380>
> wd0: 153 GB, 319120 cyl, 16 head, 63 sec, 512 bytes/sect x 321672960 sectors
via SATA-IDE converter, and NetBSD partition allocated at:
> 1: NetBSD (sysid 169)
> start 293603940, size 28069020 (13706 MB, Cyls 18276-20023/54/63)

Also bump version.
 1.11 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.10 02-Mar-2008  tsutsui branches: 1.10.2; 1.10.4;
WARNSfy
 1.9 17-Oct-2007  garbled branches: 1.9.12; 1.9.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.8 03-Aug-2007  tsutsui branches: 1.8.2; 1.8.4;
Misc KNF and cosmetics.
 1.7 11-Dec-2005  christos branches: 1.7.24; 1.7.30; 1.7.38; 1.7.40; 1.7.42; 1.7.44;
merge ktrace-lwp.
 1.6 01-Sep-2004  tsutsui branches: 1.6.12;
- Adapt to the MI wdc driver changes which added the notion of
"shadow registers":
http://mail-index.netbsd.org/source-changes/2004/05/25/0048.html
- While here, also fix accesses to CTL regsters to use the correct address.

Now the cobalt bootloader works again.

XXX Maybe we should make this SA wdc driver MI...
 1.5 03-Jan-2004  thorpej Rename "struct channel_softc" to "struct wdc_channel".
 1.4 14-Dec-2003  tsutsui Change unit and part variables for wd from u_int8_t to u_int.
 1.3 10-Nov-2003  wiz Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.2 08-Oct-2003  lukem Overhaul MBR handling (part 1):

<sys/bootblock.h>:
* Added definitions for the Master Boot Record (MBR) used by
a variety of systems (primarily i386), including the format
of the BIOS Parameter Block (BPB).
This information was cribbed from a variety of sources
including <sys/disklabel_mbr.h> which this is a superset of.

As part of this, some data structure elements and #defines
were renamed to be more "namespace friendly" and consistent
with other bootblocks and MBR documentation.
Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
* Deprecated in favor of <sys/bootblock.h> (the latter is more
"host tool" friendly).

amd64 & i386:
* Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
be consistent with the naming convention of the msdosfs tools.

* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
and it's confusing to have two functionally equivalent bootblocks,
especially given that "ufs" has multiple meanings (it could be
a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

* Rework pbr.S (the first sector of bootxx_*):
+ Ensure that BPB (bytes 11..89) and the partition table
(bytes 446..509) do not contain code.
+ Add support for booting from FAT partitions if BOOT_FROM_FAT
is defined. (Only set for bootxx_msdos).
+ Remove "dummy" partition 3; if people want to installboot(8)
these to the start of the disk they can use fdisk(8) to
create a real MBR partition table...
+ Compile with TERSE_ERROR so it fits because of the above.
Whilst this is less user friendly, I feel it's important
to have a valid partition table and BPB in the MBR/PBR.

* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
with other platforms.

* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
we can boot off FAT partitions.

* Crank version of /usr/mdec/boot to 3.1, and fix some of the other
entries in the version file.

installboot(8) (i386):
* Read the existing MBR of the filesystem and retain the BIOS
Parameter Block (BPB) in bytes 11..89 and the MBR partition
table in bytes 446..509. (Previously installboot(8) would
trash those two sections of the MBR.)

mbrlabel(8):
* Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
 1.1 25-Jun-2003  cdi branches: 1.1.2;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Sep-2004  skrll Sync with HEAD
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.12.2 17-Mar-2008  yamt sync with head.
 1.6.12.1 03-Sep-2007  yamt sync with head.
 1.7.44.1 15-Aug-2007  skrll Sync with HEAD.
 1.7.42.1 07-Aug-2007  matt Sync with HEAD.
 1.7.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.7.38.1 03-Oct-2007  garbled Sync with HEAD
 1.7.30.1 20-Aug-2007  ad Sync with HEAD.
 1.7.24.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.8.4.2 23-Mar-2008  matt sync with HEAD
 1.8.4.1 06-Nov-2007  matt sync with HEAD
 1.8.2.2 03-Aug-2007  tsutsui Misc KNF and cosmetics.
 1.8.2.1 03-Aug-2007  tsutsui file wdc.c was added on branch jmcneill-pm on 2007-08-03 13:15:58 +0000
 1.9.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.9.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.9.12.1 24-Mar-2008  keiichi sync with head.
 1.10.4.2 11-Mar-2010  yamt sync with head
 1.10.4.1 16-May-2008  yamt sync with head.
 1.10.2.1 18-May-2008  yamt sync with head.
 1.13.26.1 18-May-2014  rmind sync with head
 1.13.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.12.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.14.30.1 10-Jun-2019  christos Sync with HEAD
 1.14.28.1 18-Jan-2019  pgoyette Synch with HEAD
 1.9 10-Jan-2010  tsutsui Add support for LBA48 read command to standalone wdc/wd driver.
Thanks to bouyer@ for comments about LBA48 boundary checks.

Tested on:
> Cobalt Qube 2700
> wd0 at atabus0 drive 0: <Hitachi HDS721616PLA380>
> wd0: 153 GB, 319120 cyl, 16 head, 63 sec, 512 bytes/sect x 321672960 sectors
via SATA-IDE converter, and NetBSD partition allocated at:
> 1: NetBSD (sysid 169)
> start 293603940, size 28069020 (13706 MB, Cyls 18276-20023/54/63)

Also bump version.
 1.8 17-Oct-2007  garbled branches: 1.8.20;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.7 03-Aug-2007  tsutsui branches: 1.7.2; 1.7.4;
Misc KNF and cosmetics.
 1.6 11-Dec-2005  christos branches: 1.6.24; 1.6.30; 1.6.38; 1.6.40; 1.6.42; 1.6.44;
merge ktrace-lwp.
 1.5 01-Sep-2004  tsutsui branches: 1.5.12;
- Adapt to the MI wdc driver changes which added the notion of
"shadow registers":
http://mail-index.netbsd.org/source-changes/2004/05/25/0048.html
- While here, also fix accesses to CTL regsters to use the correct address.

Now the cobalt bootloader works again.

XXX Maybe we should make this SA wdc driver MI...
 1.4 03-Jan-2004  thorpej Rename "struct channel_softc" to "struct wdc_channel".
 1.3 14-Dec-2003  tsutsui Change unit and part variables for wd from u_int8_t to u_int.
 1.2 08-Oct-2003  lukem Overhaul MBR handling (part 1):

<sys/bootblock.h>:
* Added definitions for the Master Boot Record (MBR) used by
a variety of systems (primarily i386), including the format
of the BIOS Parameter Block (BPB).
This information was cribbed from a variety of sources
including <sys/disklabel_mbr.h> which this is a superset of.

As part of this, some data structure elements and #defines
were renamed to be more "namespace friendly" and consistent
with other bootblocks and MBR documentation.
Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
* Deprecated in favor of <sys/bootblock.h> (the latter is more
"host tool" friendly).

amd64 & i386:
* Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
be consistent with the naming convention of the msdosfs tools.

* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
and it's confusing to have two functionally equivalent bootblocks,
especially given that "ufs" has multiple meanings (it could be
a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

* Rework pbr.S (the first sector of bootxx_*):
+ Ensure that BPB (bytes 11..89) and the partition table
(bytes 446..509) do not contain code.
+ Add support for booting from FAT partitions if BOOT_FROM_FAT
is defined. (Only set for bootxx_msdos).
+ Remove "dummy" partition 3; if people want to installboot(8)
these to the start of the disk they can use fdisk(8) to
create a real MBR partition table...
+ Compile with TERSE_ERROR so it fits because of the above.
Whilst this is less user friendly, I feel it's important
to have a valid partition table and BPB in the MBR/PBR.

* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
with other platforms.

* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
we can boot off FAT partitions.

* Crank version of /usr/mdec/boot to 3.1, and fix some of the other
entries in the version file.

installboot(8) (i386):
* Read the existing MBR of the filesystem and retain the BIOS
Parameter Block (BPB) in bytes 11..89 and the MBR partition
table in bytes 446..509. (Previously installboot(8) would
trash those two sections of the MBR.)

mbrlabel(8):
* Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
 1.1 25-Jun-2003  cdi branches: 1.1.2;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Sep-2004  skrll Sync with HEAD
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.5.12.1 03-Sep-2007  yamt sync with head.
 1.6.44.1 15-Aug-2007  skrll Sync with HEAD.
 1.6.42.1 07-Aug-2007  matt Sync with HEAD.
 1.6.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.6.38.1 03-Oct-2007  garbled Sync with HEAD
 1.6.30.1 20-Aug-2007  ad Sync with HEAD.
 1.6.24.1 28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.7.4.1 06-Nov-2007  matt sync with HEAD
 1.7.2.2 03-Aug-2007  tsutsui Misc KNF and cosmetics.
 1.7.2.1 03-Aug-2007  tsutsui file wdvar.h was added on branch jmcneill-pm on 2007-08-03 13:15:58 +0000
 1.8.20.1 11-Mar-2010  yamt sync with head
 1.4 03-May-2024  andvar s/inerttupts/interrupts/ in comments.
 1.3 14-May-2008  tsutsui Normalize my licenses.
 1.2 23-Mar-2008  tsutsui branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.10;
Use macro defined in <machine/cpu.h> for cobalt_id and device addresses etc.
since <machine/leds.h> has been removed.
Also remove redundant address definitions in Makefile and local headers.
Pointed out by dieter roelants.
 1.1 16-Mar-2008  tsutsui branches: 1.1.2; 1.1.4;
Add support for optional Z85C30 serial console on Cobalt Qube 2700.
Bump version.
 1.1.4.2 23-Mar-2008  matt sync with HEAD
 1.1.4.1 16-Mar-2008  matt file zs.c was added on branch matt-armv6 on 2008-03-23 02:03:57 +0000
 1.1.2.3 24-Mar-2008  yamt sync with head.
 1.1.2.2 17-Mar-2008  yamt sync with head.
 1.1.2.1 16-Mar-2008  yamt file zs.c was added on branch yamt-lazymbuf on 2008-03-17 09:14:16 +0000
 1.2.10.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.2.8.1 16-May-2008  yamt sync with head.
 1.2.6.1 18-May-2008  yamt sync with head.
 1.2.4.3 02-Jun-2008  mjf Sync with HEAD.
 1.2.4.2 03-Apr-2008  mjf Sync with HEAD.
 1.2.4.1 23-Mar-2008  mjf file zs.c was added on branch mjf-devfs2 on 2008-04-03 12:42:14 +0000
 1.2.2.2 24-Mar-2008  keiichi sync with head.
 1.2.2.1 23-Mar-2008  keiichi file zs.c was added on branch keiichi-mipv6 on 2008-03-24 07:14:55 +0000
 1.3 14-May-2008  tsutsui Normalize my licenses.
 1.2 23-Mar-2008  tsutsui branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.10;
Use macro defined in <machine/cpu.h> for cobalt_id and device addresses etc.
since <machine/leds.h> has been removed.
Also remove redundant address definitions in Makefile and local headers.
Pointed out by dieter roelants.
 1.1 16-Mar-2008  tsutsui branches: 1.1.2; 1.1.4;
Add support for optional Z85C30 serial console on Cobalt Qube 2700.
Bump version.
 1.1.4.2 23-Mar-2008  matt sync with HEAD
 1.1.4.1 16-Mar-2008  matt file zs.h was added on branch matt-armv6 on 2008-03-23 02:03:57 +0000
 1.1.2.3 24-Mar-2008  yamt sync with head.
 1.1.2.2 17-Mar-2008  yamt sync with head.
 1.1.2.1 16-Mar-2008  yamt file zs.h was added on branch yamt-lazymbuf on 2008-03-17 09:14:16 +0000
 1.2.10.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.2.8.1 16-May-2008  yamt sync with head.
 1.2.6.1 18-May-2008  yamt sync with head.
 1.2.4.3 02-Jun-2008  mjf Sync with HEAD.
 1.2.4.2 03-Apr-2008  mjf Sync with HEAD.
 1.2.4.1 23-Mar-2008  mjf file zs.h was added on branch mjf-devfs2 on 2008-04-03 12:42:14 +0000
 1.2.2.2 24-Mar-2008  keiichi sync with head.
 1.2.2.1 23-Mar-2008  keiichi file zs.h was added on branch keiichi-mipv6 on 2008-03-24 07:14:55 +0000
 1.2 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.1 20-Jun-2000  soren branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10; 1.1.14;
s/installboot/installkernel/, so it won't be confused with a real installboot.
 1.1.14.1 08-Jan-2002  nathanw Catch up to -current.
 1.1.10.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 20-Jun-2000  bouyer file Makefile was added on branch thorpej_scsipi on 2000-11-20 20:07:10 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 20-Jun-2000  minoura file Makefile was added on branch minoura-xpg4dl on 2000-06-22 16:59:51 +0000
 1.1.2.2 20-Jun-2000  soren s/installboot/installkernel/, so it won't be confused with a real installboot.
 1.1.2.1 20-Jun-2000  soren file Makefile was added on branch netbsd-1-5 on 2000-06-20 00:24:12 +0000
 1.1 20-Jun-2000  soren branches: 1.1.2; 1.1.4; 1.1.6; 1.1.24;
s/installboot/installkernel/, so it won't be confused with a real installboot.
 1.1.24.1 01-Sep-2002  lukem Apply patch provided by soren in ticket #750, as described below:

some recent changes have contributed to pushing the /cobalt 1.6 kernel
over the firmware size limit [yes, the port does need a boot loader].

For 1.6, removing the raid and siop drivers from GENERIC along with
gzip -4'ing kernels gives us the required headroom.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 20-Jun-2000  bouyer file installkernel.sh was added on branch thorpej_scsipi on 2000-11-20 20:07:10 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 20-Jun-2000  minoura file installkernel.sh was added on branch minoura-xpg4dl on 2000-06-22 16:59:52 +0000
 1.1.2.2 20-Jun-2000  soren s/installboot/installkernel/, so it won't be confused with a real installboot.
 1.1.2.1 20-Jun-2000  soren file installkernel.sh was added on branch netbsd-1-5 on 2000-06-20 00:24:12 +0000

RSS XML Feed