Home | History | Annotate | only in /src/sys/arch/sun3/sun3x
History log of /src/sys/arch/sun3/sun3x
RevisionDateAuthorComments
 1.33 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.32 07-Nov-2009  cegger branches: 1.32.12; 1.32.22; 1.32.26;
Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
 1.31 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.30 03-Oct-2006  tsutsui branches: 1.30.52; 1.30.54; 1.30.56;
- change find_prom_map() to take paddr_t and return vaddr_t rather than
bus_space_handle_t since bus space handle without bus space tag looks weird
- replace old sun3 obio_find_mapping() with new common find_prom_map()
- add bus_space_vaddr(), from hp300
 1.29 30-Sep-2006  tsutsui Unmap pmap region in bus_mapout() as well as sun3/sun3/bus_subr.c does.
 1.28 11-Dec-2005  christos branches: 1.28.20; 1.28.22;
merge ktrace-lwp.
 1.27 01-Apr-2005  yamt branches: 1.27.2;
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.26 22-Jan-2005  chs branches: 1.26.2;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.25 15-Jul-2003  lukem branches: 1.25.8;
__KERNEL_RCSID()
 1.24 01-Apr-2003  thorpej branches: 1.24.2;
Use PAGE_SIZE rather than NBPG.
 1.23 11-Sep-2001  chs branches: 1.23.4;
replace pmap_enter() with pmap_kenter_pa() where appropriate.
 1.22 10-Sep-2001  chris 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.21 05-Sep-2001  tsutsui branches: 1.21.2;
- vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.20 24-Apr-2001  thorpej branches: 1.20.2;
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.19 14-Jan-2001  thorpej branches: 1.19.2;
splimp() -> splvm()
 1.18 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.17 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.16 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.15 26-Mar-1999  mycroft branches: 1.15.8; 1.15.10; 1.15.14;
Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.14 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.13 09-Jun-1998  gwr First cut at UVM support. Compiles, but not tested yet.
 1.12 09-Jun-1998  gwr Fix a warning
 1.11 08-Feb-1998  gwr Factor *peek out of bus_subr.c and move it to autoconf.c
(to reduce duplication). Add bus_tmapin and bus_tmapout
for use in probe functions (gets a temporary mapping).
Add bus_mapout() to undo bus_mapin() if needed.
 1.10 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.9 16-Oct-1997  gwr branches: 1.9.4;
Add VME support
 1.8 10-Jun-1997  veego s/_trunc_page/m68k_trunc_page/
 1.7 30-May-1997  jeremy Undo changes which make pmap_xxxx_page() functions re-entrant; just block
all interrupts which might cause re-entrancy.

Allow virtual addresses which are not managed by the MI VM system to
participate in the PV system.

Remove a few frivoulous TLB cache flushes.
 1.6 28-May-1997  jeremy Coded to work with new lock system for tmp_vpages.
 1.5 25-Apr-1997  gwr Moved bus_scan() and bus_print() here from autoconf.c
because they are now different in sun3 vs sun3x.
 1.4 13-Mar-1997  gwr s/sun3x_/_/ in sun3x_(round|trunc)_(page|seg) macros
 1.3 24-Feb-1997  jeremy branches: 1.3.2;
Get rid of inclusion of pmap_pvt.h and use the standard pmap functions for
mapping.
 1.2 22-Feb-1997  gwr Suport size=4 in bus_peek(), and clean out some junk.
 1.1 18-Feb-1997  gwr Move bus_peek(), bus_mapin() here from autoconf.c so the latter
may be shared with the sun3 port.
 1.3.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.9.4.1 27-Jan-1998  gwr Support the new vme bus autoconfig design, etc.
 1.15.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.15.10.1 15-Nov-1999  fvdl Sync with -current
 1.15.8.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.15.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.19.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.20.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.21.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.23.4.2 11-Sep-2001  chs replace pmap_enter() with pmap_kenter_pa() where appropriate.
 1.23.4.1 11-Sep-2001  chs file bus_subr.c was added on branch nathanw_sa on 2001-09-11 20:37:14 +0000
 1.24.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.24.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.24.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.24.2.1 03-Aug-2004  skrll Sync with HEAD
 1.25.8.1 29-Apr-2005  kent sync with -current
 1.26.2.1 12-Feb-2005  yamt use new apis.
 1.27.2.1 30-Dec-2006  yamt sync with head.
 1.28.22.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.28.20.1 18-Nov-2006  ad Sync with head.
 1.30.56.2 11-Mar-2010  yamt sync with head
 1.30.56.1 16-May-2008  yamt sync with head.
 1.30.54.1 18-May-2008  yamt sync with head.
 1.30.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.32.26.1 18-May-2014  rmind sync with head
 1.32.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.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.45 19-Jan-2024  thorpej Consistently use "intr_depth" as the name of the interrupt depth counter
on m68k platforms.
 1.44 15-Jan-2024  thorpej Provide a m68k_count_intr() macro that hides the details of how interrupts
are counted, and also ensures that ci_data.cpu_nintr is incremented.
 1.43 15-Jan-2024  thorpej G/C __HAVE_LEGACY_INTRCNT from the sun68k platforms.
 1.42 14-Jan-2024  thorpej Don't bother with isr_add_custom(). It's just a thin wrapper around
vec_set_entry(), so just use vec_set_entry() directly.
 1.41 02-Apr-2021  rin For ports with __HAVE_LEGACY_INTRCNT, turn intrcnt[] and derived
variables into u_int, to match with kern/subr_evcnt.c.
 1.40 06-Sep-2013  tsutsui branches: 1.40.42; 1.40.44;
Tab/whitespace cleanup.
 1.39 20-Dec-2010  matt branches: 1.39.8; 1.39.18; 1.39.22;
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.38 28-Jan-2010  mbalmer branches: 1.38.4;
Fix language.
 1.37 29-Mar-2008  tsutsui branches: 1.37.4;
Don't forget to initialize sc_dev.
 1.36 28-Mar-2008  tsutsui Split device_t and softc for MI mk48txx(4) and intersil7170(4) clocks,
and other related misc cosmetics.
 1.35 26-Jan-2008  tsutsui branches: 1.35.6;
Also account idepth in clock interrupt handlers
(which are registered directly by isr_add_custom())
and use the idepth value for CLKF_INTR().
 1.34 10-Jan-2008  tsutsui Move todr_attach(9) calls from each MD attachment to MI intersil7170_attach().
 1.33 10-Jan-2008  tsutsui - move todr_attach(9) calls from each MD attachment to MI mk48txx_attach()
- don't clear todr_setwen in mk48txx_attach() since it might be set by
MD attachments
 1.32 04-Oct-2006  tsutsui branches: 1.32.28; 1.32.34; 1.32.42;
Make sun3 port use MI mk48txx(4) and intersil7170(4) TOD clock drivers
with bus_space(9) support.
Note clock device name in obio.sun3 is renamed to oclock to use the same
MI attribute (intersil7170) with sun3x.

Tested on 3/80 and TME emulating 3/120 (but not on 3/4xx VME monsters).
 1.31 05-Sep-2006  gdamore branches: 1.31.2; 1.31.4;
Update sun3 to use timecounters (interrupt clock only) and generic-todr.
 1.30 11-Dec-2005  christos branches: 1.30.4; 1.30.8;
merge ktrace-lwp.
 1.29 19-Jun-2005  thorpej branches: 1.29.2;
Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.28 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.27 22-Sep-2003  tsutsui branches: 1.27.8;
Count clock interrupts.
clock_intr() functions on sun3 are called directly without dispatchers.

XXX should use evcnt(9)?
 1.26 22-Sep-2003  tsutsui KNF a bit.
 1.25 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.24 15-Jul-2003  lukem __KERNEL_RCSID()
 1.23 02-Oct-2002  thorpej branches: 1.23.6;
Add trailing ; to CFATTACH_DECL.
 1.22 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.21 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.20 05-Sep-2001  tsutsui branches: 1.20.6;
bcopy() -> memcpy(), bzero() -> memset()
 1.19 05-Sep-2001  tsutsui - vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.18 03-Feb-2001  tsutsui branches: 1.18.4;
Remove some of broken cf_unit usage.
 1.17 19-Jan-2000  msaitoh check whether tv_usec >= 1000000
 1.16 08-Feb-1998  gwr branches: 1.16.14;
Default the interrupt priority in match functions.
 1.15 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.14 12-Jan-1998  thorpej branches: 1.14.4;
Update for config changes.
 1.13 14-May-1997  gwr Make the "hydra" call leds_hydra() from clock_attach().
 1.12 01-May-1997  gwr oops...
 1.11 28-Apr-1997  gwr Drivers that use obio_mapin should enforce OBIO attachment
(just to be paranoid).
 1.10 25-Apr-1997  gwr Add "oclock" support for the Sun3/470.
 1.9 05-Mar-1997  gwr Fix race conditions that allowed the interrupt latch register to have
the wrong value. Now using the <m68k/asm_single.h> stuff from Leo.
 1.8 19-Feb-1997  gwr Make this use sys/dev/clock_subr.[ch]
 1.7 12-Feb-1997  gwr Must convert from/to BCD when reading/writing the clock chip.
 1.6 27-Jan-1997  gwr branches: 1.6.4;
Kill sunmon.h
 1.5 26-Jan-1997  gwr Check interrupt_reg==0, not clock_va (Oops!)
 1.4 25-Jan-1997  gwr Just return if clock_va is not set.
Use <sun3/sun3/sunmon.h> for abort.
 1.3 23-Jan-1997  gwr Replace the intersil7170 stuff with mostek48t02 stuff.
XXX: Still need to move date conversion functions to
XXX: libkern or somewhere...
 1.2 23-Jan-1997  jeremy Fixed leap year bug. (Doesn't happen until 2100, but still important.)
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.6.4.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.14.4.2 27-Jan-1998  gwr Fix header file name.
 1.14.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.16.14.2 11-Feb-2001  bouyer Sync with HEAD.
 1.16.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.18.4.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.18.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.20.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.20.6.1 05-Sep-2001  nathanw file clock.c was added on branch nathanw_sa on 2002-10-18 02:40:26 +0000
 1.23.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.23.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.23.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.23.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.23.6.1 03-Aug-2004  skrll Sync with HEAD
 1.27.8.1 29-Apr-2005  kent sync with -current
 1.29.2.3 04-Feb-2008  yamt sync with head.
 1.29.2.2 21-Jan-2008  yamt sync with head
 1.29.2.1 30-Dec-2006  yamt sync with head.
 1.30.8.1 14-Sep-2006  yamt sync with head.
 1.30.4.1 09-Sep-2006  rpaulo sync with head
 1.31.4.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.31.2.1 18-Nov-2006  ad Sync with head.
 1.32.42.1 10-Jan-2008  bouyer Sync with HEAD
 1.32.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.32.28.1 23-Mar-2008  matt sync with HEAD
 1.35.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.37.4.1 11-Mar-2010  yamt sync with head
 1.38.4.1 05-Mar-2011  rmind sync with head
 1.39.22.1 18-May-2014  rmind sync with head
 1.39.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.39.8.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.40.44.1 03-Apr-2021  thorpej Sync with HEAD.
 1.40.42.1 03-Apr-2021  thorpej Sync with HEAD.
 1.46 08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.45 20-Dec-2023  thorpej branches: 1.45.2;
Remove unnecessary <sys/malloc.h>.
 1.44 01-Dec-2023  thorpej Use vmem(9) rather than extent(9) to manage DVMA mappings.
 1.43 07-Nov-2013  christos fix variable usage
 1.42 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.41 27-Jan-2012  para branches: 1.41.6; 1.41.10;
converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.40 21-Nov-2009  rmind branches: 1.40.12; 1.40.16;
Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.39 10-Nov-2009  he Add a zero argument to pmap_kenter_pa() invocations.
According to cegger@ this is the right thing to do for the moment.
 1.38 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.37 04-Mar-2007  christos branches: 1.37.40; 1.37.42; 1.37.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.36 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.35 21-Feb-2007  thorpej Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.34 03-Feb-2007  tsutsui branches: 1.34.2;
Fix botch in #ifdef DIAGNOSTIC.
 1.33 03-Feb-2007  tsutsui Implement bus_dmamap_load(9) and bus_dmamap_unload(9) for sun3x.
 1.32 02-Feb-2007  tsutsui KNF
 1.31 01-Oct-2006  tsutsui First attempt at bus_space(9) support for sun3 with common sun68k/bus.c:
- make sun3 port use common sun68k files as much as possible
- add temporary options _SUN2_ in std.sun2 until sun3 can share all
sun68k files (autoconf.c and isr.c are not yet)
- move sun68kvme declaration temporary as well from files.sun68k to files.sun2
- rename and move sun68k_find_prom_map() function to MD sources since it
can't be shared with sun3
- add bus tag members to struct confargs and initilize them where appropriate

XXX1: MD bus_dma(9) backends are not implemented (yet).
XXX2: more code (obio etc.) should be shared among sun3, sun3x and sun2.
 1.30 11-Dec-2005  christos branches: 1.30.20; 1.30.22;
merge ktrace-lwp.
 1.29 01-Apr-2005  yamt branches: 1.29.2;
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.28 22-Jan-2005  chs branches: 1.28.2;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.27 15-Jul-2003  lukem branches: 1.27.8;
__KERNEL_RCSID()
 1.26 01-Apr-2003  thorpej branches: 1.26.2;
Use PAGE_SIZE rather than NBPG.
 1.25 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.24 25-Sep-2002  thorpej Don't use rmaps; use extent maps.
 1.23 11-Sep-2001  chs branches: 1.23.4;
replace pmap_enter() with pmap_kenter_pa() where appropriate.
 1.22 10-Sep-2001  chris 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.21 05-Sep-2001  tsutsui branches: 1.21.2;
- vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.20 31-Aug-2001  simonb Use comments around the token after a #endif.
 1.19 24-Apr-2001  thorpej branches: 1.19.2;
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.18 14-Jan-2001  thorpej branches: 1.18.2;
splimp() -> splvm()
 1.17 03-Nov-2000  tsutsui Fix printf formats in panic messages.
 1.16 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.15 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.14 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.13 08-Jul-1999  thorpej branches: 1.13.2; 1.13.4; 1.13.8;
Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.12 26-Mar-1999  mycroft branches: 1.12.4;
Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.11 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.10 09-Jun-1998  gwr First cut at UVM support. Compiles, but not tested yet.
 1.9 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.8 22-Jan-1998  gwr branches: 1.8.4;
Change our DVMA map from the last 16MB to the last 1MB because that is
the only part that is visible to VME masters, and is adequate space.
This allows the "si" driver (on VME) to use DMA transfers.
 1.7 22-Jan-1998  gwr When calling iommu_* functions, use IOMMU_VA_MASK.
 1.6 16-Oct-1997  gwr Check bustype in dvma_kvtopa()
 1.5 10-Oct-1997  jeremy Corrected typo in comments.
 1.4 07-Oct-1997  gwr Add dvma_malloc() for the ie driver.
 1.3 24-Feb-1997  jeremy branches: 1.3.4;
Added some more comments and disabled removal of DVMA alias mapping from
kernel space in dvma_mapout() as it may cause problems with the current
pmap_remove().
 1.2 23-Jan-1997  gwr branches: 1.2.4;
Use <machine/machdep.h>
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.2.4.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.3.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.8.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.12.4.1 02-Aug-1999  thorpej Update from trunk.
 1.13.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.4.1 15-Nov-1999  fvdl Sync with -current
 1.13.2.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.13.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.13.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.18.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.19.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.19.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.21.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.23.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.23.4.1 11-Sep-2001  nathanw file dvma.c was added on branch nathanw_sa on 2002-10-18 02:40:26 +0000
 1.26.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.26.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.26.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.26.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.26.2.1 03-Aug-2004  skrll Sync with HEAD
 1.27.8.1 29-Apr-2005  kent sync with -current
 1.28.2.1 12-Feb-2005  yamt use new apis.
 1.29.2.3 03-Sep-2007  yamt sync with head.
 1.29.2.2 26-Feb-2007  yamt sync with head.
 1.29.2.1 30-Dec-2006  yamt sync with head.
 1.30.22.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.30.20.2 09-Feb-2007  ad Sync with HEAD.
 1.30.20.1 18-Nov-2006  ad Sync with head.
 1.34.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.34.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.37.44.2 11-Mar-2010  yamt sync with head
 1.37.44.1 16-May-2008  yamt sync with head.
 1.37.42.1 18-May-2008  yamt sync with head.
 1.37.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.40.16.1 18-Feb-2012  mrg merge to -current.
 1.40.12.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.40.12.1 17-Apr-2012  yamt sync with head
 1.41.10.1 18-May-2014  rmind sync with head
 1.41.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.45.2.1 02-Aug-2025  perseant Sync with HEAD
 1.9 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.8 28-Apr-2008  martin branches: 1.8.34; 1.8.44; 1.8.50;
Remove clause 3 and 4 from TNF licenses
 1.7 03-Oct-2006  tsutsui branches: 1.7.52; 1.7.54; 1.7.56;
- change find_prom_map() to take paddr_t and return vaddr_t rather than
bus_space_handle_t since bus space handle without bus space tag looks weird
- replace old sun3 obio_find_mapping() with new common find_prom_map()
- add bus_space_vaddr(), from hp300
 1.6 11-Dec-2005  christos branches: 1.6.20; 1.6.22;
merge ktrace-lwp.
 1.5 22-Jan-2005  chs branches: 1.5.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.4 15-Jul-2003  lukem branches: 1.4.8;
__KERNEL_RCSID()
 1.3 19-Sep-2001  thorpej branches: 1.3.4; 1.3.20;
machine/fbio.h -> dev/sun/fbio.h
 1.2 05-Feb-1998  gwr branches: 1.2.26; 1.2.28;
Merge arch/sun3x into arch/sun3
 1.1 26-Jan-1998  gwr branches: 1.1.2;
file enable.c was initially added on branch gwr-3x3.
 1.1.2.2 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.1.2.1 26-Jan-1998  gwr Sun3X enable register stuff.
 1.2.28.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.26.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.20.4 24-Jan-2005  skrll Sync with HEAD.
 1.3.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.20.1 03-Aug-2004  skrll Sync with HEAD
 1.3.4.2 19-Sep-2001  thorpej machine/fbio.h -> dev/sun/fbio.h
 1.3.4.1 19-Sep-2001  thorpej file enable.c was added on branch nathanw_sa on 2001-09-19 18:10:35 +0000
 1.4.8.1 29-Apr-2005  kent sync with -current
 1.5.8.1 30-Dec-2006  yamt sync with head.
 1.6.22.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.6.20.1 18-Nov-2006  ad Sync with head.
 1.7.56.1 16-May-2008  yamt sync with head.
 1.7.54.1 18-May-2008  yamt sync with head.
 1.7.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.50.1 18-May-2014  rmind sync with head
 1.8.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.34.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.3 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.2 28-Apr-2008  martin branches: 1.2.34; 1.2.44; 1.2.50;
Remove clause 3 and 4 from TNF licenses
 1.1 14-Jan-1997  gwr branches: 1.1.152; 1.1.154; 1.1.156;
Initial revision
 1.1.156.1 16-May-2008  yamt sync with head.
 1.1.154.1 18-May-2008  yamt sync with head.
 1.1.152.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.50.1 18-May-2014  rmind sync with head
 1.2.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.34.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 07-Dec-2000  jdolecek convert to use genassym.cf & genassym.sh, as other ports do
 1.24 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.23 26-May-2000  thorpej Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
 1.22 26-Oct-1999  itohy Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.
 1.21 01-Jul-1999  thorpej branches: 1.21.2; 1.21.4; 1.21.6;
Const poison local printf prototype.
 1.20 06-May-1999  kleink SVR4-related typo in previous.
 1.19 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.18 01-Oct-1998  thorpej branches: 1.18.8;
Define SYS_compat_13_sigreturn13.
 1.17 30-Sep-1998  thorpej Make sure SYS_exit and SYS___sigreturn14 are defined. Garbage collect
SYS_sigreturn.
 1.16 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.15 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.14 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.13 22-Jan-1998  gwr branches: 1.13.4;
Use MONEND instead of DVMA_SPACE_START in the "DDB convenience" symbols.
 1.12 23-Oct-1997  gwr Make this generate the same output as kern/genassym.awk
 1.11 13-May-1997  gwr Eliminate references to vmspace.vm_pmap
(also fix some comments).
 1.10 19-Feb-1997  gwr Just M68030 is enough.
 1.9 19-Feb-1997  gwr Forgot the quotes (slow down...)
 1.8 19-Feb-1997  gwr Oops... need to define M68020 for copy.s
 1.7 12-Feb-1997  gwr Adapt to changes in pmap.h
 1.6 11-Feb-1997  gwr Add NBPG
 1.5 03-Feb-1997  gwr branches: 1.5.2;
Put all the name/value pairs in an initialized array of structures
so that this can be compiled to assembly code and then translated
directly into assym.h by a simple awk program (genassym.awk).
This program can still be run the old way for verification.
 1.4 23-Jan-1997  gwr Use <machine/machdep.h>
 1.3 23-Jan-1997  gwr Remove PCB_MMUCRP, add VM_PMAP_MMUCRP and VM_PMAP_A_TMGR
 1.2 17-Jan-1997  gwr Update for rename of pcb_mmuctx to pcb_mmucrp
Also reorder things a little.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.5.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.13.4.1 27-Jan-1998  gwr Accomodate some name changes in mon.h and elsewhere.
 1.18.8.2 01-Jul-1999  thorpej Sync w/ -current.
 1.18.8.1 21-Jun-1999  thorpej Sync w/ -current.
 1.21.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.21.4.1 15-Nov-1999  fvdl Sync with -current
 1.21.2.2 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.21.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.18 14-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k interrupt dispatch code.
 1.17 27-Dec-2023  thorpej Re-factor the 680x0 Function Code definitions into their own
separate file (as was done on the sun2/sun3 ports ages ago)
and switch everyone to the common header.
 1.16 20-Feb-2020  skrll G/C
 1.15 17-Feb-2020  skrll G/C LS{SLEEP,RUN,ONPROC}

LWP status manipulation was moved out of assembly long ago.
 1.14 19-Dec-2018  maxv branches: 1.14.6;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.13 15-Oct-2010  tsutsui branches: 1.13.58; 1.13.60;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.12 07-Jul-2010  chs enable usermode RAS for sun[23] also.
 1.11 10-Dec-2009  rmind branches: 1.11.2; 1.11.4;
Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.10 20-Sep-2008  tsutsui Remove advertising clause for UCB in various genassym.cf files,
which were derived from genassym.c in 4.4BSD-Lite2 (or 386BSD).
Closes PR misc/39573. Approved by martin@.
 1.9 28-Mar-2008  he branches: 1.9.4; 1.9.6; 1.9.10;
Remove <m68k/saframe.h> here as well, patterned after hp300.
 1.8 17-Oct-2007  garbled branches: 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 18-May-2007  tsutsui branches: 1.7.10;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.6 11-Dec-2005  christos branches: 1.6.30; 1.6.32; 1.6.38;
merge ktrace-lwp.
 1.5 27-Sep-2003  tsutsui branches: 1.5.16;
sys__sigreturn14 -> compat_16_sys___sigreturn14
 1.4 11-Apr-2003  nathanw branches: 1.4.2;
Use PAGE_SIZE rather than NBPG.
 1.3 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.2 11-May-2002  jdolecek use _KERNEL_OPT rather than _KERNEL && !_LKM
 1.1 07-Dec-2000  jdolecek branches: 1.1.2; 1.1.6; 1.1.10;
convert to use genassym.cf & genassym.sh, as other ports do
 1.1.10.4 02-Aug-2002  nathanw Don't need SAF_UPCALL anymore.
 1.1.10.3 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.1.10.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.10.1 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.1.2.1 07-Dec-2000  bouyer file genassym.cf was added on branch thorpej_scsipi on 2000-12-13 15:49:39 +0000
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.5.16.1 03-Sep-2007  yamt sync with head.
 1.6.38.1 22-May-2007  matt Update to HEAD.
 1.6.32.1 11-Jul-2007  mjf Sync with head.
 1.6.30.1 27-May-2007  ad Sync with head.
 1.7.10.1 06-Nov-2007  matt sync with HEAD
 1.8.16.2 28-Sep-2008  mjf Sync with HEAD.
 1.8.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.9.10.1 19-Oct-2008  haad Sync with HEAD.
 1.9.6.1 10-Oct-2008  skrll 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 04-May-2009  yamt sync with head.
 1.11.4.1 05-Mar-2011  rmind sync with head
 1.11.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.11.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.13.60.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.13.60.1 10-Jun-2019  christos Sync with HEAD
 1.13.58.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.14.6.1 29-Feb-2020  ad Sync with head.
 1.16 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.15 28-Apr-2008  martin branches: 1.15.34; 1.15.44; 1.15.50;
Remove clause 3 and 4 from TNF licenses
 1.14 04-Mar-2007  christos branches: 1.14.40; 1.14.42; 1.14.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13 03-Oct-2006  tsutsui branches: 1.13.4;
- change find_prom_map() to take paddr_t and return vaddr_t rather than
bus_space_handle_t since bus space handle without bus space tag looks weird
- replace old sun3 obio_find_mapping() with new common find_prom_map()
- add bus_space_vaddr(), from hp300
 1.12 11-Dec-2005  christos branches: 1.12.20; 1.12.22;
merge ktrace-lwp.
 1.11 22-Jan-2005  chs branches: 1.11.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.10 15-Jul-2003  lukem branches: 1.10.8;
__KERNEL_RCSID()
 1.9 05-Sep-2001  tsutsui branches: 1.9.6; 1.9.22;
bcopy() -> memcpy(), bzero() -> memset()
 1.8 12-Apr-1999  gwr branches: 1.8.2; 1.8.22;
Fix unused variable warning
 1.7 08-Apr-1999  gwr Fix the IDPROM checksum. It should check only the first 16 bytes.
Also try to make the sun3 and sun3x versions more similar.
 1.6 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.5 16-Oct-1997  gwr branches: 1.5.4;
Remove the autoconfig glue. This driver is mandatory,
and the match/attach functions did nothing anyway.
 1.4 28-Apr-1997  gwr Use unsigned when doing copy/xor check.
 1.3 25-Apr-1997  gwr Make idprom_init() figure out where the IDPROM resides.
Add autoconfig glue, which currently just shows the
address where the IDPROM was found.
 1.2 27-Jan-1997  gwr Add machdep.h; use sunmon_abort() instead of mon_exit_to_mon().
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.5.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.8.22.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.8.2.2 12-Apr-1999  gwr Fix unused variable warning
 1.8.2.1 12-Apr-1999  gwr file idprom.c was added on branch netbsd-1-4 on 1999-04-12 01:30:23 +0000
 1.9.22.4 24-Jan-2005  skrll Sync with HEAD.
 1.9.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.22.1 03-Aug-2004  skrll Sync with HEAD
 1.9.6.2 05-Sep-2001  tsutsui bcopy() -> memcpy(), bzero() -> memset()
 1.9.6.1 05-Sep-2001  tsutsui file idprom.c was added on branch nathanw_sa on 2001-09-05 14:18:11 +0000
 1.10.8.1 29-Apr-2005  kent sync with -current
 1.11.8.2 03-Sep-2007  yamt sync with head.
 1.11.8.1 30-Dec-2006  yamt sync with head.
 1.12.22.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.12.20.1 18-Nov-2006  ad Sync with head.
 1.13.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.44.1 16-May-2008  yamt sync with head.
 1.14.42.1 18-May-2008  yamt sync with head.
 1.14.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.50.1 18-May-2014  rmind sync with head
 1.15.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.34.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.19 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.18 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.17 28-Jun-2008  tsutsui branches: 1.17.30; 1.17.40; 1.17.46;
Split softc/device_t, with misc cosmetic changes.
 1.16 28-Apr-2008  martin branches: 1.16.2; 1.16.4;
Remove clause 3 and 4 from TNF licenses
 1.15 11-Dec-2005  christos branches: 1.15.74; 1.15.76; 1.15.78;
merge ktrace-lwp.
 1.14 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.13 15-Jul-2003  lukem branches: 1.13.8;
__KERNEL_RCSID()
 1.12 02-Oct-2002  thorpej branches: 1.12.6;
Add trailing ; to CFATTACH_DECL.
 1.11 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.10 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.9 27-May-2001  chs branches: 1.9.2; 1.9.8;
don't abuse cf_unit.
 1.8 05-Feb-1998  gwr branches: 1.8.26;
Merge arch/sun3x into arch/sun3
 1.7 22-Jan-1998  gwr branches: 1.7.4;
No need to print the size (it's constant).
 1.6 12-Jan-1998  thorpej Update for config changes.
 1.5 25-Apr-1997  gwr Use bus_mapin, and minor tweaks.
 1.4 03-Mar-1997  jeremy Use IOMMU_PAGE_SIZE instead of NBPG, since theoretically the IOMMU page size
is different than the CPU page size.
 1.3 22-Feb-1997  jeremy Make the device attach output look more like the SPARC iommu.
 1.2 13-Feb-1997  jeremy Convert meaningless '0' into a more human readable 'IOMMU_PDE_DT_INVALID'.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr branches: 1.1.1.1.6;
Initial import. Gets as far as nfs_mountroot.
 1.1.1.1.6.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.7.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.8.26.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.9.8.1 27-May-2001  nathanw file iommu.c was added on branch nathanw_sa on 2002-10-18 02:40:26 +0000
 1.9.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.12.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.12.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.6.1 03-Aug-2004  skrll Sync with HEAD
 1.13.8.1 29-Apr-2005  kent sync with -current
 1.15.78.2 04-May-2009  yamt sync with head.
 1.15.78.1 16-May-2008  yamt sync with head.
 1.15.76.1 18-May-2008  yamt sync with head.
 1.15.74.2 29-Jun-2008  mjf Sync with HEAD.
 1.15.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.4.1 03-Jul-2008  simonb Sync with head.
 1.16.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.46.1 18-May-2014  rmind sync with head
 1.17.40.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.30.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.9 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.8 28-Apr-2008  martin branches: 1.8.34; 1.8.44; 1.8.50;
Remove clause 3 and 4 from TNF licenses
 1.7 11-Dec-2005  christos branches: 1.7.74; 1.7.76; 1.7.78;
merge ktrace-lwp.
 1.6 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.5 22-Jan-1998  gwr branches: 1.5.50; 1.5.58;
Add: IOMMU_VA_MASK
 1.4 10-Oct-1997  jeremy Rewrote the comments about the operation of the I/O mapper to make them more
accurate and (hopefully) easier to understand.
 1.3 22-Feb-1997  jeremy branches: 1.3.4;
Add page size constant, since I/O mapper page size may differ from cpu page
size.
 1.2 16-Jan-1997  jeremy branches: 1.2.6;
Added conditional include of iommu kernel driver manipulation routines.
Fixed a few comments.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.2.6.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.3.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.58.1 29-Apr-2005  kent sync with -current
 1.5.50.1 24-Jan-2005  skrll Sync with HEAD.
 1.7.78.1 16-May-2008  yamt sync with head.
 1.7.76.1 18-May-2008  yamt sync with head.
 1.7.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.50.1 18-May-2014  rmind sync with head
 1.8.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.34.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.78 17-Jan-2024  thorpej Make sigcode.s and sunos_sigcode.s build as their own stand-alone files.
 1.77 17-Jan-2024  thorpej Make compat_13_sigreturn13.s and compat_16_sigreturn14.s build as their
own stand-alone files and G/C the now-empty sigreturn.s.
 1.76 16-Jan-2024  thorpej Build m68k/support.s on its own; don't include it from locore.s
 1.75 15-Jan-2024  thorpej G/C __HAVE_LEGACY_INTRCNT from the sun68k platforms.
 1.74 14-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k interrupt dispatch code.
 1.73 13-Jan-2024  thorpej G/C unreferenced copies of _spl() and _splraise().
 1.72 12-Jan-2024  thorpej We only need one copy of getvbr() and setvbr().
 1.71 12-Jan-2024  thorpej Make getsr() an inline in <m68k/psl.h> and G/C all of the now-redudant
copies.
 1.70 12-Jan-2024  thorpej Remove getsp(); nothing uses it.
 1.69 16-Mar-2022  andvar branches: 1.69.4;
s/paniced/panicked/ and s/borken/broken/ in comments.
 1.68 31-Mar-2021  simonb Adjust the number of entries in the intrcnt array to match the number
of names in the intrnames list.
 1.67 25-Jan-2021  tsutsui branches: 1.67.2;
Remove #undefs against INTERRUPT_SAVEREG and INTERRUPT_RESTOREREG.

They have been defined in <m68k/asm.h> for years.
 1.66 19-Dec-2018  maxv branches: 1.66.12;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.65 24-Mar-2014  christos branches: 1.65.28; 1.65.30;
avoid dup defs, use global macros
 1.64 22-Dec-2011  tsutsui branches: 1.64.6; 1.64.10;
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.
 1.63 15-Nov-2011  tsutsui branches: 1.63.4;
Move spread getsfc() and getdfc() functions into common m68k/support.s.

Note:
- ENTRY_NOPROFILE() is okay since they are used only for debug printf
- they are declared to return int so no need to put a return value into %a0
 1.62 08-Feb-2011  rmind branches: 1.62.4;
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.61 15-Oct-2010  tsutsui branches: 1.61.2; 1.61.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.60 25-Feb-2010  skrll branches: 1.60.2;
s/cpu_fork/cpu_lwp_fork/ in comment
 1.59 10-Dec-2009  rmind branches: 1.59.2;
Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.58 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.57 17-Oct-2007  garbled branches: 1.57.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.56 20-Jul-2007  tsutsui branches: 1.56.6;
Sync with sun3/locore.s rev 1.88:
> Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
> was optimizing away modifications to the frame contents (it's not nice to
> trick gcc). Pass the pointer as the first argument to reduce the number
> of places that would be changed otherwise. Fixes the getcwd regression
> test on most m68k ports.
Fixes MMU fault panic in trap() on sun3x.

This should be pulled up to netbsd-4 too.
 1.55 18-May-2007  tsutsui branches: 1.55.2; 1.55.4;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.54 11-Dec-2005  christos branches: 1.54.24; 1.54.30; 1.54.32; 1.54.38; 1.54.40;
merge ktrace-lwp.
 1.53 05-Mar-2004  he branches: 1.53.16;
Remove the local proc_trampoline definition from this file as well.
 1.52 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.51 18-Jan-2003  thorpej branches: 1.51.2;
Merge the nathanw_sa branch.
 1.50 02-Nov-2002  chs finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.
 1.49 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.48 22-Jul-2001  scw branches: 1.48.6;
ptest_addr() is prototyped (in pmap.c) to return a u_long not a pointer.
Therefore the return value should be in %d0, not %a0.
 1.47 30-May-2001  lukem branches: 1.47.2;
add missing #include "opt_kgdb.h"
 1.46 12-May-2001  kleink Update to reflect that unlike in m68k a.out environments, where the .align
directive is given a log2 argument, .align is given a linear argument in
m68k ELF environments.
 1.45 22-Feb-2001  chs branches: 1.45.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.44 26-Nov-2000  jdolecek split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate
 1.43 03-Nov-2000  tsutsui Fix typo in the previous revision. (s/LIdle/Lidle/)
 1.42 20-Aug-2000  thorpej Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.
 1.41 31-May-2000  thorpej Add a comment on single-processor systems about p_cpu being initialized
by fork1().
 1.40 31-May-2000  nathanw Update for qs -> sched_qs change.
Kernel compiles again.
 1.39 26-May-2000  thorpej branches: 1.39.2;
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.38 26-May-2000  thorpej Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
 1.37 26-Oct-1999  itohy Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.
 1.36 01-Aug-1999  thorpej branches: 1.36.2; 1.36.4; 1.36.6;
Make sure the branch target of the delay loop is aligned to a cache
half-line (8-byte) boundary. Inspired by a discussion w/ Scott Reynolds.
 1.35 30-Apr-1999  christos Include opt_compat_sunos.h
 1.34 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.33 24-Mar-1999  mrg branches: 1.33.2;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.32 26-Feb-1999  is sun3 part of fix for PR 6152
 1.31 11-Nov-1998  thorpej Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.30 30-Sep-1998  thorpej Garbage collect trap #1 and trap #2 handlers; they're moved to
trap_subr.s
 1.29 30-Sep-1998  thorpej Pull in opt_compat_netbsd.h
 1.28 09-Sep-1998  thorpej Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).
 1.27 09-Jun-1998  gwr First cut at UVM support. Compiles, but not tested yet.
 1.26 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.25 22-Jan-1998  gwr branches: 1.25.4;
Separate pmap_activate() from _pmap_switch(), so the latter can remain
equivalent to what locore.s:cpu_switch does with in-line assembly when
PMAP_DEBUG is not defined. Also do splimp/splx in pmap_activate.
 1.24 22-Jan-1998  gwr Use MONEND instead of DVMA_SPACE_START in the "DDB convenience" symbols.
 1.23 02-Jan-1998  thorpej Make pmap_activate() take a proc *.
 1.22 16-Oct-1997  gwr MONSTART/monstart symbol
 1.21 29-May-1997  gwr Add non-inline version of _splraise.
 1.20 13-May-1997  gwr Eliminate references to vmspace.vm_pmap
(also fix some comments).
 1.19 02-May-1997  jeremy Wrap all label references with new macros in m68k/asm.h in preperation
for ELF switchover. (eventually)
 1.18 25-Apr-1997  gwr Rename "Idle" to "_Idle" so clock.c can reference it.
 1.17 25-Apr-1997  thorpej Adjust for <m68k/m68k/trap_subr.s>
 1.16 13-Apr-1997  thorpej Use common m68k sigcode.
 1.15 09-Apr-1997  thorpej Use <m68k/m68k/proc_subr.s>
 1.14 31-Mar-1997  jeremy In-tree GNU ``as'' does not know of 'pmove <reg>,tt0' instruction. Changed
instances of this instruction to hardcoded opcode statements. Thanks to
jthorpe for pointing this out.
 1.13 17-Mar-1997  gwr s/fpu_type/fputype/g
 1.12 16-Mar-1997  thorpej Use <m68k/m68k/support.s>
 1.11 13-Mar-1997  gwr Sync with sun3 (Trap 1,2,15 handlers)
 1.10 05-Mar-1997  gwr Add ptest_addr
 1.9 20-Feb-1997  jeremy Added the '@' symbols that GAS needs for address register indirect addressing
statements that are used when PMAP_DEBUG is undefined.
 1.8 12-Feb-1997  gwr Reinstate call to pmap_activate() for now, because it is helpful
for debugging the pmap code. The in-line version of the same is
still here and will be used if PMAP_DEBUG is not defined.
 1.7 11-Feb-1997  gwr Add a few more coments. (i.e. why init a6=0)
 1.6 11-Feb-1997  gwr Sync with sun3.
 1.5 02-Feb-1997  thorpej branches: 1.5.2;
Remove an un-true comment.
 1.4 23-Jan-1997  gwr Load the root pointer using VM_PMAP_MMUCRP
Also rename nodb_trap to _nodb_trap
 1.3 17-Jan-1997  gwr Fix a comment (PCB_MMUCTX is a virtual address).
 1.2 17-Jan-1997  gwr Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.5.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.25.4.1 27-Jan-1998  gwr Accomodate some name changes in mon.h and elsewhere.
 1.33.2.1 30-Apr-1999  perry branches: 1.33.2.1.2;
pullup 1.34->1.35 (christos); conflicts manually edited
 1.33.2.1.2.2 02-Aug-1999  thorpej Update from trunk.
 1.33.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.36.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.36.4.1 15-Nov-1999  fvdl Sync with -current
 1.36.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.36.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.36.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.36.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.39.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.45.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.47.2.1 03-Aug-2001  lukem update to -current
 1.48.6.5 11-Nov-2002  nathanw Catch up to -current
 1.48.6.4 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.48.6.3 08-Dec-2001  thorpej cpu_fork() -> cpu_lwp_fork(). This logically forks an LWP, not a
complete process. As noted by Gregory McGarry on tech-kern.
 1.48.6.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.48.6.1 22-Jul-2001  scw file locore.s was added on branch nathanw_sa on 2001-11-18 19:39:04 +0000
 1.51.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.51.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.51.2.1 03-Aug-2004  skrll Sync with HEAD
 1.53.16.1 03-Sep-2007  yamt sync with head.
 1.54.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.54.38.2 03-Oct-2007  garbled Sync with HEAD
 1.54.38.1 22-May-2007  matt Update to HEAD.
 1.54.32.1 11-Jul-2007  mjf Sync with head.
 1.54.30.2 20-Aug-2007  ad Sync with HEAD.
 1.54.30.1 27-May-2007  ad Sync with head.
 1.54.24.1 22-Jul-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #782):
sys/arch/sun3/sun3x/locore.s: revision 1.56
Sync with sun3/locore.s rev 1.88:
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
Fixes MMU fault panic in trap() on sun3x.
This should be pulled up to netbsd-4 too.
 1.55.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.55.2.1 07-Aug-2007  matt Sync with HEAD.
 1.56.6.1 06-Nov-2007  matt sync with HEAD
 1.57.20.1 11-Mar-2010  yamt sync with head
 1.59.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.59.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.60.2.1 05-Mar-2011  rmind sync with head
 1.61.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.61.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.62.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.62.4.1 17-Apr-2012  yamt sync with head
 1.63.4.1 18-Feb-2012  mrg merge to -current.
 1.64.10.1 18-May-2014  rmind sync with head
 1.64.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.65.30.1 10-Jun-2019  christos Sync with HEAD
 1.65.28.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.66.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.67.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.69.4.1 27-Jun-2024  martin Pull up following revision(s) (requested by rin in ticket #724
to fix build fallout on the branch):

sys/arch/m68k/m68k/compat_16_sigreturn14.s: revision 1.6
sys/arch/mvme68k/mvme68k/locore.s: revision 1.129
sys/arch/news68k/news68k/locore.s: revision 1.84
sys/arch/hp300/hp300/locore.s: revision 1.183
sys/arch/m68k/m68k/compat_13_sigreturn13.s: revision 1.8
sys/arch/m68k/m68k/sigreturn.s: file removal
sys/arch/m68k/include/pte_motorola.h: revision 1.10
sys/arch/atari/atari/locore.s: revision 1.125
sys/arch/amiga/amiga/locore.s: revision 1.169
sys/arch/sun2/sun2/locore.s: revision 1.37
sys/arch/next68k/next68k/locore.s: revision 1.84
sys/arch/x68k/x68k/locore.s: revision 1.130
sys/arch/sun3/sun3x/locore.s: revision 1.77
sys/arch/cesfic/cesfic/locore.s: revision 1.45
sys/arch/m68k/conf/files.m68k: revision 1.53
sys/arch/sun3/sun3/locore.s: revision 1.109
sys/arch/luna68k/luna68k/locore.s: revision 1.81
sys/arch/mac68k/mac68k/locore.s: revision 1.182

Define PTE used in the pmap module int terms of the bit definitions
in mmu_{51,40}.h.

Make compat_13_sigreturn13.s and compat_16_sigreturn14.s build as their
own stand-alone files and G/C the now-empty sigreturn.s.
 1.43 13-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k vector table.
 1.42 11-Jul-2020  nia Fix various typos of "system" in comments. Mainly copypasto errors.

from vezhlys on freenode.
 1.41 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.40 06-Sep-2013  tsutsui branches: 1.40.28; 1.40.30;
Tab/whitespace cleanup.
 1.39 10-Aug-2012  tsutsui branches: 1.39.2; 1.39.4;
Appease gcc -fno-common:
- initialize cn_tab in locore2.c:_bootstrap() for early printf calls
Tested on sun3 (3/160 on TME) and sun3x (real 3/80).

XXX: sun3 with >16MB RAM gets "panic: ubc_init: failed to map ubc_object"
 1.38 30-Nov-2009  he branches: 1.38.12;
Cast a vaddr_t to void* before passing to memset, so that this builds again.
 1.37 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.36 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.35 21-Nov-2009  rmind Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.34 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.33 04-Mar-2007  christos branches: 1.33.40; 1.33.42; 1.33.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.32 01-Oct-2006  tsutsui branches: 1.32.4;
First attempt at bus_space(9) support for sun3 with common sun68k/bus.c:
- make sun3 port use common sun68k files as much as possible
- add temporary options _SUN2_ in std.sun2 until sun3 can share all
sun68k files (autoconf.c and isr.c are not yet)
- move sun68kvme declaration temporary as well from files.sun68k to files.sun2
- rename and move sun68k_find_prom_map() function to MD sources since it
can't be shared with sun3
- add bus tag members to struct confargs and initilize them where appropriate

XXX1: MD bus_dma(9) backends are not implemented (yet).
XXX2: more code (obio etc.) should be shared among sun3, sun3x and sun2.
 1.31 11-Dec-2005  christos branches: 1.31.20; 1.31.22;
merge ktrace-lwp.
 1.30 22-Jan-2005  chs branches: 1.30.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.29 15-Jul-2003  lukem branches: 1.29.8;
__KERNEL_RCSID()
 1.28 18-Jan-2003  thorpej branches: 1.28.2;
Merge the nathanw_sa branch.
 1.27 02-Aug-2002  soren G/c vestiges of old sun3-specific SYMTAB_SPACE support.
 1.26 05-Sep-2001  tsutsui branches: 1.26.6; 1.26.14;
bcopy() -> memcpy(), bzero() -> memset()
 1.25 05-Sep-2001  tsutsui - vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.24 22-Feb-2001  chs branches: 1.24.4;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.23 03-Feb-2001  tsutsui Use macro in <m68k/m68k.h> for cputype and mmutype.
 1.22 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.21 04-Jul-1998  jonathan branches: 1.21.14;
defopt DDB.
 1.20 12-Jun-1998  gwr Sync with the sun3 version.
 1.19 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.18 04-Oct-1997  gwr branches: 1.18.4;
Move the call to cninit() up a level (easier to find).
 1.17 10-Jun-1997  veego branches: 1.17.4;
s/_round_page/m68k_round_page/
 1.16 14-May-1997  gwr Remove call to leds_init (it is already in obio_init).
 1.15 11-May-1997  jeremy Add call to leds_init() after everything has started up ok.
 1.14 25-Apr-1997  gwr Move the _verify_hardware() work into machdep.c:identifycpu().
Call obio_init() after _vm_init() so we can use peek_byte() to
probe the idprom. Be quiet in _save_symtab() when all is well.
 1.13 24-Mar-1997  gwr No longer force boothowto=RB_SINGLE|RB_KDB
(Yes, it goes multi-user just fine! 8^)
 1.12 13-Mar-1997  gwr s/sun3x_/_/ in sun3x_(round|trunc)_(page|seg) macros
 1.11 18-Feb-1997  gwr Define "cold" over in autoconf.c
 1.10 12-Feb-1997  gwr Force RB_SINGLE for now (in addition to RB_KDB).
 1.9 11-Feb-1997  gwr Sync with sun3.
 1.8 02-Feb-1997  thorpej branches: 1.8.2;
Declare and set cputype and mmutype.
 1.7 27-Jan-1997  gwr Kill sunmon.h; add sun "code names" (Hydra, Pegasus).
 1.6 25-Jan-1997  gwr Use sunmon_abort() instead of mon_panic().
 1.5 23-Jan-1997  gwr Move a bunch of stuff to sun3/sunmon.c where we can share it.
 1.4 18-Jan-1997  gwr Do loadcrp(&mon_crp) only when returning permanently to the monitor.
 1.3 17-Jan-1997  gwr Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.
 1.2 16-Jan-1997  gwr Before dropping into the PROM monitor, restore its CPU Root Pointer (CRP),
and restore our own CRP if we resume. Make sure the string passed to
mon_reboot() is in our data segment where the PROM can see it.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.8.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.17.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.21.14.3 12-Mar-2001  bouyer Sync with HEAD.
 1.21.14.2 11-Feb-2001  bouyer Sync with HEAD.
 1.21.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.24.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.24.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.26.14.1 31-Aug-2002  gehenna catch up with -current.
 1.26.6.5 13-Aug-2002  nathanw Catch up to -current.
 1.26.6.4 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.26.6.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.26.6.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.26.6.1 05-Sep-2001  scw file locore2.c was added on branch nathanw_sa on 2001-11-18 19:39:05 +0000
 1.28.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.28.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.28.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.28.2.1 03-Aug-2004  skrll Sync with HEAD
 1.29.8.1 29-Apr-2005  kent sync with -current
 1.30.8.2 03-Sep-2007  yamt sync with head.
 1.30.8.1 30-Dec-2006  yamt sync with head.
 1.31.22.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.31.20.1 18-Nov-2006  ad Sync with head.
 1.32.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.33.44.2 11-Mar-2010  yamt sync with head
 1.33.44.1 16-May-2008  yamt sync with head.
 1.33.42.1 18-May-2008  yamt sync with head.
 1.33.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.38.12.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.38.12.1 30-Oct-2012  yamt sync with head
 1.39.4.1 18-May-2014  rmind sync with head
 1.39.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.40.30.1 10-Jun-2019  christos Sync with HEAD
 1.40.28.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.141 11-Jun-2025  andvar s/congiguous/contiguous/ in comment.
 1.140 20-Dec-2023  thorpej branches: 1.140.2;
Remove unnecessary <sys/malloc.h>.
 1.139 11-Jun-2020  ad uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched. It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.
 1.138 31-Dec-2019  ad Rename uvm_free() -> uvm_availmem().
 1.137 21-Dec-2019  ad uvmexp.free -> uvm_free()
 1.136 03-Jun-2019  msaitoh Fix typo in comment(s/similiar/similar/).
 1.135 24-Mar-2014  christos branches: 1.135.10; 1.135.20; 1.135.30;
use cpu_{g,s}etmodel
 1.134 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.133 28-Jul-2012  matt branches: 1.133.2; 1.133.4;
Remove declartions of physmem
 1.132 27-Jul-2012  matt Remove safepri and use IPL_SAFEPRI instead. This may be defined in a MD
header file (if not, a value of 0 is assmued).
 1.131 12-Dec-2011  mrg implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.
 1.130 14-Jun-2011  tsutsui branches: 1.130.2; 1.130.6;
Fix merge botch. KERNBASE macro was split into KERNBASE3 and KERNBASE3X
for kernel, and was replaced with kernbase constant for possible reference
of USRSTACK in module(7).
 1.129 12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.128 16-May-2011  tsutsui branches: 1.128.2;
- merge and move pasted m68k MD setreg() functions into m68k/m68k_machdep.c
- move m68881_save() and m68881_restore() declarations into <m68k/m68k.h>

Briefly tested and no obvious breakage on atari, sun3, and x68k.
 1.127 04-Mar-2011  joerg Refactor ps_strings access. Based on PK_32, write either the normal
version or the 32bit compat layout in execve1. Introduce a new function
copyin_psstrings for reading it back from userland and converting it to
the native layout. Refactor procfs to share most of the code with the
kern.proc_args sysctl handler.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.126 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.125 17-Jan-2011  tsutsui branches: 1.125.2;
Explicitly include <machine/pcb.h> for struct pcb.
 1.124 15-Oct-2010  tsutsui branches: 1.124.2;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.123 08-Feb-2010  joerg branches: 1.123.2;
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.122 10-Dec-2009  matt branches: 1.122.2;
Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds). Should result in no code differences.
 1.121 21-Nov-2009  rmind Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.120 10-Nov-2009  he Add a zero argument to pmap_kenter_pa() invocations.
According to cegger@ this is the right thing to do for the moment.
 1.119 15-Aug-2009  matt Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
 1.118 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.117 21-Jan-2009  he branches: 1.117.2;
Re-adapt to the changed return types for major() and minor().
 1.116 12-Jan-2009  tsutsui Use PRIu64 to print 64 bit dev_t.
 1.115 30-Nov-2008  martin 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.114 25-Nov-2008  ad dumpsys: don't spew numbers into the log.
 1.113 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.112 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.111 02-Jul-2008  ad branches: 1.111.2; 1.111.4; 1.111.6;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.110 17-Oct-2007  garbled branches: 1.110.16; 1.110.20; 1.110.22; 1.110.24;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.109 02-Jun-2007  tsutsui branches: 1.109.10;
- Don't refer fputype before FPU is probed.
- Call m68k_make_fpu_idle_frame() from initfpu().
 1.108 04-Mar-2007  tsutsui branches: 1.108.2; 1.108.4; 1.108.10;
Use (char *) on pointer arith.
 1.107 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.106 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.105 09-Feb-2007  ad branches: 1.105.2;
Merge newlock2 to head.
 1.104 21-Oct-2006  mrg in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev. this occurs when we try to set the dumpdev to a device
with no driver loaded. this fixes PR#34872.

in sys_swapctl, if bdevsw_lookup() fails, set dumpdev = NODEV
before calling cpu_dumpconf(). (this also fixes PR#34872.)

XXX: cpu_dumpconf() should probably be changed to take a dumpdev
XXX: and return an error in such cases, but that is a much more
XXX: intrusive change.

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
 1.103 05-Oct-2006  tsutsui Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.102 11-Dec-2005  christos branches: 1.102.20; 1.102.22;
merge ktrace-lwp.
 1.101 19-Jun-2005  thorpej branches: 1.101.2;
Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.100 03-Jun-2005  tsutsui Constify.
 1.99 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.98 01-Apr-2005  yamt 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.97 22-Jan-2005  chs branches: 1.97.2;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.96 24-Mar-2004  atatat branches: 1.96.8;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
 1.95 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.94 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.93 04-Dec-2003  atatat Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded. Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
 1.92 26-Oct-2003  mycroft Fix a compiler warning.
 1.91 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.90 15-Jul-2003  lukem __KERNEL_RCSID()
 1.89 29-Jun-2003  fvdl branches: 1.89.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.88 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.87 26-Apr-2003  ragge Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.86 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.85 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.84 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.83 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.82 19-Sep-2002  ragge Do not include <sys/clist.h>, it's not used in NetBSD at all.
 1.81 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.80 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.79 18-May-2002  lukem add missing union sun3sir sun3sir; (hi gimpy!)
 1.78 20-Mar-2002  christos branches: 1.78.4;
kill remaining PS_STRINGS instances.
 1.77 06-Mar-2002  tsutsui Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.
 1.76 11-Sep-2001  chs branches: 1.76.4;
replace pmap_enter() with pmap_kenter_pa() where appropriate.
 1.75 10-Sep-2001  chris 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.74 05-Sep-2001  tsutsui branches: 1.74.2;
bcopy() -> memcpy(), bzero() -> memset()
 1.73 05-Sep-2001  tsutsui - vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.72 31-Aug-2001  simonb Use comments around the token after a #endif.
 1.71 16-Jun-2001  tsutsui branches: 1.71.2;
Make sure to write out the dump header into an independent block
on the dump device on sun3x. (sync with sun3)
Now savecore(8) can find core dump in dumpdev properly.

XXX "target kcore /dev/mem" on gdb does not work yet.
 1.70 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.69 30-May-2001  lukem add missing #include "opt_kgdb.h"
 1.68 28-May-2001  chs remove check for too-small MSGBUFOFF now that the reason for it is gone.
 1.67 28-May-2001  chs remove a useless call to uvm_map_protect(). the kernel text is already
mapped read-only in pmap_bootstrap() and the comment which tried to
explain why this might be needed anyway didn't make any sense.
 1.66 28-May-2001  chs make sun3x work again after the recent change to the m68k cpu_kcore_hdr:
allocate a page for dumps like the sun3 does rather than using part of
the msgbuf page. this also lets the msgbuf use the full msgbuf page.
 1.65 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.64 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.63 22-Feb-2001  chs branches: 1.63.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.62 26-Jan-2001  tsutsui Sync with sun3/machdep.c:

> Require the machine-dependant DDB commands to be in db_machine_command_table[]
> and link it directly to db_command_table[] so that it's not necessary
> to do this at runtime. Make db_machine_command_table[] const on all ports.
> g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()
>
> Patch written by enami.
 1.61 09-Nov-2000  tsutsui On sun3x, cpu_reboot() calls sunmon_abort() for PROM bug work-around,
but sunmon_abort() does not restore mon_crp so it causes problems.
Instead, call romVectorPtr->abortEntry (via trap14) from sunmon_halt()
and call it from cpu_reboot().

Now PROM boot command works properly even after halt on my 3/80.
 1.60 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.59 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.58 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.57 05-Jun-2000  jhawk branches: 1.57.2;
Do not clear msgbufenabled in dumpsys(). Dump messages will now go to
the message buffer. This can be invaluable in debugging if the dump
fails (assuming a persistant message buffer)
 1.56 26-May-2000  thorpej branches: 1.56.2;
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.55 19-Jan-2000  thorpej Move callout initialization to a single location; no need to duplicate
that code all over the place.
 1.54 04-Dec-1999  ragge CL* discarding.
 1.53 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.52 12-Sep-1999  chs branches: 1.52.2; 1.52.4; 1.52.8;
eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
 1.51 26-May-1999  thorpej Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags. PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that. INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now). This will eventually
change now these maps are locked, as well.
 1.50 20-May-1999  lukem * convert to using MI allocsys(). most ports were using an MD allocsys(),
although a couple still used the old pre-4.4-lite (?) mechanism.
* use format_bytes() to format the various printf()s that print out memory sizes
 1.49 26-Apr-1999  thorpej Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
 1.48 25-Apr-1999  simonb g/c REAL_CLISTS.
 1.47 11-Apr-1999  chs add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.
 1.46 08-Apr-1999  gwr branches: 1.46.2;
Use the string kernel_arch to determine "sun3" vs "sun3x"
and leave the machine string as it was (make uses it).
 1.45 01-Apr-1999  thorpej Don't call configure() from cpu_startup().
 1.44 30-Mar-1999  gwr Arrange for "sysctl hw.machine" to show sun3x.
(Needed by the miniroot, etc.)
 1.43 26-Mar-1999  mycroft Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.42 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.41 04-Mar-1999  kleink Need to include DDB headers only if DDB is defined.
 1.40 27-Feb-1999  scottr defopt BUFCACHE and BUFPAGES.
 1.39 09-Jan-1999  thorpej Garbage-collect `mbutl'.
 1.38 13-Dec-1998  kleink Printf format warning cleanup: the type of the result of a shift operation is
that of the promoted left operand.
 1.37 24-Nov-1998  kleink Need <sys/device.h> to bring configure() declaration in scope.
 1.36 19-Oct-1998  tron Defopt SYSVMSG, SYSVSEM and SYSVSHM.
 1.35 04-Jul-1998  jonathan defopt DDB.
 1.34 09-Jun-1998  gwr First cut at UVM support. Compiles, but not tested yet.
 1.33 09-Jun-1998  gwr Make this compile...
 1.32 09-Jun-1998  tv Change ddb_init() for a.out to provision for kernels which are not booted by
the current 'bootblock' method, like the Shark, which preloads and preformats
the symbol table right in the boot code.
 1.31 08-Mar-1998  gwr Sync with sun3/machdep.c (should factor out common stuff...)
> Do the "early breakpoint" (if booted with "-d") even if we
> have only the PROM to handle it, so one can patch things.
 1.30 19-Feb-1998  thorpej Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.
 1.29 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.28 24-Jan-1998  mycroft When dumping, print out the device number as major,minor.
 1.27 04-Dec-1997  tv branches: 1.27.2;
Standardize COMPAT_SUNOS -- remove all references to
sunos_exec_aout_makecmds() in machdep.c for various architectures and put
it in exec_conf.c like the other emulations; rename exec.h to
sunos_exec.h.
 1.26 18-Nov-1997  hannken Change order of include files. See PR #4532.
 1.25 05-Oct-1997  gwr branches: 1.25.2;
Do the cpu_kcore_hdr initialization a little differently.
(also fix - was not setting pg_frame, pg_valid)
 1.24 04-Oct-1997  gwr Make cpu_reboot un-blank the screen (cnpollc(1)).
Validate space in page zero for the kcore header.
 1.23 02-Oct-1997  gwr Make msgbuf stay in page zero
 1.22 19-Sep-1997  leo Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.21 12-Sep-1997  mycroft Set the status word as well, and remove a bogus comment.
 1.20 12-Sep-1997  mycroft Always initialize all registers in setregs().
 1.19 11-Sep-1997  mycroft Fix execve(2) and *setregs() interfaces so emulations can set registers in a
more correct way. (See tech-kern.)
 1.18 12-Jun-1997  mrg branches: 1.18.4;
bring mrg-vm-swap2 onto mainilne.
 1.17 08-Jun-1997  veego Initialize machine from MACHINE.
 1.16 14-May-1997  gwr The Hydra is 20 MHz and the Pegasus is 33 MHz.
 1.15 25-Apr-1997  gwr branches: 1.15.2;
Moved the actual model identification work into identifycpu(),
which used to be in _startup.c:_verify_hardware().
Use sunmon_abort() in cpu_reboot() for now...
 1.14 09-Apr-1997  thorpej Adjust for new kcore.h
 1.13 04-Apr-1997  gwr Add a comment.
 1.12 27-Mar-1997  thorpej Don't allocate mclrefcnt[]; it's dead and gone.
 1.11 26-Mar-1997  gwr Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/
 1.10 21-Mar-1997  gwr First cut at crashdump support.
 1.9 17-Mar-1997  gwr s/fpu_type/fputype/g
 1.8 18-Feb-1997  gwr Moved straytrap() to trap.c (and minor cleanup)
 1.7 14-Feb-1997  gwr Moved sendsig(), sys_sigreturn() to sun3/sig_machdep.c
Moved regdump() and friends to sun3/regdump.c
 1.6 12-Feb-1997  gwr Avoid dereferencing null curproc in dumpmem().
 1.5 11-Feb-1997  gwr branches: 1.5.2;
Sync with sun3.
 1.4 27-Jan-1997  gwr branches: 1.4.2;
Kill sunmon.h
 1.3 23-Jan-1997  gwr Use <machine/machdep.h> and <sun3/sun3/sunmon.h>
 1.2 16-Jan-1997  gwr Make sure the string passed to mon_reboot() is in our data segment
where the PROM can see it. (Bug found by Jeremy -- Thanks!)
 1.1 14-Jan-1997  gwr Initial revision
 1.4.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.5.2.1 12-Feb-1997  mrg don't allocate swap map in allocsys.
 1.15.2.2 01-Jun-1997  mrg update to trunk.
 1.15.2.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.18.4.3 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.4.2 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.4.1 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.25.2.1 18-Nov-1997  mellon Pull rev 1.26 up from trunk (hannken)
 1.27.2.3 27-Jan-1998  gwr Fix the kcore header (needs "sun3x", not "sun3")
Make cpu_model[] begin with "Sun-3X ..."
 1.27.2.2 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.27.2.1 26-Jan-1998  gwr Merge recent changes on the head onto the gwr-3x3 branch.
 1.46.2.2 16-Apr-1999  chs branches: 1.46.2.2.2;
pull up 1.46 -> 1.47:
add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.
 1.46.2.1 08-Apr-1999  chs branches: 1.46.2.1.2;
file machdep.c was added on branch netbsd-1-4 on 1999-04-16 16:25:36 +0000
 1.46.2.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.46.2.1.2.1 locked by: joerg; 08-Apr-1999  thorpej file machdep.c was added on branch netbsd-1-4 on 1999-06-21 01:03:21 +0000
 1.52.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.52.4.1 15-Nov-1999  fvdl Sync with -current
 1.52.2.5 27-Mar-2001  bouyer Sync with HEAD.
 1.52.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.52.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.52.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.52.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.56.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.57.2.1 15-Dec-2000  he Pull up revision 1.61 (requested by tsutsui):
Make PROM boot command work properly even after halt on 3/80.
 1.63.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.63.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.71.2.5 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.71.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.71.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.71.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.71.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.74.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.76.4.12 11-Nov-2002  nathanw Catch up to -current
 1.76.4.11 18-Oct-2002  nathanw Catch up to -current.
 1.76.4.10 17-Sep-2002  nathanw Catch up to -current.
 1.76.4.9 27-Aug-2002  nathanw Catch up to -current.
 1.76.4.8 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.76.4.7 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.76.4.6 20-Jun-2002  nathanw Catch up to -current.
 1.76.4.5 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.76.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.76.4.3 02-Dec-2001  scw If an FPU is available, call m68k_make_fpu_idle_frame() to generate
a reference FPU idle frame.
 1.76.4.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.76.4.1 11-Sep-2001  scw file machdep.c was added on branch nathanw_sa on 2001-11-18 19:39:05 +0000
 1.78.4.3 31-Aug-2002  gehenna catch up with -current.
 1.78.4.2 30-May-2002  gehenna Catch up with -current.
 1.78.4.1 17-May-2002  gehenna Replace the access to devsw table and the hard-coded major with devsw API.
 1.89.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.89.2.6 01-Apr-2005  skrll Sync with HEAD.
 1.89.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.89.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.89.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.89.2.2 03-Aug-2004  skrll Sync with HEAD
 1.89.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.96.8.1 29-Apr-2005  kent sync with -current
 1.97.2.2 27-Feb-2005  tsutsui Add a missing third arg (align) of uvm_km_alloc() for the new API world.
 1.97.2.1 12-Feb-2005  yamt use new apis.
 1.101.2.4 03-Sep-2007  yamt sync with head.
 1.101.2.3 26-Feb-2007  yamt sync with head.
 1.101.2.2 30-Dec-2006  yamt sync with head.
 1.101.2.1 21-Jun-2006  yamt sync with head.
 1.102.22.2 22-Oct-2006  yamt sync with head
 1.102.22.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.102.20.2 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.102.20.1 18-Nov-2006  ad Sync with head.
 1.105.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.105.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.108.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.108.4.1 11-Jul-2007  mjf Sync with head.
 1.108.2.1 09-Jun-2007  ad Sync with head.
 1.109.10.1 06-Nov-2007  matt sync with HEAD
 1.110.24.1 03-Jul-2008  simonb Sync with head.
 1.110.22.3 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.110.22.2 14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.
 1.110.22.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.110.20.3 11-Mar-2010  yamt sync with head
 1.110.20.2 19-Aug-2009  yamt sync with head.
 1.110.20.1 04-May-2009  yamt sync with head.
 1.110.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.110.16.1 02-Jul-2008  mjf Sync with HEAD.
 1.111.6.1 02-Feb-2009  snj Pull up following revision(s) (requested by ad in ticket #346):
sys/arch/alpha/alpha/machdep.c: revision 1.311
sys/arch/amiga/amiga/machdep.c: revision 1.211
sys/arch/atari/atari/machdep.c: revision 1.153
sys/arch/hp700/hp700/machdep.c: revision 1.53
sys/arch/i386/i386/dumpsys.c: revision 1.5
sys/arch/mips/mips/mips_machdep.c: revision 1.206
sys/arch/mvme68k/mvme68k/machdep.c: revision 1.132
sys/arch/news68k/news68k/machdep.c: revision 1.75
sys/arch/next68k/next68k/machdep.c: revision 1.88
sys/arch/sparc/sparc/machdep.c: revision 1.285
sys/arch/sparc64/sparc64/machdep.c: revision 1.230
sys/arch/sun2/sun2/machdep.c: revision 1.56
sys/arch/sun3/sun3/machdep.c: revision 1.188
sys/arch/sun3/sun3x/machdep.c: revision 1.114
sys/arch/x68k/x68k/machdep.c: revision 1.153
dumpsys: don't spew numbers into the log.
 1.111.4.2 03-Mar-2009  skrll Sync with HEAD.
 1.111.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.111.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.117.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.122.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.122.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.123.2.3 31-May-2011  rmind sync with head
 1.123.2.2 05-Mar-2011  rmind sync with head
 1.123.2.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.124.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.125.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.125.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.128.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.130.6.1 18-Feb-2012  mrg merge to -current.
 1.130.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.130.2.2 30-Oct-2012  yamt sync with head
 1.130.2.1 17-Apr-2012  yamt sync with head
 1.133.4.1 18-May-2014  rmind sync with head
 1.133.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.135.30.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.135.30.1 10-Jun-2019  christos Sync with HEAD
 1.135.20.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.135.10.1 20-Jul-2016  pgoyette Adapt the machine/arch dependent code to the new {b,c}devsw reference
counting.

XXX Most of these will require testing by someone other than myself, as
I have a limited selection of hardware!
 1.140.2.1 02-Aug-2025  perseant Sync with HEAD
 1.36 12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.35 08-Feb-2011  rmind branches: 1.35.2;
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.34 15-Oct-2010  tsutsui branches: 1.34.2; 1.34.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.33 04-Mar-2007  tsutsui branches: 1.33.64; 1.33.66;
Use (char *) casts.

Umm, vmmap on sun3/sun3x is vaddr_t, not (char *)...
 1.32 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.31 11-Dec-2005  christos branches: 1.31.26;
merge ktrace-lwp.
 1.30 22-Jan-2005  chs branches: 1.30.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.29 07-Aug-2003  agc branches: 1.29.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.28 15-Jul-2003  lukem __KERNEL_RCSID()
 1.27 01-Apr-2003  thorpej branches: 1.27.2;
Use PAGE_SIZE rather than NBPG.
 1.26 23-Oct-2002  jdolecek merge kqueue branch into -current

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

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

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.25 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.24 27-Feb-2002  simonb branches: 1.24.8;
s/DEL_ZERO/DEV_ZERO/
 1.23 27-Feb-2002  christos - Use DEV_ constants, instead of documenting the numbers!
- Delete cdev_decl(mm); where appropriate, and other hand-crufting [hi powerpc!]
 1.22 10-Sep-2001  chris branches: 1.22.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.21 05-Sep-2001  tsutsui branches: 1.21.2;
bcopy() -> memcpy(), bzero() -> memset()
 1.20 05-Sep-2001  tsutsui - vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.19 24-Apr-2001  thorpej branches: 1.19.2;
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.18 29-Jun-2000  mrg branches: 1.18.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.17 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.16 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.15 04-Dec-1999  ragge branches: 1.15.4;
CL* discarding.
 1.14 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.13 27-Mar-1999  mycroft branches: 1.13.8; 1.13.10; 1.13.14;
Oops; vm_offset_t -> vaddr_t.
 1.12 26-Mar-1999  mycroft Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.11 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.10 19-Nov-1998  mrg fix problems in many d_mmap routines:
- returned EOPNOTSUPP rather than -1.
- no check for negative offset.
many of these fix potential security problems in these drivers.


XXX XXX XXX
the d_mmap cdev routine should be changed to have a prototype like:
paddr_t (*d_mmap) __P((dev_t, off_t, int));

by someone!
 1.9 09-Jun-1998  gwr First cut at UVM support. Compiles, but not tested yet.
 1.8 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.7 25-Apr-1997  gwr branches: 1.7.4;
Add /dev/leds support.
 1.6 24-Mar-1997  gwr Change continue to break in a few places (as suggested by mycroft).
 1.5 18-Mar-1997  gwr Sync with the sun3 version.
 1.4 05-Mar-1997  gwr Allow access to the PROM via /dev/kmem (like the sparc port)
 1.3 02-Feb-1997  thorpej branches: 1.3.4;
zeropage -> devzeropage, and make it static.
 1.2 23-Jan-1997  gwr Use <machine/machdep.h>
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.3.4.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.7.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.13.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.10.1 15-Nov-1999  fvdl Sync with -current
 1.13.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.15.4.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.18.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.19.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.19.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.19.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.21.2.2 10-Oct-2001  fvdl Convert all remaining devices.
 1.21.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.22.4.4 11-Nov-2002  nathanw Catch up to -current
 1.22.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.22.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.22.4.1 10-Sep-2001  nathanw file mem.c was added on branch nathanw_sa on 2002-02-28 04:12:25 +0000
 1.24.8.1 17-May-2002  gehenna Add the character device switch.
 1.27.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.27.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.27.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.27.2.1 03-Aug-2004  skrll Sync with HEAD
 1.29.8.1 29-Apr-2005  kent sync with -current
 1.30.8.1 03-Sep-2007  yamt sync with head.
 1.31.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.33.66.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.33.64.2 30-Oct-2010  uebayasi Implement pmap_physload_device(9) to replace xmd(4) MD backend.
Implement pmap_mmap(9) and use it from mem(4) and xmd(4).
 1.33.64.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.34.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.34.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.35.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.5 18-May-2007  tsutsui Remove an obsolete file. (superseded by MI mk48txx(4))
 1.4 11-Dec-2005  christos branches: 1.4.30; 1.4.32; 1.4.38;
merge ktrace-lwp.
 1.3 07-Aug-2003  agc branches: 1.3.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.2 25-Apr-1997  gwr branches: 1.2.50;
Provide a struct representing only the clock.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.2.50.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.50.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.50.1 03-Aug-2004  skrll Sync with HEAD
 1.3.16.1 03-Sep-2007  yamt sync with head.
 1.4.38.1 22-May-2007  matt Update to HEAD.
 1.4.32.1 11-Jul-2007  mjf Sync with head.
 1.4.30.2 09-Jun-2007  ad Sync with head.
 1.4.30.1 27-May-2007  ad Sync with head.
 1.3 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.2 12-Jun-2011  rmind branches: 1.2.2; 1.2.4; 1.2.14; 1.2.18;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.1 18-Mar-2010  rmind branches: 1.1.2;
file mm_md.c was initially added on branch rmind-uvmplock.
 1.1.2.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.2.18.1 18-May-2014  rmind sync with head
 1.2.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.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.2.2.2 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.2.2.1 12-Jun-2011  cherry file mm_md.c was added on branch cherry-xenmp on 2011-06-23 14:19:45 +0000
 1.36 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.35 24-Apr-2021  thorpej branches: 1.35.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.34 06-Sep-2013  tsutsui branches: 1.34.44;
Tab/whitespace cleanup.
 1.33 13-Oct-2012  tsutsui branches: 1.33.2;
struct device * -> device_t, struct cfdata * -> cfdata_t
use device_xname() (from chs@)
 1.32 28-Jun-2008  tsutsui branches: 1.32.30; 1.32.40;
Split softc/device_t, with misc cosmetic changes.
 1.31 28-Apr-2008  martin branches: 1.31.2; 1.31.4;
Remove clause 3 and 4 from TNF licenses
 1.30 01-Dec-2007  tsutsui branches: 1.30.14; 1.30.16; 1.30.18;
- use __arraycount()
- some KNF
- use __func__ to print function names
 1.29 03-Feb-2007  tsutsui branches: 1.29.6; 1.29.22; 1.29.24; 1.29.30;
Prepare bus_dma(9) structures for sun3x obio devices.
 1.28 03-Oct-2006  tsutsui - change find_prom_map() to take paddr_t and return vaddr_t rather than
bus_space_handle_t since bus space handle without bus space tag looks weird
- replace old sun3 obio_find_mapping() with new common find_prom_map()
- add bus_space_vaddr(), from hp300
 1.27 01-Oct-2006  tsutsui First attempt at bus_space(9) support for sun3 with common sun68k/bus.c:
- make sun3 port use common sun68k files as much as possible
- add temporary options _SUN2_ in std.sun2 until sun3 can share all
sun68k files (autoconf.c and isr.c are not yet)
- move sun68kvme declaration temporary as well from files.sun68k to files.sun2
- rename and move sun68k_find_prom_map() function to MD sources since it
can't be shared with sun3
- add bus tag members to struct confargs and initilize them where appropriate

XXX1: MD bus_dma(9) backends are not implemented (yet).
XXX2: more code (obio etc.) should be shared among sun3, sun3x and sun2.
 1.26 11-Dec-2005  christos branches: 1.26.20; 1.26.22;
merge ktrace-lwp.
 1.25 26-Aug-2005  drochner s/locdesc_t/int/g
 1.24 28-Jun-2005  drochner branches: 1.24.2;
convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose
(untested, sorry)
 1.23 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.22 15-Jul-2003  lukem branches: 1.22.8;
__KERNEL_RCSID()
 1.21 01-Apr-2003  thorpej branches: 1.21.2;
Use PAGE_SIZE rather than NBPG.
 1.20 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.19 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.18 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.17 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.16 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.15 27-Sep-2002  thorpej 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.14 05-Sep-2001  tsutsui branches: 1.14.6;
obio_find_mapping() takes PA. (missed in the previous commit)
 1.13 05-Sep-2001  tsutsui - vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.12 02-Nov-2000  tsutsui branches: 1.12.4;
Fix typo in comment.
 1.11 06-Apr-1999  gwr branches: 1.11.2; 1.11.8;
Add the address of the DMA gate array (used by the esp driver).
 1.10 08-Feb-1998  gwr Improve some diagnostics.
 1.9 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.8 12-Jan-1998  thorpej branches: 1.8.4;
Update for config changes.
 1.7 04-Oct-1997  gwr Move the call to cninit() up a level (easier to find).
 1.6 28-Apr-1997  gwr branches: 1.6.4;
Add a comment about obio_mapin().
 1.5 25-Apr-1997  gwr Change the OBIO address probe order a little, to allow determination of
which kind of idprom and clock we have (3/80 vs 3/470 differences).
Fix a bug where obio_submatch() failed to copy some locators.
Rename obio_alloc to obio_mapin. Add lots of comments.
 1.4 21-Feb-1997  gwr Add OBIO_EMULEX_SCSI, and some comments about attach order.
 1.3 27-Jan-1997  gwr branches: 1.3.4;
Kill sunmon.h
 1.2 25-Jan-1997  gwr Use sunmon_abort() instead of mon_panic().
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.3.4.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.6.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.8.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.11.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.11.2.2 06-Apr-1999  gwr Add the address of the DMA gate array (used by the esp driver).
 1.11.2.1 06-Apr-1999  gwr file obio.c was added on branch netbsd-1-4 on 1999-04-06 02:07:52 +0000
 1.12.4.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.12.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.14.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.14.6.1 05-Sep-2001  nathanw file obio.c was added on branch nathanw_sa on 2002-10-18 02:40:27 +0000
 1.21.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.21.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.21.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.21.2.1 03-Aug-2004  skrll Sync with HEAD
 1.22.8.1 29-Apr-2005  kent sync with -current
 1.24.2.4 07-Dec-2007  yamt sync with head
 1.24.2.3 26-Feb-2007  yamt sync with head.
 1.24.2.2 30-Dec-2006  yamt sync with head.
 1.24.2.1 21-Jun-2006  yamt sync with head.
 1.26.22.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.26.20.2 09-Feb-2007  ad Sync with HEAD.
 1.26.20.1 18-Nov-2006  ad Sync with head.
 1.29.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.29.24.1 09-Jan-2008  matt sync with HEAD
 1.29.22.1 03-Dec-2007  joerg Sync with HEAD.
 1.29.6.1 03-Dec-2007  ad Sync with HEAD.
 1.30.18.2 04-May-2009  yamt sync with head.
 1.30.18.1 16-May-2008  yamt sync with head.
 1.30.16.1 18-May-2008  yamt sync with head.
 1.30.14.2 29-Jun-2008  mjf Sync with HEAD.
 1.30.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.31.4.1 03-Jul-2008  simonb Sync with head.
 1.31.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.32.40.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.40.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.32.30.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.30.1 30-Oct-2012  yamt sync with head
 1.33.2.1 18-May-2014  rmind sync with head
 1.34.44.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.34.44.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.35.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 06-Apr-1999  gwr branches: 1.6.2; 1.6.144; 1.6.146; 1.6.148;
Add the address of the DMA gate array (used by the esp driver).
 1.5 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.4 25-Apr-1997  gwr branches: 1.4.4;
Rename obio_alloc to obio_mapin, update *_init declarations.
Remove OBIO_P4_REG (not a fixed address, but per-device).
 1.3 09-Apr-1997  jeremy Location of printer port registers for 3/80 was off.
 1.2 27-Jan-1997  gwr Add OBIO_EMULEX_SCSI
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.4.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.6.148.1 16-May-2008  yamt sync with head.
 1.6.146.1 18-May-2008  yamt sync with head.
 1.6.144.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.2.2 06-Apr-1999  gwr Add the address of the DMA gate array (used by the esp driver).
 1.6.2.1 06-Apr-1999  gwr file obio.h was added on branch netbsd-1-4 on 1999-04-06 02:07:52 +0000
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 14-Jan-1997  gwr branches: 1.1.152; 1.1.154; 1.1.156;
Initial revision
 1.1.156.1 16-May-2008  yamt sync with head.
 1.1.154.1 18-May-2008  yamt sync with head.
 1.1.152.1 02-Jun-2008  mjf Sync with HEAD.
 1.123 11-May-2024  andvar s/pmap_bootstap_aalign/pmap_bootstrap_aalign/ in comment.
 1.122 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.121 31-May-2022  andvar fix various typos in comments, documentation and messages.
 1.120 04-May-2022  andvar fix various typos in comments and log messages.
 1.119 03-May-2022  andvar fix various typos, mainly s/trasfering/transferring/ and s/theese/these/.
 1.118 05-Dec-2021  msaitoh s/coresponding/corresponding/ in comment.
 1.117 19-Aug-2020  tsutsui Make sure pmap_kenter_pa(9) handles uncached mappings properly.

Fixes "cgfour(4) is mis-probed as bwtwo(4)" problem on 3/80
that has been broken since NetBSD 1.6.
Now Xorg 1.20 based Xsun 8bpp color server is confirmed working
on the cgfour(4).

Should be pulled up to netbsd-9.

XXX: all MD PMAP_NC flags should be replaced with MI PMAP_NOCACHE flag.
 1.116 05-Mar-2020  msaitoh miscelaneous -> miscellaneous in comment.
 1.115 21-Aug-2019  skrll Spell pmap_bootstrap in comments correctly
 1.114 22-Dec-2016  cherry branches: 1.114.16; 1.114.20;
switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.113 06-Sep-2013  tsutsui branches: 1.113.6; 1.113.10;
Tab/whitespace cleanup.
 1.112 03-Jun-2011  tsutsui branches: 1.112.2; 1.112.12; 1.112.16;
- remove simple_lock(9) and use atomic_ops(3) to account pmap reference count,
perrequest from rmind@
- while here no need to export struct pmap on sun2/sun3/sun3x

No particular problem for a week on hp300 and sun3x kernels with disabled
tcp_vtw which has been broken for a month on low memory machines.
 1.111 15-Oct-2010  tsutsui branches: 1.111.2; 1.111.6;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.110 26-Nov-2009  matt branches: 1.110.2; 1.110.4;
Kill proc0paddr. Use lwp0.l_addr instead.
 1.109 21-Nov-2009  rmind Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.108 07-Nov-2009  cegger Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
 1.107 21-Oct-2009  rmind Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
 1.106 11-Aug-2009  matt Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)
 1.105 25-Apr-2009  tsutsui Remove an extra whitespace.
 1.104 21-Apr-2009  cegger change pmap flags argument from int to u_int.
discussed with christos@ on source-changes-d@
 1.103 18-Mar-2009  cegger bcopy -> memcpy
 1.102 18-Mar-2009  cegger bzero -> memset
 1.101 10-Dec-2008  pooka branches: 1.101.2;
Make kernel_pmap_ptr a const. Requested by steve_martin.
 1.100 09-Dec-2008  pooka Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module. pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
 1.99 28-Apr-2008  martin branches: 1.99.6; 1.99.8;
Remove clause 3 and 4 from TNF licenses
 1.98 17-Oct-2007  garbled branches: 1.98.16; 1.98.18; 1.98.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.97 18-May-2007  tsutsui branches: 1.97.10;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.96 12-Mar-2007  ad branches: 1.96.2; 1.96.8;
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
 1.95 22-Feb-2007  thorpej branches: 1.95.4;
TRUE -> true, FALSE -> false
 1.94 21-Feb-2007  thorpej Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.93 24-Nov-2006  christos branches: 1.93.4;
fix spelling of accommodate; from Zapher.
 1.92 20-Sep-2006  tsutsui - move internal function declarations from pmap_pvt.h to pmap.c itself
- make some local functions static inline
- KNF a bit
 1.91 16-Sep-2006  tsutsui branches: 1.91.2;
Handle unwiring page cases properly in pmap_enter(9) and pmap_remove(9).
Previously sun3x pmap assumed that pmap_unwire(9) was the only interface
which should handle unwiring page, but nowadays apparently it isn't true.
Fixes a longstanding "panic: get_a_table: out of A tables"
(and also B, C tables) problem on my 3/80.

While here, make this compile with PMAP_DEBUG.
 1.90 10-May-2006  skrll branches: 1.90.6; 1.90.8;
Fix a bunch of cast lvalues.
 1.89 11-Dec-2005  christos branches: 1.89.4; 1.89.6; 1.89.8; 1.89.10; 1.89.12;
merge ktrace-lwp.
 1.88 03-Jun-2005  tsutsui branches: 1.88.2;
Fix shadowing variable warnings.
 1.87 29-May-2005  chs in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.86 22-Jan-2005  chs branches: 1.86.6;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.85 16-May-2004  wiz branches: 1.85.4;
"panicking" needs a k.
 1.84 26-Sep-2003  wiz branches: 1.84.2; 1.84.4;
Process has only one c. From miod@openbsd.
 1.83 15-Jul-2003  lukem __KERNEL_RCSID()
 1.82 23-Jun-2003  martin branches: 1.82.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.81 10-May-2003  thorpej Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

There were some side-effects that I didn't anticipate, and fixing them
is proving to be more difficult than I thought, do just eject for now.
Maybe one day we can look at this again.

Fixes PR kern/21517.
 1.80 08-May-2003  thorpej Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM. Machine-dependent code is
responsible for initializing them before main() is called. Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
 1.79 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.78 28-Jan-2003  wiz eventually, not eventualy. Noted by mjl.
 1.77 28-Jan-2003  wiz success, not sucess. Noted by mjl.
 1.76 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.75 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.74 08-Mar-2002  thorpej Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map). Try to deal with this:

* Group all information about the backend allocator for a pool in a
separate structure. The pool references this structure, rather than
the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
to become available, but will still fail if it cannot callocate KVA
space for the pages. If this happens, carefully drain all pools using
the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
some pages, and use that information to make draining easier and more
efficient.
* Get rid of PR_URGENT. There was only one use of it, and it could be
dealt with by the caller.

From art@openbsd.org.
 1.73 10-Sep-2001  chris branches: 1.73.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.72 07-Sep-2001  tsutsui Fix function names in panic messages.
 1.71 05-Sep-2001  tsutsui branches: 1.71.2;
bcopy() -> memcpy(), bzero() -> memset()
 1.70 20-Aug-2001  wiz precede, not preceed.
 1.69 03-Jul-2001  chs branches: 1.69.2;
vm_offset_t -> [pv]addr_t.
implement pmap_k{enter_pa,remove}() correctly.
general cleanup.
 1.68 19-Jun-2001  wiz `existent', not `existant'
 1.67 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.66 25-Apr-2001  thorpej Garbage-collect pmap_page_index().
 1.65 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.64 23-Apr-2001  thorpej Add local prototype for internal pmap_bootstrap_alloc() function.
 1.63 22-Apr-2001  thorpej Remove pmap_kenter_pgs(). It was never really adopted by
anything, and the interface itself wasn't as flexible as
callers would have probably liked.
 1.62 21-Apr-2001  thorpej #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
 1.61 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.60 20-Feb-2001  tsutsui branches: 1.60.2;
Adjust only avail_end address rather than reduce
the last bank size of avail_mem[] so that all RAM area
will be dumped in dumpsys().
 1.59 03-Feb-2001  tsutsui Remove declaration of copypage() and zeropage(); they are in <m68k/m68k.h>
 1.58 14-Jan-2001  thorpej splimp() -> splvm()
 1.57 24-Nov-2000  tsutsui PAGE_SIZE on sun3/sun3x is now constant;
Use uvmexp.pagesize itself for its initialization.
 1.56 27-Oct-2000  tsutsui Use pool(9) for pmap structures.
 1.55 21-Oct-2000  tsutsui Initialize pmap->pm_refcount properly in pmap_pinit() and
add simple_locks where pmap->pm_refcount are refered.

This should fix a long-standing "out of space kmem_map" panic bug on sun3x.
 1.54 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.53 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.52 17-Dec-1999  jeremy branches: 1.52.4;
Renamed a temporary variable in pmap_enter() that conflicted with the
name of the new 'flags' argument, added as part of the new pmap_enter() API.
Added a comment which explains why there are still sun3x-specific flags
being passed in the unused bits of the physical address, and how these flags
are independent of the new 'flags' argument.
 1.51 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.50 19-Sep-1999  chs branches: 1.50.2; 1.50.4; 1.50.8;
fix something that was missed in the PMAP_NEW cleanup.
 1.49 12-Sep-1999  chs eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
 1.48 08-Jul-1999  thorpej Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.47 17-Jun-1999  thorpej pmap_change_wiring() -> pmap_unwire().
 1.46 17-Jun-1999  thorpej Remove pmap_pageable(); no pmap implements it, and it is not really useful,
because pmap_enter()/pmap_change_wiring() (soon to be pmap_unwire())
communicate the information in greater detail.
 1.45 08-Apr-1999  gwr branches: 1.45.2; 1.45.4;
Add opt_ddb.h
 1.44 26-Mar-1999  mycroft Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.43 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.42 26-Feb-1999  is sun3 part of fix for PR 6152
 1.41 16-Jan-1999  chuck MNN is no longer optional, remove dead code
 1.40 12-Dec-1998  gwr Fix MACHINE_NEW_NONCONTIG support (UVM works now:)
thanks to Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Closes PR#6540
 1.39 08-Jul-1998  thorpej Define one page free list, and put all pages on it.
 1.38 09-Jun-1998  gwr First cut at UVM support. Compiles, but not tested yet.
 1.37 09-Jun-1998  gwr First cut at MACHINE_NEW_NONCONTIG - not enabled yet.
 1.36 19-May-1998  thorpej It is no longer necessary for pmap_pinit() and pmap_release() to be
pmap interface functions, as NetBSD no longer uses statically allocated
pmaps (except for the kernel pmap, which is special-cased anyhow).
 1.35 09-Feb-1998  jeremy Modified the comments for the recentlty implemented pmap_map() function.
 1.34 08-Feb-1998  gwr Add pmap_map
 1.33 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.32 22-Jan-1998  gwr branches: 1.32.4;
In pmap_bootstrap_copyprom, copy only the last PTE from the PROM's
DVMA segment (for the page reserved by the PROM). If we copy all
the mappings, pmap_enter_kernel may complain about finding valid
PTEs that are not recorded in our PV lists. Make pmap_remove_pte
do something reasonable if it finds a PTE for a managed page that
has not been recorded in the PV lists. (Plus other minor stuff).
 1.31 22-Jan-1998  gwr Separate pmap_activate() from _pmap_switch(), so the latter can remain
equivalent to what locore.s:cpu_switch does with in-line assembly when
PMAP_DEBUG is not defined. Also do splimp/splx in pmap_activate.
 1.30 02-Jan-1998  thorpej Make pmap_activate() take a proc *.
 1.29 23-Oct-1997  gwr Remove the for-loop that wants to map multiple msgbuf pages.
Multiple msgbuf pages will not work without a redesign of
the kernel VM layout, so let's not pretend we can do it.
 1.28 05-Oct-1997  gwr Do the cpu_kcore_hdr initialization a little differently.
(also fix - was not setting pg_frame, pg_valid)
 1.27 19-Sep-1997  leo Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.26 02-Jul-1997  jeremy branches: 1.26.2;
Implement pmap and va caching within C table managers to help speed
up PV->(pmap,va) operations.
 1.25 10-Jun-1997  veego s/_round_page/m68k_round_page/ s/_trunc_page/m68k_trunc_page/
s/_btop/m68k_btop/ s/_ptob/m68k_ptob/
 1.24 30-May-1997  jeremy Undo changes which make pmap_xxxx_page() functions re-entrant; just block
all interrupts which might cause re-entrancy.

Allow virtual addresses which are not managed by the MI VM system to
participate in the PV system.

Remove a few frivoulous TLB cache flushes.
 1.23 28-May-1997  jeremy Added new lock system for the two virtual pages used in temporary mappings.
Allows pmap_zero_page() and pmap_copy_page() to be re-entrant.
 1.22 20-May-1997  jeremy Implement code to dynamically size the number of page tables based on available
RAM at boot.

Also did some cleanup of unused functions, updated several comments, and
removed unecessary 'XXX's.
 1.21 01-May-1997  gwr Implement pmap_pa_exists() so that /dev/mem works.
This was the reason ps (kvm_getargs) did not work.
 1.20 09-Apr-1997  thorpej Adjust for new kcore.h
 1.19 01-Apr-1997  jeremy Physical page status functions pmap_clear_reference()
and pmap_clear_modify() weren't testing if the page whose status was being
changed was being managed. This caused kernel panics with X11.
 1.18 26-Mar-1997  gwr fix a warning
 1.17 21-Mar-1997  gwr First cut at crashdump support.
 1.16 13-Mar-1997  gwr s/sun3x_/_/ in sun3x_(round|trunc)_(page|seg) macros
 1.15 06-Mar-1997  gwr Get the numbers of kernel MMU tables right.
 1.14 06-Mar-1997  gwr Clean out some junk I forgot to remove last time...
 1.13 06-Mar-1997  gwr Add pmap_bootstrap_setprom() with sets the PROM level-A tables to
allow the PROM monitor to see mappings in kernel space. This also
fixes a problem with exiting to the monitor with the stack pointer
set to some place in kernel space. Also fix NUM_KERN_PTES, and
change get_pte() so it works on any virtual address.
 1.12 02-Mar-1997  jeremy Took switch statement out of main loop in pmap_protect() and explained more
of the rationale behind it.
 1.11 22-Feb-1997  jeremy Rewrite pmap_remove() to be speedier with large address spaces.
 1.10 19-Feb-1997  jeremy Update copyright and fix typos in macro definition used when not debugging.
 1.9 16-Feb-1997  gwr Fix a major bug in pmap_remove_kernel() that causd the removal of
one page too many (worse, it unmapped our stack page... Ouch!)
Also, use loadcrp() and such instead of calling pmap_activate
in various places so we have more control over TLB flush.
Now pmap_activate() is called only by locore (and that call is
done only if PMAP_DEBUG is defined). Other minor clean-up...
 1.8 14-Feb-1997  gwr Add pmap_count(), fix some bugs... (from Jeremy).
 1.7 12-Feb-1997  gwr Latest version from Jeremy. Changes too numerous to describe here.
 1.6 02-Feb-1997  thorpej branches: 1.6.4;
Use copypage() and zeropage() in the right places.
 1.5 27-Jan-1997  gwr Change "machdep.h" to <machine/machdep.h>
 1.4 17-Jan-1997  gwr Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.
 1.3 16-Jan-1997  gwr Move declaration of struct mmu_rootptr to mc68851.h
Kill a cast that is now unnecessary.
 1.2 14-Jan-1997  gwr Punt some historical stuff that was ifdefed out.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.6.4.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.26.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.26.2.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.32.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.45.4.2 02-Aug-1999  thorpej Update from trunk.
 1.45.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.45.2.2 17-Jan-2001  he Pull up revision 1.55 (requested by tsutsui):
Properly handle pmap->pm_refcount (initialize and lock before
access). Should fix long-standing "out of space in kmem_map"
bug on sun3x.
 1.45.2.1 08-Apr-1999  he file pmap.c was added on branch netbsd-1-4 on 2001-01-17 16:37:46 +0000
 1.50.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.50.4.1 15-Nov-1999  fvdl Sync with -current
 1.50.2.8 23-Apr-2001  bouyer Sync with HEAD.
 1.50.2.7 27-Mar-2001  bouyer Sync with HEAD.
 1.50.2.6 12-Mar-2001  bouyer Sync with HEAD.
 1.50.2.5 11-Feb-2001  bouyer Sync with HEAD.
 1.50.2.4 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.50.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.50.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.50.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.52.4.1 21-Oct-2000  tv Pullup 1.55 [tsutsui]:
Initialize pmap->pm_refcount properly in pmap_pinit() and
add simple_locks where pmap->pm_refcount are refered.

This should fix a long-standing "out of space kmem_map" panic bug on sun3x.
 1.60.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.60.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.69.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.69.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.69.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.71.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.73.4.6 11-Nov-2002  nathanw Catch up to -current
 1.73.4.5 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.73.4.4 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.73.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.73.4.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.73.4.1 10-Sep-2001  scw file pmap.c was added on branch nathanw_sa on 2001-11-18 19:39:05 +0000
 1.82.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.82.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.82.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.82.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.82.2.1 03-Aug-2004  skrll Sync with HEAD
 1.84.4.1 08-Jun-2005  tron Pull up revision 1.87 (requested by chs in ticket #1980):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.84.2.1 08-Jun-2005  tron Pull up revision 1.87 (requested by chs in ticket #1980):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.85.4.1 29-Apr-2005  kent sync with -current
 1.86.6.2 23-Oct-2006  ghen Pull up following revision(s) (requested by tsutsui in ticket #1518):
sys/arch/sun3/sun3x/pmap.c: revision 1.91
sys/arch/sun3/sun3x/pmap.c: revision 1.88
Fix shadowing variable warnings.
Handle unwiring page cases properly in pmap_enter(9) and pmap_remove(9).
Previously sun3x pmap assumed that pmap_unwire(9) was the only interface
which should handle unwiring page, but nowadays apparently it isn't true.
Fixes a longstanding "panic: get_a_table: out of A tables"
(and also B, C tables) problem on my 3/80.
While here, make this compile with PMAP_DEBUG.
 1.86.6.1 06-Jun-2005  tron Pull up revision 1.87 (requested by chs in ticket #424):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.88.2.4 03-Sep-2007  yamt sync with head.
 1.88.2.3 26-Feb-2007  yamt sync with head.
 1.88.2.2 30-Dec-2006  yamt sync with head.
 1.88.2.1 21-Jun-2006  yamt sync with head.
 1.89.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.89.10.1 11-May-2006  elad sync with head
 1.89.8.1 24-May-2006  yamt sync with head.
 1.89.6.1 01-Jun-2006  kardel Sync with head.
 1.89.4.1 09-Sep-2006  rpaulo sync with head
 1.90.8.2 12-Jan-2007  ad Sync with head.
 1.90.8.1 18-Nov-2006  ad Sync with head.
 1.90.6.1 23-Sep-2006  snj Pull up following revision(s) (requested by tsutsui in ticket #171):
sys/arch/sun3/sun3x/pmap.c: revision 1.91
Handle unwiring page cases properly in pmap_enter(9) and pmap_remove(9).
Previously sun3x pmap assumed that pmap_unwire(9) was the only interface
which should handle unwiring page, but nowadays apparently it isn't true.
Fixes a longstanding "panic: get_a_table: out of A tables"
(and also B, C tables) problem on my 3/80.
While here, make this compile with PMAP_DEBUG.
 1.91.2.2 10-Dec-2006  yamt sync with head.
 1.91.2.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.93.4.2 24-Mar-2007  yamt sync with head.
 1.93.4.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.95.4.2 27-May-2007  ad Sync with head.
 1.95.4.1 13-Mar-2007  ad Sync with head.
 1.96.8.1 22-May-2007  matt Update to HEAD.
 1.96.2.1 11-Jul-2007  mjf Sync with head.
 1.97.10.1 06-Nov-2007  matt sync with HEAD
 1.98.20.4 11-Mar-2010  yamt sync with head
 1.98.20.3 19-Aug-2009  yamt sync with head.
 1.98.20.2 04-May-2009  yamt sync with head.
 1.98.20.1 16-May-2008  yamt sync with head.
 1.98.18.1 18-May-2008  yamt sync with head.
 1.98.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.98.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.99.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.99.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.99.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.101.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.110.4.2 12-Jun-2011  rmind sync with head
 1.110.4.1 05-Mar-2011  rmind sync with head
 1.110.2.2 30-Oct-2010  uebayasi Implement pmap_physload_device(9) to replace xmd(4) MD backend.
Implement pmap_mmap(9) and use it from mem(4) and xmd(4).
 1.110.2.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.111.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.111.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.112.16.1 18-May-2014  rmind sync with head
 1.112.12.2 03-Dec-2017  jdolecek update from HEAD
 1.112.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.112.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.113.10.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.113.6.1 05-Feb-2017  skrll Sync with HEAD
 1.114.20.1 26-Aug-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #1060):

sys/arch/sun3/sun3x/pmap.c: revision 1.117

Make sure pmap_kenter_pa(9) handles uncached mappings properly.

Fixes "cgfour(4) is mis-probed as bwtwo(4)" problem on 3/80
that has been broken since NetBSD 1.6.

Now Xorg 1.20 based Xsun 8bpp color server is confirmed working
on the cgfour(4).

Should be pulled up to netbsd-9.

XXX: all MD PMAP_NC flags should be replaced with MI PMAP_NOCACHE flag.
 1.114.16.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.114.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.16 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.15 28-Apr-2008  martin branches: 1.15.34; 1.15.44; 1.15.50;
Remove clause 3 and 4 from TNF licenses
 1.14 20-Sep-2006  tsutsui branches: 1.14.52; 1.14.54; 1.14.56;
- move internal function declarations from pmap_pvt.h to pmap.c itself
- make some local functions static inline
- KNF a bit
 1.13 11-Dec-2005  christos branches: 1.13.20; 1.13.22;
merge ktrace-lwp.
 1.12 22-Jan-2005  chs branches: 1.12.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.11 26-Sep-2003  tsutsui branches: 1.11.8;
TAB/space cleanup.
 1.10 23-Jun-2003  martin branches: 1.10.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.9 05-Sep-2001  tsutsui branches: 1.9.6;
vm_offset_t -> [pv]addr_t (sync with sun3x/pmap.c rev 1.69)
 1.8 19-Sep-1999  chs branches: 1.8.16;
fix a prototype that was missed in the pmap_extract() API change.
 1.7 17-Dec-1997  jeremy Pad out table manager structures so that all the members in the contiguous
table manager array allocated in pmap_startup() are properly aligned for
faster bus access.
 1.6 02-Jul-1997  jeremy branches: 1.6.6;
Implement pmap and va caching within C table managers to help speed
up PV->(pmap,va) operations.
 1.5 21-Mar-1997  gwr First cut at crashdump support.
 1.4 05-Mar-1997  gwr Add pmap_bootstrap_setprom
 1.3 14-Feb-1997  gwr Add pmap_count(), fix some bugs... (from Jeremy).
 1.2 12-Feb-1997  gwr Latest version from Jeremy. Changes too numerous to describe here.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr branches: 1.1.1.1.6;
Initial import. Gets as far as nfs_mountroot.
 1.1.1.1.6.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.6.6.1 18-Dec-1997  mellon Pull rev 1.7 up from trunk (jeremy)
 1.8.16.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.9.6.2 05-Sep-2001  tsutsui vm_offset_t -> [pv]addr_t (sync with sun3x/pmap.c rev 1.69)
 1.9.6.1 05-Sep-2001  tsutsui file pmap_pvt.h was added on branch nathanw_sa on 2001-09-05 12:15:22 +0000
 1.10.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.8.1 29-Apr-2005  kent sync with -current
 1.12.8.1 30-Dec-2006  yamt sync with head.
 1.13.22.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.13.20.1 18-Nov-2006  ad Sync with head.
 1.14.56.1 16-May-2008  yamt sync with head.
 1.14.54.1 18-May-2008  yamt sync with head.
 1.14.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.50.1 18-May-2014  rmind sync with head
 1.15.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.34.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.19 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.18 24-Apr-2021  thorpej branches: 1.18.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.17 06-Sep-2013  tsutsui branches: 1.17.44;
Tab/whitespace cleanup.
 1.16 13-Oct-2012  tsutsui branches: 1.16.2;
struct device * -> device_t, struct cfdata * -> cfdata_t
use device_xname() (from chs@)
 1.15 28-Jun-2008  tsutsui branches: 1.15.30; 1.15.40;
Split softc/device_t, with misc cosmetic changes.
 1.14 28-Apr-2008  martin branches: 1.14.2; 1.14.4;
Remove clause 3 and 4 from TNF licenses
 1.13 03-Feb-2007  tsutsui branches: 1.13.44; 1.13.46; 1.13.48;
Add bus_space(9) and bus_dma(9) glue to sun3 MD VME attachment
to test these APIs on TME.

XXX I hope these sun3 MD VME stuff will be replaced by MI VME driver soon.
 1.12 28-Mar-2006  thorpej branches: 1.12.8;
Use device_unit().
 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 30-Jun-2005  drochner branches: 1.10.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.9 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.8 15-Jul-2003  lukem branches: 1.8.8;
__KERNEL_RCSID()
 1.7 02-Oct-2002  thorpej branches: 1.7.6;
Add trailing ; to CFATTACH_DECL.
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 05-Feb-1998  gwr branches: 1.4.28; 1.4.32;
Merge arch/sun3x into arch/sun3
 1.3 12-Jan-1998  thorpej branches: 1.3.4;
Update for config changes.
 1.2 16-Oct-1997  gwr Add VME support
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.3.4.1 27-Jan-1998  gwr Support the new vme bus autoconfig design, etc.
 1.4.32.1 18-Oct-2002  nathanw Catch up to -current.
 1.4.28.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.7.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.7.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.8.1 29-Apr-2005  kent sync with -current
 1.10.2.2 26-Feb-2007  yamt sync with head.
 1.10.2.1 21-Jun-2006  yamt sync with head.
 1.11.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.11.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.11.8.1 01-Apr-2006  yamt 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.12.8.1 09-Feb-2007  ad Sync with HEAD.
 1.13.48.2 04-May-2009  yamt sync with head.
 1.13.48.1 16-May-2008  yamt sync with head.
 1.13.46.1 18-May-2008  yamt sync with head.
 1.13.44.2 29-Jun-2008  mjf Sync with HEAD.
 1.13.44.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.4.1 03-Jul-2008  simonb Sync with head.
 1.14.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.15.40.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.40.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.15.30.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.15.30.1 30-Oct-2012  yamt sync with head
 1.16.2.1 18-May-2014  rmind sync with head
 1.17.44.3 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.17.44.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.17.44.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.18.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 05-Feb-1998  gwr branches: 1.2.150; 1.2.152; 1.2.154;
Merge arch/sun3x into arch/sun3
 1.1 16-Oct-1997  gwr branches: 1.1.4;
VME support
 1.1.4.1 27-Jan-1998  gwr Support the new vme bus autoconfig design, etc.
 1.2.154.1 16-May-2008  yamt sync with head.
 1.2.152.1 18-May-2008  yamt sync with head.
 1.2.150.1 02-Jun-2008  mjf Sync with HEAD.

RSS XML Feed