Home | History | Annotate | only in /src/sys/arch/sun3/include
History log of /src/sys/arch/sun3/include
RevisionDateAuthorComments
 1.28 30-Nov-2024  christos Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.27 12-Jul-2018  maxv branches: 1.27.36;
Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

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

* Removes the PMC code of ARM XSCALE.

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

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

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

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.26 24-Dec-2015  christos branches: 1.26.16; 1.26.18;
fenv for m68k
 1.25 17-Jul-2011  joerg branches: 1.25.12; 1.25.30;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.24 09-Feb-2007  ad Merge newlock2 to head.
 1.23 26-Jul-2006  drochner branches: 1.23.4;
don't install <machine/db_machdep.h>, this is kernel only
 1.22 11-Dec-2005  christos branches: 1.22.4; 1.22.8;
merge ktrace-lwp.
 1.21 08-May-2004  kleink branches: 1.21.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.20 18-Jan-2003  thorpej branches: 1.20.2;
Merge the nathanw_sa branch.
 1.19 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.18 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.17 28-Nov-2001  kleink branches: 1.17.8;
No point in installing svr4_machdep.h.
 1.16 19-Sep-2001  thorpej branches: 1.16.4;
Just use <dev/sun/fbio.h>.
 1.15 28-May-2001  chs branches: 1.15.2; 1.15.4;
move the spl*() and IPL_* definitions to intr.h.
 1.14 15-Apr-2001  kleink Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.13 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.12 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
 1.11 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.10 26-Jun-2000  kleink branches: 1.10.2;
Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.9 29-Apr-2000  thorpej Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.8 17-Mar-2000  tron Install "machineendian_machdep.h".
 1.7 23-Dec-1999  kleink C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
 1.6 19-Apr-1999  kleink branches: 1.6.2;
Add COMPAT_SVR4 for m68k.
 1.5 15-Mar-1999  minoura branches: 1.5.4;
Pullin m68k/ieee.h.
 1.4 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.3 12-Jul-1998  veego Add elf_machdep.h to the INCS list.
 1.2 20-Jun-1998  mrg moved <machine/sun_disklabel.h> to <dev/sun/disklabel.h>
 1.1 12-Jun-1998  cgd Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
 1.5.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.6.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.6.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.10.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.15.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.15.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.15.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.16.4.5 11-Dec-2002  thorpej Sync with HEAD.
 1.16.4.4 13-Aug-2002  nathanw Catch up to -current.
 1.16.4.3 08-Jan-2002  nathanw Catch up to -current.
 1.16.4.2 10-Nov-2001  scw Kernel mcontext glue for Scheduler Activations on m68k from
Klaus Klein <kleink@netbsd.org>.
 1.16.4.1 19-Sep-2001  scw file Makefile was added on branch nathanw_sa on 2001-11-10 21:22:53 +0000
 1.17.8.1 31-Aug-2002  gehenna catch up with -current.
 1.20.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.20.2.1 03-Aug-2004  skrll Sync with HEAD
 1.21.12.2 26-Feb-2007  yamt sync with head.
 1.21.12.1 30-Dec-2006  yamt sync with head.
 1.22.8.1 11-Aug-2006  yamt sync with head
 1.22.4.1 09-Sep-2006  rpaulo sync with head
 1.23.4.1 01-Feb-2007  ad Header file cleanup.
 1.25.30.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.25.12.1 03-Dec-2017  jdolecek update from HEAD
 1.26.18.1 10-Jun-2019  christos Sync with HEAD
 1.26.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.27.36.1 02-Aug-2025  perseant Sync with HEAD
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.11 13-Dec-1996  gwr Files with just an include line do not need a wrapper.
 1.10 08-Oct-1996  cgd repoint at shared aout_machdep.h, not exec.h
 1.9 08-Sep-1996  thorpej Use <m68k/exec.h>.
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  gwr Remove some unnecessary junk.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.3 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.2 18-Oct-1993  pk Put definition of __LDPGSZ and `struct relocation_info' where they belong:
in <machine/exec.h>.
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.7 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.3 10-Aug-1993  glass fixed problem that caused two consecutive segments to be using the same
pmeg unknowingly. still too many printfs, not sure how many are actualy
in the machine dependent code. reaches cpu_startup() where it stops
deliberately. next project: autoconfig(), maybe kgdb
 1.2 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.27 13-Oct-2012  tsutsui struct device * -> device_t, struct cfdata * -> cfdata_t
use device_xname() (from chs@)
 1.26 28-Apr-2008  martin branches: 1.26.34; 1.26.44;
Remove clause 3 and 4 from TNF licenses
 1.25 04-Mar-2007  christos branches: 1.25.40; 1.25.42; 1.25.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.24 05-Oct-2006  tsutsui branches: 1.24.4;
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.23 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.22 11-Dec-2005  christos branches: 1.22.20; 1.22.22;
merge ktrace-lwp.
 1.21 26-Aug-2005  drochner s/locdesc_t/int/g
 1.20 03-Jul-2005  he branches: 1.20.2;
Make the bus_scan() prototype match the function declaration.
 1.19 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.18 08-Feb-1998  gwr branches: 1.18.48; 1.18.56;
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.17 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.16 28-Apr-1997  gwr branches: 1.16.10;
Declare peek_long().
 1.15 27-Jan-1997  gwr Let bus_mapin() return void *
 1.14 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.13 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.12 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.11 08-Oct-1996  jtc Add const qualifer to second arg of bus_print
 1.10 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.9 11-Jan-1995  gwr Cleanup
 1.8 13-Dec-1994  gwr Have working bus_peek(), and drivers use it.
 1.7 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.6 23-Nov-1994  gwr New cd_match prototype.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.16.10.1 27-Jan-1998  gwr Define bus types for OBIO, OBMEM, and every VME space.
(The Sun3X needs separate methods for each VME space.)
Use the same values on both Sun3 and Sun3X.
 1.18.56.1 29-Apr-2005  kent sync with -current
 1.18.48.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.48.1 24-Jan-2005  skrll Sync with HEAD.
 1.20.2.3 03-Sep-2007  yamt sync with head.
 1.20.2.2 30-Dec-2006  yamt sync with head.
 1.20.2.1 21-Jun-2006  yamt sync with head.
 1.22.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.22.20.1 18-Nov-2006  ad Sync with head.
 1.24.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.25.44.1 16-May-2008  yamt sync with head.
 1.25.42.1 18-May-2008  yamt sync with head.
 1.25.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.26.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.26.34.1 30-Oct-2012  yamt sync with head
 1.3 23-Nov-2002  kristerw Make this identical to the other m68k machine/bswap.h by including
m68k/bswap.h instead of sys/bswap.h.

Solves part of PR toolchain/18314.
 1.2 21-Aug-1999  simonb branches: 1.2.20; 1.2.30;
Include <sys/bswap.h> for function prototypes. i386, pc532 and vax
still include <machine/byte_swap.h> and define macros for some of
the bswap*() functions.
 1.1 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.2.30.1 19-Dec-2002  lukem Pull up revision 1.3 (requested by kristerw in ticket #1038):
Make this identical to the other m68k machine/bswap.h by including
m68k/bswap.h instead of sys/bswap.h.
Solves part of PR toolchain/18314.
 1.2.20.1 11-Dec-2002  thorpej Sync with HEAD.
 1.1 01-Oct-2006  tsutsui branches: 1.1.2; 1.1.4; 1.1.8;
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.1.8.2 30-Dec-2006  yamt sync with head.
 1.1.8.1 01-Oct-2006  yamt file bus.h was added on branch yamt-lazymbuf on 2006-12-30 20:47:12 +0000
 1.1.4.2 18-Nov-2006  ad Sync with head.
 1.1.4.1 01-Oct-2006  ad file bus.h was added on branch newlock2 on 2006-11-18 21:29:34 +0000
 1.1.2.2 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.1.2.1 01-Oct-2006  tsutsui file bus.h was added on branch yamt-splraiseipl on 2006-10-06 13:27:04 +0000
 1.2 24-Jan-1995  gwr Let the common file deal with multiple inclusion.
 1.1 19-Jan-1995  jtc This file, which will be included by <sys/cdefs.h>, will contain macros
such as __warn_references() and __weak_reference() which are actually
machine dependant. This will make it easier for ports that are being
bootstraped with ELF and ECOFF based toolchains.

This change also introduces a new macro, _C_LABEL(x). _C_LABEL expands
its argument, an identifier, to a character string of the identifier
name as it is represented in an object file.

For most ports, _C_LABEL(x) will expand to "_x", for ELF based ports
_C_LABEL(x) will expand to "x".
 1.7 28-Mar-2023  andvar s/interrput/interrupt/ and s/accesss/access/ in comments.
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 28-Sep-2003  cl u_int short -> u_short for gcc3
 1.4 03-May-2003  wiz branches: 1.4.2;
DMA, not dma nor Dma.
 1.3 07-Apr-1995  gwr First cut at cgtwo driver. Not quite right yet.
 1.2 21-Mar-1995  gwr correct the file name
 1.1 21-Mar-1995  gwr This is needed by the Xsun servers.
 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.19 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.18 06-Oct-1997  gwr branches: 1.18.4;
Use vm_offset_t to represent control space addresses, because
they are more like physical addresses in that you can not just
dereference a pointer to access the space. (Also, if you use a
pointer type for such things, gdb will _try_ to deference it.)
 1.17 28-Apr-1997  gwr branches: 1.17.4;
Fix declaration of get_control_byte().
 1.16 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.15 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.14 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.13 10-Oct-1995  gwr New function: set_segmap_allctx()
 1.12 11-Feb-1995  gwr minor cleanup
 1.11 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.8 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.7 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.6 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.5 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.4 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.3 27-Jul-1993  glass new pmap module
 1.2 29-Jun-1993  glass additional needed functionality
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.17.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.4.1 25-Jan-1998  gwr Now in ../sun3
 1.39 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.38 11-Dec-2005  christos branches: 1.38.20; 1.38.22;
merge ktrace-lwp.
 1.37 22-Jan-2005  chs branches: 1.37.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.36 22-Sep-2004  yamt branches: 1.36.4;
move some per-cpu data definitions to MI place so that they can be modified
without touching all ports. discussed on tech-kern@.
 1.35 04-Jan-2004  jdolecek Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
as FPU state), and is the last potentially blocking operation;
all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread
 1.34 22-Sep-2003  tsutsui Remove #ifdef _KERNEL inside #ifdef _KERNEL.
 1.33 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.32 18-Jan-2003  thorpej branches: 1.32.2;
Merge the nathanw_sa branch.
 1.31 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.30 14-May-2002  matt Eliminate more commons or redundant declarations.
 1.29 30-May-2001  mrg branches: 1.29.2; 1.29.8;
use _KERNEL_OPT
 1.28 22-Feb-2001  chs branches: 1.28.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.27 04-Feb-2001  tsutsui Move cachectl1() declaration from sun3/machdep.h to include/cpu.h;
it is refered by sys/compat/linux/arch/m68k/linux_machdep.c.

XXX: all declarations in machdep.h should be moved into cpu.h?
 1.26 03-Feb-2001  tsutsui Include <m68k/m68k.h> to use m68k common definitions.
 1.25 25-Aug-2000  thorpej Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity. Its use in
roundrobin() still needs some work.
 1.24 26-May-2000  thorpej First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

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

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

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

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

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.23 10-Aug-1999  thorpej branches: 1.23.2;
Define cpu_number() as discussed on tech-smp.
 1.22 20-Mar-1997  gwr This needs muli-include protection now.
 1.21 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.20 21-Dec-1995  mycroft Remove deprecated cpu_setstack().
 1.19 28-Jun-1995  cgd remove unused cpu_exec() definitions. moved "broken swap" markers, for
ports that still need it, to types.h.
 1.18 24-May-1995  gwr Update cpu_fork() to eliminate double mapping of kernel stacks.
 1.17 05-May-1995  cgd define BROKEN_SWAP and/or cpu_swapout as appropriate.
 1.16 22-Apr-1995  christos - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
 1.15 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.14 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.13 26-Oct-1994  cgd new RCS ID format.
 1.12 28-Jun-1994  gwr Make setsoft* use the real software interrupt register
provided on Sun machines (instead of simulating mtpr).
 1.11 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.10 10-May-1994  gwr Add CTL_MACHDEP stuff.
 1.9 06-May-1994  gwr Tracking 4.4 integration
 1.8 05-May-1994  gwr Track renamed proc flags.
 1.7 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.6 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.5 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.4 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.3 27-Jun-1993  glass fixed bug in mon.h; fixed NEED_* in cpu.h; spl macro problems
 1.2 26-Jun-1993  glass removed dumb define for enablertclock()
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.23.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.23.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.23.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.28.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.29.8.6 03-Dec-2002  gmcgarry Add missing prototypes.
 1.29.8.5 03-Dec-2002  gmcgarry Use cpu_proc_fork().
 1.29.8.4 11-Nov-2002  nathanw Catch up to -current
 1.29.8.3 20-Jun-2002  nathanw Catch up to -current.
 1.29.8.2 08-Dec-2001  thorpej Add a cpu_proc_fork(), called from uvm_proc_fork(), which takes care
of machine-dependent handling a fork() time (this is different from
forking the actual context in an LWP world). #define it away on
platforms which do not need it.

Problem noted by Gregory McGarry.
 1.29.8.1 30-May-2001  thorpej file cpu.h was added on branch nathanw_sa on 2001-12-08 08:22:43 +0000
 1.29.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.32.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.32.2.4 24-Sep-2004  skrll Sync with HEAD.
 1.32.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.32.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.32.2.1 03-Aug-2004  skrll Sync with HEAD
 1.36.4.1 29-Apr-2005  kent sync with -current
 1.37.8.1 30-Dec-2006  yamt sync with head.
 1.38.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.38.20.1 18-Nov-2006  ad Sync with head.
 1.8 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.7 27-Jan-1997  gwr branches: 1.7.14;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.6 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.7.14.1 25-Jan-1998  gwr Obsolete
 1.19 06-Nov-2017  christos Cleanup and clarify the ELFSIZE mess:

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

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

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

In sys/exec_elf.h, if ELFSIZE is not set, it is set to KERN_ELFSIZE
for the kernel and ARCH_ELFSIZE for userland. These defaults should
eliminate the need for most manual ELFSIZE setting.
 1.18 02-Feb-2012  tsutsui branches: 1.18.6;
Don't enable DB_MACHINE_COMMANDS on crash(8) (i.e. !defined(_KERNEL) case).
No easy way to switch sun3 and sun3x at run time for now.

Briefly tested by "build.sh -U -m sun3 build".
 1.17 11-Dec-2005  christos branches: 1.17.112; 1.17.116;
merge ktrace-lwp.
 1.16 03-Jun-2005  tsutsui Remove declarations for db_read_bytes() and db_write_bytes().
They are in <ddb/db_access.h>.
 1.15 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.14 13-May-2002  matt branches: 1.14.10; 1.14.18;
Nuke local extern label_t *db_recover; it's now in <ddb/db_extern.h>
 1.13 09-Nov-2001  thorpej branches: 1.13.2;
Remove unneeded declarations of the db_machine_init() function. The
ARM ports are the only ones that actually have one, and it is about
to change.
 1.12 05-Sep-2001  tsutsui branches: 1.12.4;
vm_offset_t -> db_addr_t
 1.11 22-Feb-2001  chs branches: 1.11.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.10 09-Jun-1998  tv branches: 1.10.14;
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.9 18-Jan-1997  gwr Add declaration for db_recover. Also fix copyright.
 1.8 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.7 07-Feb-1995  gwr Add ddb commands: machine {abort|halt|reboot}
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.3 09-Jan-1994  cgd stub
 1.2 10-Aug-1993  glass fixed problem that caused two consecutive segments to be using the same
pmeg unknowingly. still too many printfs, not sure how many are actualy
in the machine dependent code. reaches cpu_startup() where it stops
deliberately. next project: autoconfig(), maybe kgdb
 1.1 08-Aug-1993  glass various changes
 1.10.14.1 12-Mar-2001  bouyer Sync with HEAD.
 1.11.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.12.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.13.2.2 20-Jun-2002  nathanw Catch up to -current.
 1.13.2.1 09-Nov-2001  nathanw file db_machdep.h was added on branch nathanw_sa on 2002-06-20 03:41:43 +0000
 1.14.18.1 29-Apr-2005  kent sync with -current
 1.14.10.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.10.1 24-Jan-2005  skrll Sync with HEAD.
 1.17.116.1 18-Feb-2012  mrg merge to -current.
 1.17.112.1 17-Apr-2012  yamt sync with head
 1.18.6.1 03-Dec-2017  jdolecek update from HEAD
 1.9 30-Aug-2011  bouyer Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.6 15-Nov-2003  bouyer branches: 1.6.8;
Commit changes proposed on tech-kern Thu, 6 Nov 2003
- factor out disksubr.c between sun3, sparc and sparc64. Keep the sun3
groveling code to find a NetBSD disklabel in the first sector (so that it
can find a label at the old sun3 LABELOFFSET) as a fallback is not
label at LABELOFFSET, or sun label is present.
- Fix the sun3 LABELOFFSET (was 64, but the kernel wrote the NetBSD label at
128)
- Make next68k disksubr.c always write a next-compatible disklabel.
- remove #ifdef __sparc__ hack from disklabel(8), and change it to issue
a DIOCWDINFO after writing the disklabel to the raw partition in the
-r/-I case (so that the kernel can convert the label if needed).
 1.5 24-Oct-1998  kleink branches: 1.5.46;
Remove argument name from function declaration.
 1.4 04-Mar-1997  gwr Add declaration for isbad().
 1.3 10-Nov-1995  gwr branches: 1.3.8;
Fix a comment while I'm here...
 1.2 24-May-1995  gwr branches: 1.2.2;
Make struct cpu_disklabel hold the Sun disk label.
 1.1 14-Oct-1994  cgd move arch dependence to archs. clean up a bit. deal with weird MAXPARTITONS.
 1.2.2.1 10-Nov-1995  gwr Update from HEAD
 1.3.8.1 12-Mar-1997  is Merge in changes from The Trunk
 1.5.46.4 24-Jan-2005  skrll Sync with HEAD.
 1.5.46.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.46.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.46.1 03-Aug-2004  skrll Sync with HEAD
 1.6.8.1 29-Apr-2005  kent sync with -current
 1.13 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.12 04-Mar-2007  christos branches: 1.12.40; 1.12.42; 1.12.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11 11-Dec-2005  christos branches: 1.11.26;
merge ktrace-lwp.
 1.10 22-Jan-2005  chs branches: 1.10.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.9 05-Feb-1998  gwr branches: 1.9.48; 1.9.56;
Merge arch/sun3x into arch/sun3
 1.8 22-Jan-1998  gwr branches: 1.8.2;
Use the same names as the sun3x (DVMA_MAP_*)
 1.7 17-Oct-1997  gwr Make DVMA space pointers (void *) like the sun3x.
 1.6 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.5 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.4 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.3 20-Feb-1996  gwr use phys_map for DVMA like the sparc
 1.2 16-Feb-1996  gwr Fix comment
 1.1 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.8.2.1 27-Jan-1998  gwr Conditionally include *3.h or *3x.h as appropriate.
 1.9.56.1 29-Apr-2005  kent sync with -current
 1.9.48.1 24-Jan-2005  skrll Sync with HEAD.
 1.10.8.1 03-Sep-2007  yamt sync with head.
 1.11.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.12.44.1 16-May-2008  yamt sync with head.
 1.12.42.1 18-May-2008  yamt sync with head.
 1.12.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.12 20-Jul-2024  andvar fix typos in comments, mainly s/harware/hardware/.
 1.11 28-Apr-2008  martin branches: 1.11.124;
Remove clause 3 and 4 from TNF licenses
 1.10 02-Apr-2003  thorpej branches: 1.10.104; 1.10.106; 1.10.108;
Use PAGE_SIZE rather than NBPG.
 1.9 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.8 22-Jan-1998  gwr branches: 1.8.4;
Use the same names as the sun3x (DVMA_MAP_*)
 1.7 17-Oct-1997  gwr Make DVMA space pointers (void *) like the sun3x.
 1.6 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.5 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.4 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.3 20-Feb-1996  gwr use phys_map for DVMA like the sparc
 1.2 16-Feb-1996  gwr Fix comment
 1.1 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.8.4.1 27-Jan-1998  gwr Remove common stuff (now in dvma.h)
 1.10.108.1 16-May-2008  yamt sync with head.
 1.10.106.1 18-May-2008  yamt sync with head.
 1.10.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.124.1 02-Aug-2025  perseant Sync with HEAD
 1.8 20-Jul-2024  andvar fix typos in comments, mainly s/harware/hardware/.
 1.7 28-Apr-2008  martin branches: 1.7.124;
Remove clause 3 and 4 from TNF licenses
 1.6 02-Apr-2003  thorpej branches: 1.6.104; 1.6.106; 1.6.108;
Use PAGE_SIZE rather than NBPG.
 1.5 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.4 22-Jan-1998  gwr branches: 1.4.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.3 16-Oct-1997  gwr cosmetic
 1.2 07-Oct-1997  gwr Add stuff for the ie driver
 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.10;
Initial import. Gets as far as nfs_mountroot.
 1.1.1.1.10.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.4.1 27-Jan-1998  gwr Remove common stuff (now in dvma.h)
 1.6.108.1 16-May-2008  yamt sync with head.
 1.6.106.1 18-May-2008  yamt sync with head.
 1.6.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.124.1 02-Aug-2025  perseant Sync with HEAD
 1.18 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.17 11-Dec-2005  christos branches: 1.17.74; 1.17.76; 1.17.78;
merge ktrace-lwp.
 1.16 19-Jun-2005  thorpej Move common Sun3/Sun4 EEPROM definitions in to <dev/sun/eeprom.h>
 1.15 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.14 05-Feb-1998  gwr branches: 1.14.48; 1.14.56;
Merge arch/sun3x into arch/sun3
 1.13 18-Mar-1997  gwr branches: 1.13.10;
Moved the _KERNEL declarations to machdep.h
 1.12 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.11 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.10 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.9 11-May-1995  jtc KERNEL -> _KERNEL
 1.8 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.7 10-Mar-1995  gwr Declare ee_console (for drivers).
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 20-Sep-1994  gwr branches: 1.4.2;
Add prototype for ee_get_byte(), etc.
 1.3 04-May-1994  gwr Add EE_CONS_P4OPT, fix boilerplate.
 1.2 16-Mar-1994  glass copyright change
 1.1 16-Mar-1994  glass eeprom stuff
 1.4.2.2 20-Sep-1994  gwr Add prototype for ee_get_byte(), etc.
 1.4.2.1 20-Sep-1994  gwr file eeprom.h was added on branch netbsd-1-0 on 1994-09-20 16:26:01 +0000
 1.13.10.1 27-Jan-1998  gwr Merge in Sun3X specific stuff (i.e. 3/80 diag "switch").
 1.14.56.1 29-Apr-2005  kent sync with -current
 1.14.48.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.48.1 24-Jan-2005  skrll Sync with HEAD.
 1.17.78.1 16-May-2008  yamt sync with head.
 1.17.76.1 18-May-2008  yamt sync with head.
 1.17.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.1 12-Jul-1998  thorpej Basic elf_machdep.h for m68k; doesn't include relocations, yet.
 1.7 17-Mar-2000  mycroft In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
 1.6 21-Nov-1994  gwr branches: 1.6.36;
Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.3 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.2 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.6.36.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.1 17-Mar-2000  mycroft branches: 1.1.6;
In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 17-Mar-2000  bouyer file endian_machdep.h was added on branch thorpej_scsipi on 2000-11-20 20:27:54 +0000
 1.10 08-Oct-1996  cgd moved to aout_machdep.h (via repository copy)
 1.9 08-Sep-1996  thorpej Use <m68k/exec.h>.
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  gwr Remove some unnecessary junk.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.3 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.2 18-Oct-1993  pk Put definition of __LDPGSZ and `struct relocation_info' where they belong:
in <machine/exec.h>.
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.4 19-Sep-2001  thorpej Just use <dev/sun/fbio.h>.
 1.3 21-Nov-1994  gwr branches: 1.3.46; 1.3.48; 1.3.50;
Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 08-Aug-1994  gwr branches: 1.1.2;
Added for X11 (at Theo's suggestion).
 1.1.2.2 08-Aug-1994  gwr Added for X11 (at Theo's suggestion).
 1.1.2.1 08-Aug-1994  gwr file fbio.h was added on branch netbsd-1-0 on 1994-08-08 21:14:16 +0000
 1.3.50.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.48.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.46.1 16-Aug-2001  tv Pullup [jdolecek]:

sys/arch/amiga/dev/grf_cl.c 1.26
sys/arch/amiga/dev/grfioctl.h 1.14
sys/arch/hpcmips/dev/plumvideo.c 1.20
sys/arch/macppc/dev/ofb.c 1.25
sys/arch/sparc/dev/cgtwo.c 1.35
sys/arch/sparc/include/fbio.h patch
sys/arch/sparc64/include/fbio.h patch
sys/arch/sun3/dev/cg2.c 1.14
sys/arch/sun3/include/fbio.h patch
sys/dev/pci/tga.c 1.35
sys/dev/tc/cfb.c 1.28
sys/dev/tc/mfb.c 1.27
sys/dev/tc/sfb.c 1.46
sys/dev/tc/sfbplus.c 1.10 via patch
sys/dev/tc/tfb.c 1.30
sys/dev/tc/xcfb.c 1.23
sys/net/if_ppp.c 1.71

Use unsigned variable types to make bounds checking more correct.
 1.1 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.1 24-Dec-2015  christos branches: 1.1.2; 1.1.18;
fenv for m68k
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 24-Dec-2015  jdolecek file fenv.h was added on branch tls-maxphys on 2017-12-03 11:36:46 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 24-Dec-2015  skrll file fenv.h was added on branch nick-nhusb on 2015-12-27 12:09:44 +0000
 1.7 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.6 20-Jun-1995  jtc Wrap with #ifndef _XXX_FLOAT_H_/#define _XXX_FLOAT_H_/ ... /#endif.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.3 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.2 08-Aug-1993  glass various changes
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.22 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.21 11-Dec-2005  christos branches: 1.21.74; 1.21.76; 1.21.78;
merge ktrace-lwp.
 1.20 19-Jun-2005  thorpej Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.19 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.18 04-Mar-1999  gwr branches: 1.18.42; 1.18.50;
Add IDPROM_CKSUM_SIZE
 1.17 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.16 17-Oct-1997  gwr branches: 1.16.4;
Declare functions for _STANDALONE too.
 1.15 27-Jan-1997  gwr Let idprom_init() have void return.
 1.14 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.13 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.12 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.11 11-May-1995  jtc KERNEL -> _KERNEL
 1.10 11-Feb-1995  gwr minor cleanup
 1.9 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.6 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.5 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.4 05-Aug-1993  glass gets to consinit() and blows up
 1.3 02-Aug-1993  glass toasted a whole load more undefined symbols
 1.2 30-Jul-1993  glass bogus placeholder obio addr
 1.1 29-Jun-1993  glass added /dev/idprom driver :), doesn't compile yet
 1.16.4.1 27-Jan-1998  gwr Define ID codes for both Sun3 and Sun3X models.
 1.18.50.1 29-Apr-2005  kent sync with -current
 1.18.42.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.42.1 24-Jan-2005  skrll Sync with HEAD.
 1.21.78.1 16-May-2008  yamt sync with head.
 1.21.76.1 18-May-2008  yamt sync with head.
 1.21.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 30-Aug-1999  mycroft A foolish consistency.
 1.1 15-Mar-1999  minoura Pullin m68k/ieee.h.
 1.3 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.2 16-Apr-1995  gwr typo
 1.1 09-Apr-1995  mycroft Move fp_except and fp_rnd definitions to machine/include.
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer constant macros.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
 1.1.12.1 14-Apr-2001  kleink file int_const.h was added on branch nathanw_sa on 2001-04-14 22:38:44 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_const.h was added on branch thorpej_scsipi on 2001-04-21 17:54:58 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_fmtio.h was added on branch nathanw_sa on 2001-04-15 17:13:19 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_fmtio.h was added on branch thorpej_scsipi on 2001-04-21 17:54:58 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_limits.h was added on branch nathanw_sa on 2001-04-15 15:29:13 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_limits.h was added on branch thorpej_scsipi on 2001-04-21 17:54:58 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 14-Apr-2001  kleink file int_mwgwtypes.h was added on branch nathanw_sa on 2001-04-14 12:20:03 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_mwgwtypes.h was added on branch thorpej_scsipi on 2001-04-21 17:54:59 +0000
 1.1 26-Jun-2000  kleink branches: 1.1.2;
Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.1.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.2.1 26-Jun-2000  bouyer file int_types.h was added on branch thorpej_scsipi on 2000-11-20 20:27:54 +0000
 1.8 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.7 29-Mar-2006  yamt branches: 1.7.8; 1.7.10;
implement splraiseipl() for sun2 and sun3. reviewed by Izumi Tsutsui.
 1.6 16-Feb-2006  perry branches: 1.6.2; 1.6.4; 1.6.6;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.5 24-Dec-2005  perry branches: 1.5.2; 1.5.4; 1.5.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 22-Jan-2005  chs branches: 1.3.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.2 16-Dec-2001  gmcgarry branches: 1.2.16; 1.2.24;
Make this compile with new toolchain.
 1.1 28-May-2001  chs branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10;
move the spl*() and IPL_* definitions to intr.h.
 1.1.10.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.10.1 28-May-2001  nathanw file intr.h was added on branch nathanw_sa on 2002-01-08 00:28:18 +0000
 1.1.6.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.1.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.24.1 29-Apr-2005  kent sync with -current
 1.2.16.1 24-Jan-2005  skrll Sync with HEAD.
 1.3.8.2 30-Dec-2006  yamt sync with head.
 1.3.8.1 21-Jun-2006  yamt sync with head.
 1.5.6.1 22-Apr-2006  simonb Sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.5.2.1 18-Feb-2006  yamt sync with head.
 1.6.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.6.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.6.2.1 01-Apr-2006  yamt sync with head.
 1.7.10.3 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.7.10.2 19-Sep-2006  yamt implement new api for sun3.
 1.7.10.1 19-Sep-2006  yamt revert old version of splraiseipl().
 1.7.8.1 18-Nov-2006  ad Sync with head.
 1.11 17-Dec-1996  gwr The declarations for isr_add_xxx are now in autoconf.h
 1.10 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.9 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.8 11-Jan-1995  gwr Cleanup
 1.7 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.3 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.2 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.1 10-Aug-1993  glass new file for interrupt handling
 1.6 27-Aug-2002  uwe Make sun ports use common keyboard/firm events related includes
from dev/sun.
 1.5 05-Oct-1997  gwr branches: 1.5.32; 1.5.36; 1.5.44;
cosmetic
 1.4 03-Oct-1997  gwr Declare kbd_docmd()
 1.3 24-Jan-1996  gwr branches: 1.3.12;
Update for the new z8530 driver
 1.2 24-May-1995  gwr Sunc with sparc version (adds key repeat capability)
 1.1 01-Dec-1994  gwr Export some headers that X will want, and minor clean-up.
 1.3.12.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.44.1 31-Aug-2002  gehenna catch up with -current.
 1.5.36.1 27-Aug-2002  nathanw Catch up to -current.
 1.5.32.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.5 27-Aug-2002  uwe Make sun ports use common keyboard/firm events related includes
from dev/sun.
 1.4 24-Jan-1996  gwr branches: 1.4.46; 1.4.50; 1.4.58;
Update for the new z8530 driver
 1.3 08-Aug-1995  gwr Cosmetic (fix order)
 1.2 24-May-1995  gwr Sunc with sparc version (adds key repeat capability)
 1.1 01-Dec-1994  gwr Export some headers that X will want, and minor clean-up.
 1.4.58.1 31-Aug-2002  gehenna catch up with -current.
 1.4.50.1 27-Aug-2002  nathanw Catch up to -current.
 1.4.46.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4 09-Apr-1997  thorpej Use <m68k/kcore.h>
 1.3 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.2 21-Nov-1996  gwr Copyright assigned to The NetBSD Foundation
 1.1 05-May-1996  gwr Used by the new libkvm
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 11-Dec-2005  christos branches: 1.5.74; 1.5.76; 1.5.78;
merge ktrace-lwp.
 1.4 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.3 05-Feb-1998  gwr branches: 1.3.48; 1.3.56;
Merge arch/sun3x into arch/sun3
 1.2 28-Apr-1997  gwr branches: 1.2.10;
Add a kernel declarations section.
 1.1 18-Mar-1997  gwr Add /dev/leds (closes PR#2172 from der Mouse)
 1.2.10.1 27-Jan-1998  gwr add leds_init
 1.3.56.1 29-Apr-2005  kent sync with -current
 1.3.48.1 24-Jan-2005  skrll Sync with HEAD.
 1.5.78.1 16-May-2008  yamt sync with head.
 1.5.76.1 18-May-2008  yamt sync with head.
 1.5.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.8 23-Jul-1998  gwr Make this like the other redirect includes.
 1.7 09-Jan-1998  perry multiple include protect machine/limits.h, fixes pr 4473 (from Mika Nystrom)
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 26-Jul-1994  gwr branches: 1.4.2;
No longer redefine CLK_TCK because JTC says the value is arbitrary
and the redefinition caused noisy warnings.
 1.3 04-Feb-1994  glass branches: 1.3.2;
sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.3.2.1 26-Jul-1994  cgd From trunk.
 1.4.2.2 26-Jul-1994  gwr No longer redefine CLK_TCK because JTC says the value is arbitrary
and the redefinition caused noisy warnings.
 1.4.2.1 26-Jul-1994  gwr file limits.h was added on branch netbsd-1-0 on 1994-07-26 18:15:19 +0000
 1.4 17-Sep-2006  tsutsui Make sun68k/stand build without installed ${DESTDIR} files.

Currently "machine" symlink points sys/arch/sun68k/include,
but this means some <machine/foo.h> files are taken from
sys/arch/sun68k/include but others (i.e. files not in sun68k/include)
are taken from ${DESTDIR}/usr/include/machine.

Instead, make "machine" symlink point sys/arch/${MACHINE}/include,
make "sun68k" symlink point sys/arch/sun68k/include (not sys/arch/sun68k),
add sys/arch to include path, and move some files where appropriate.
 1.3 25-Jan-2006  christos branches: 1.3.18;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.2 31-Oct-2001  thorpej branches: 1.2.2; 1.2.34; 1.2.46;
Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.1 22-Feb-2001  chs branches: 1.1.4; 1.1.6; 1.1.8;
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.1.8.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file loadfile_machdep.h was added on branch thorpej_scsipi on 2001-03-12 13:29:36 +0000
 1.2.46.1 01-Feb-2006  yamt sync with head.
 1.2.34.2 30-Dec-2006  yamt sync with head.
 1.2.34.1 21-Jun-2006  yamt sync with head.
 1.2.2.2 31-Oct-2001  thorpej Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.2.2.1 31-Oct-2001  thorpej file loadfile_machdep.h was added on branch nathanw_sa on 2001-10-31 17:20:50 +0000
 1.3.18.1 18-Nov-2006  ad Sync with head.
 1.1 29-Apr-2000  thorpej branches: 1.1.6;
Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 29-Apr-2000  bouyer file lock.h was added on branch thorpej_scsipi on 2000-11-20 20:27:54 +0000
 1.1 30-Nov-2024  christos branches: 1.1.4;
Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 30-Nov-2024  perseant file lwp_private.h was added on branch perseant-exfatfs on 2025-08-02 05:56:12 +0000
 1.13 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.12 06-Oct-1997  gwr branches: 1.12.4;
Move some of the VM initialization work from _startup.c to pmap.c
where it is normally found.
 1.11 05-Oct-1997  gwr Do kernel core header initialization a little differently.
 1.10 29-May-1997  gwr branches: 1.10.4;
Define getsr() as _getsr() for backward compatibility.
 1.9 28-Apr-1997  gwr Moved leds_* declarations into leds.h
 1.8 09-Apr-1997  thorpej regdump() is prototyped in m68k/cpu.h now.
 1.7 18-Mar-1997  gwr Moved the _KERNEL declarations to machdep.h
 1.6 17-Mar-1997  gwr s/fpu_type/fputype/g
 1.5 11-Feb-1997  gwr Change most occurrences of "struct frame" (union of all frames formats)
to "struct trapframe" (the minimal frame) because in most cases, all we
care about is the minimal, invariant part. Further, if the declaration
says we have an arg of type "frame" (big union), then KGDB will try to
print the whole bloody thing out whether you want to see it or not.
 1.4 04-Feb-1997  perry branches: 1.4.2;
Nuke some options GENERIC residue.
 1.3 27-Jan-1997  gwr Just declare the sunmon_* functions here. No need for sunmon.h
 1.2 27-Jan-1997  gwr Pull out things now declared elsewhere.
 1.1 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.4.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.10.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.12.4.1 25-Jan-1998  gwr Now in ../sun3
 1.1 23-Dec-1999  kleink branches: 1.1.6;
C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 23-Dec-1999  bouyer file math.h was added on branch thorpej_scsipi on 2000-11-20 20:27:54 +0000
 1.7 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.6 28-Apr-2008  martin branches: 1.6.124;
Remove clause 3 and 4 from TNF licenses
 1.5 14-May-1997  jeremy branches: 1.5.152; 1.5.154; 1.5.156;
Long awaited MI/MD separation completed.
 1.4 13-Mar-1997  gwr s/sun3x_/_/ in sun3x_(round|trunc)_(page|seg) macros
 1.3 23-Jan-1997  gwr Rename members of struct mmu_rootptr, and add a comment. (From Jeremy)
 1.2 16-Jan-1997  gwr Add an introductory comment about pte.h vs mc68851.h
Move sun3x_round_up_page() to pte.h
Define struct mmu_rootptr here.
 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.156.1 16-May-2008  yamt sync with head.
 1.5.154.1 18-May-2008  yamt sync with head.
 1.5.152.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.124.1 02-Aug-2025  perseant Sync with HEAD
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 10-Nov-2001  scw branches: 1.1.2;
file mcontext.h was initially added on branch nathanw_sa.
 1.1.2.1 10-Nov-2001  scw Kernel mcontext glue for Scheduler Activations on m68k from
Klaus Klein <kleink@netbsd.org>.
 1.4 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.30 24-Jun-2023  msaitoh Fix typo in comment.
 1.29 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.28 01-Oct-2006  tsutsui branches: 1.28.52; 1.28.54; 1.28.56;
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.27 11-Dec-2005  christos branches: 1.27.20; 1.27.22;
merge ktrace-lwp.
 1.26 03-Jun-2005  tsutsui branches: 1.26.2;
Constify.
 1.25 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.24 22-Feb-2001  chs branches: 1.24.24; 1.24.32;
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 05-Feb-1998  gwr branches: 1.23.14;
Merge arch/sun3x into arch/sun3
 1.22 05-Feb-1997  gwr branches: 1.22.14;
sync with the sun3x version
 1.21 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.20 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.19 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.18 13-Oct-1996  christos backout previous kprintf change
 1.17 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.16 07-Feb-1995  gwr Add saio.h and move relevant struct from mon.h into it.
 1.15 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.14 26-Oct-1994  cgd new RCS ID format.
 1.13 20-Sep-1994  gwr branches: 1.13.2;
Cleanup, fix mon_reboot()
 1.12 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.11 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.10 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.9 08-Aug-1993  glass various changes
 1.8 05-Aug-1993  glass gets to consinit() and blows up
 1.7 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.6 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.5 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.4 27-Jul-1993  glass new pmap module
 1.3 29-Jun-1993  glass additional needed functionality
 1.2 27-Jun-1993  glass fixed bug in mon.h; fixed NEED_* in cpu.h; spl macro problems
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.13.2.2 20-Sep-1994  gwr Cleanup, fix mon_reboot()
 1.13.2.1 20-Sep-1994  gwr file mon.h was added on branch netbsd-1-0 on 1994-09-20 16:26:41 +0000
 1.22.14.1 27-Jan-1998  gwr The last section that used to be ifdef sun3/3x is now a union
so the boot programs can use either variant as appropriate.
 1.23.14.1 12-Mar-2001  bouyer Sync with HEAD.
 1.24.32.1 29-Apr-2005  kent sync with -current
 1.24.24.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.24.24.1 24-Jan-2005  skrll Sync with HEAD.
 1.26.2.1 30-Dec-2006  yamt sync with head.
 1.27.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.27.20.1 18-Nov-2006  ad Sync with head.
 1.28.56.1 16-May-2008  yamt sync with head.
 1.28.54.1 18-May-2008  yamt sync with head.
 1.28.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file mutex.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file mutex.h was added on branch yamt-lazymbuf on 2007-02-26 09:08:35 +0000
 1.7 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.6 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.21 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.20 28-Apr-1997  gwr branches: 1.20.10;
Rename obio_alloc/obio_mapin and check for obio in match functions
for attachments that will use obio_mapin.
 1.19 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.18 18-Jan-1997  gwr Use the same names (OBIO_ZS_*) as the sun3x port so we can share zs.
 1.17 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.16 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.15 30-Oct-1996  gwr cosmetic...
 1.14 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.13 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.12 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.11 26-Oct-1994  cgd new RCS ID format.
 1.10 20-Sep-1994  gwr branches: 1.10.2;
Add obio_find_mapping(), kill xxx_va gunk.
 1.9 04-May-1994  gwr Add zs0_va, zs1_va
 1.8 16-Mar-1994  glass eeprom stuff
 1.7 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.6 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.5 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.4 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.3 16-Aug-1993  glass 'clock' is now part of the standard config system instead of being done
early and in a hacked way. the movement of startrtclock() to below
cpu_startup() allows this.
 1.2 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.1 08-Aug-1993  glass various changes
 1.10.2.2 20-Sep-1994  gwr Add obio_find_mapping(), kill xxx_va gunk.
 1.10.2.1 20-Sep-1994  gwr file obio.h was added on branch netbsd-1-0 on 1994-09-20 16:28:01 +0000
 1.20.10.1 25-Jan-1998  gwr Now in ../sun3 or ../sun3x
 1.9 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.8 27-Jan-1997  gwr branches: 1.8.14;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.7 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.6 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.8.14.1 25-Jan-1998  gwr Now in ../sun3 or ../sun3x
 1.62 31-May-2021  simonb Include "opt_param.h" (ifdef _KERNEL_OPT) everywhere that MSGBUFSIZE is
referenced since some sources include <machine/param.h>.
 1.61 11-Aug-2012  tsutsui branches: 1.61.56;
Poor sun3 (but not sun3x) has only 31MB KVM address space,
so reduce NKMEMPAGES_MAX_DEFAULT from 64MB to 16MB.
Fixes "panic: ubc_init: failed to map ubc_object" on
TME emulating 3/120 with >16MB RAM.

Should be pulled up to netbsd-6.
 1.60 10-Feb-2012  para branches: 1.60.2;
proper sizing of kmem_arena on different ports

PR port-i386/45946: Kernel locks up in VMEM system
 1.59 08-Feb-2011  rmind branches: 1.59.4; 1.59.8;
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.58 15-Oct-2010  tsutsui branches: 1.58.2; 1.58.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.57 11-Dec-2005  christos branches: 1.57.98; 1.57.100;
merge ktrace-lwp.
 1.56 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.55 07-Aug-2003  agc branches: 1.55.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.54 01-Jun-2002  nathanw branches: 1.54.6;
Explicitly include <arch/sun3/include/param3{,x}.h> rather than
<machine/param3{,x}.h>, so that this file can be included on non-sun3 builds.
 1.53 28-May-2001  chs branches: 1.53.2; 1.53.8; 1.53.16; 1.53.18;
move the spl*() and IPL_* definitions to intr.h.
 1.52 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.51 11-Feb-2000  thorpej branches: 1.51.6;
Update for the NKMEMPAGES changes.
 1.50 04-Dec-1999  ragge CL* discarding.
 1.49 05-Apr-1999  gwr branches: 1.49.2; 1.49.8; 1.49.14;
Make it clear that MSGBUFSIZE is not user-adjustable.
 1.48 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.47 03-Oct-1997  gwr branches: 1.47.4;
Increase MSGBUFOFF to 512 so we can be sure there is room for a
kernel core header before the message buffer.
 1.46 02-Oct-1997  gwr Fix MSGBUFSIZE
 1.45 20-Sep-1997  leo Correct for the extra member in 'struct kern_msgbuf' when calculating
the number of bytes we want to allocate.
 1.44 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.43 10-Jul-1997  veego branches: 1.43.2;
Restore the define of UPAGES.
 1.42 10-Jun-1997  veego Define NBSG from (1 << SEGSHIFT) and move some variables before
<m68k/param.h>.
 1.41 10-Jun-1997  veego Use the MI <m68k/param.h> include.
 1.40 27-Feb-1997  gwr Define VM_MAX_KERNEL_ADDRESS using KERN_END instead of a constant.
 1.39 27-Feb-1997  gwr Allow option MCLSHIFT=x to control MCLBYTES etc.
 1.38 26-Feb-1997  gwr Use ALIGNBYTES in the new ALIGNED_POINTER macro.
(That is always good enough on the m68k.)
 1.37 24-Feb-1997  fvdl Define ALIGNED_POINTER
 1.36 18-Jan-1997  gwr branches: 1.36.4;
Move sun3_btop (etc.) macros from param.h to pte.h
 1.35 13-Dec-1996  gwr Define MAXBSIZE as 32KB to limit the size clustered transfers.
 1.34 04-Mar-1996  cgd add _MACHINE and _MACHINE_ARCH, which are like MACHINE and MACHINE_ARCH,
execpt without quotes. meant to be __CONCAT()ted for easy #includes
of machine-dependent headers for MI code (e.g. for the MI ISA/EISA/PCI/TC
bus code).
 1.33 01-Mar-1996  cgd Clean up tabbing/spacing in defns of MACHINE, MACHINE_ARCH, and MID_MACHINE.
 1.32 16-Feb-1996  gwr Improved delay() implementation with lower overhead,
makes very short delays much more accurate.
 1.31 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.30 10-Nov-1995  gwr Need to define KERNTEXTOFF for kvm_mkdb
 1.29 27-Jun-1995  gwr branches: 1.29.2;
Nuke user-mode DELAY() macro.
 1.28 26-Jun-1995  cgd clean up definitions of ctod(), dtoc(), ctob(), btoc(), btodb(), and
dbtob(). remove unused definitions of ctos(), stoc(), and dtob().
 1.27 13-Jun-1995  gwr Provide delay2us as an inline and make it reasonably accurate,
but conservative (long) by a factor of about 1.25
 1.26 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.25 27-Mar-1995  gwr Put spltty at level 4 and adjust others appropriately.
Also, improve the inline _spl() and move it to psl.h
 1.24 18-Mar-1995  cgd don't be so quick to cast macro arguments to unsigned; if the
arguments are really off_t's (e.g. to btodb), then you can lose
information. This was the "> 4G file systems don't work" bug; physio
uses btodb, which was broken.
 1.23 28-Nov-1994  gwr cosmetic
 1.22 23-Nov-1994  gwr Add USPACE
 1.21 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.20 26-Oct-1994  gwr Remove some unnecessary junk.
 1.19 26-Oct-1994  cgd new RCS ID format.
 1.18 20-Sep-1994  gwr branches: 1.18.2;
Kill CLOCK_VA, INTERREG_VA. Do spl0() and splx(x) inline too.
 1.17 16-Sep-1994  jtc asm -> __asm (PR #463).
 1.16 23-Aug-1994  gwr Add USPACE
 1.15 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.14 04-May-1994  gwr Make the DELAY macro call the new delay() function.
 1.13 02-May-1994  glass ugh. splimp is the greater of splnet and splbio now. used by pmap module for splpmap()
 1.12 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.11 12-Dec-1993  glass MACHINE_ARCH
 1.10 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.9 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.8 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.7 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.6 08-Aug-1993  glass various changes
 1.5 05-Aug-1993  glass gets to consinit() and blows up
 1.4 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.3 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.2 27-Jun-1993  glass fixed bug in mon.h; fixed NEED_* in cpu.h; spl macro problems
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.18.2.2 20-Sep-1994  gwr Kill CLOCK_VA, INTERREG_VA. Do spl0() and splx(x) inline too.
 1.18.2.1 20-Sep-1994  gwr file param.h was added on branch netbsd-1-0 on 1994-09-20 16:31:04 +0000
 1.29.2.1 10-Nov-1995  gwr Update from HEAD
 1.36.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.43.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.43.2.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.47.4.3 05-Feb-1998  gwr Remove _KVA_MASK
 1.47.4.2 04-Feb-1998  gwr Move UPAGES into the common file.
 1.47.4.1 27-Jan-1998  gwr Conditionally include *3.h or *3x.h as appropriate.
 1.49.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.49.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.49.2.2 05-Apr-1999  gwr Make it clear that MSGBUFSIZE is not user-adjustable.
 1.49.2.1 05-Apr-1999  gwr file param.h was added on branch netbsd-1-4 on 1999-04-05 14:34:19 +0000
 1.51.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.53.18.2 09-Sep-2003  lukem Apply patch from Matthias Scheler to fix the sun3 build after the pullup
of ticket 1434 broke it.
[tron, ticket #1453]
 1.53.18.1 01-Jun-2002  tv Pull up revision 1.54 (requested by nathanw in ticket #115):
Explicitly include <arch/sun3/include/param3{,x}.h> rather than
<machine/param3{,x}.h>, so that this file can be included on non-sun3 builds.
 1.53.16.1 15-Jul-2002  gehenna catch up with -current.
 1.53.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.53.8.1 28-May-2001  nathanw file param.h was added on branch nathanw_sa on 2002-06-20 03:41:43 +0000
 1.53.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.54.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.54.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.54.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.54.6.1 03-Aug-2004  skrll Sync with HEAD
 1.55.8.1 29-Apr-2005  kent sync with -current
 1.57.100.1 05-Mar-2011  rmind sync with head
 1.57.98.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.58.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.58.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.59.8.1 18-Feb-2012  mrg merge to -current.
 1.59.4.2 30-Oct-2012  yamt sync with head
 1.59.4.1 17-Apr-2012  yamt sync with head
 1.60.2.1 13-Aug-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #487):
sys/arch/sun3/include/param3.h: revision 1.55
sys/arch/sun3/include/param3.h: revision 1.56
sys/arch/sun2/include/param.h: revision 1.15
sys/arch/sun3/include/param.h: revision 1.61
sys/arch/sun3/include/param3x.h: revision 1.18
Poor sun3 (but not sun3x) has only 31MB KVM address space,
so reduce NKMEMPAGES_MAX_DEFAULT from 64MB to 16MB.
Fixes "panic: ubc_init: failed to map ubc_object" on
TME emulating 3/120 with >16MB RAM.
Should be pulled up to netbsd-6.
Poor sun2 has only 14MB KVA space so reduce NKMEMPAGES_MIN_DEFAULT and
NKMEMPAGES_MAX_DEFAULT values accordingly.
XXX: netbsd-6 GENERIC still gets "panic: pool_get: kmem-4096: page empty"
Also reduce UBC_NWINS from default 1024 to 512
to avoid possible KVA shortage, otherwise
"panic: ubc_init: failed to map ubc_object"
could still happen on netbsd-6 branch.
Should be pulled up to netbsd-6.
 1.61.56.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.57 03-Mar-2018  mrg sun2/sun3:
- build libkern as an archive for non modular builds. from maya@
sun3:
- cut down GENERIC a bunch to bring below 2MB.
- reduce UBC_NWINS, MAXEXEC, and PAGER_MAP_DEFAULT_SIZE to recover
enough lost VA to actually run basic tests.
 1.56 12-Aug-2012  tsutsui branches: 1.56.32;
Also reduce UBC_NWINS from default 1024 to 512
to avoid possible KVA shortage, otherwise
"panic: ubc_init: failed to map ubc_object"
could still happen on netbsd-6 branch.

Should be pulled up to netbsd-6.
 1.55 11-Aug-2012  tsutsui Poor sun3 (but not sun3x) has only 31MB KVM address space,
so reduce NKMEMPAGES_MAX_DEFAULT from 64MB to 16MB.
Fixes "panic: ubc_init: failed to map ubc_object" on
TME emulating 3/120 with >16MB RAM.

Should be pulled up to netbsd-6.
 1.54 08-Feb-2011  rmind branches: 1.54.4; 1.54.10;
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.53 15-Oct-2010  tsutsui branches: 1.53.2; 1.53.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.52 11-Dec-2009  tsutsui branches: 1.52.2; 1.52.4;
Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSG, and SEGOFFSET from <machine/param.h>
to <machine/pmap.h> where they should belong
- don't use m68k_round_seg() and m68k_trunc_seg() in sun3 pmap sources
and instead define and use sun3_round_seg() and sun3_trunc_seg()
since they are quite pmap implementation dependent
 1.51 11-Dec-2005  christos branches: 1.51.78;
merge ktrace-lwp.
 1.50 22-Jan-2005  chs bring back the sun3 MAXPHYS definition that has been missing for 8 years.
more recently, we changed to relying on MAXPHYS rather than MAXBSIZE to
limit page cache I/O sizes, and sun3 has been broken since then.
 1.49 07-Aug-2003  agc branches: 1.49.2; 1.49.6; 1.49.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.48 05-Feb-1998  gwr branches: 1.48.48;
Merge arch/sun3x into arch/sun3
 1.47 03-Oct-1997  gwr branches: 1.47.4;
Increase MSGBUFOFF to 512 so we can be sure there is room for a
kernel core header before the message buffer.
 1.46 02-Oct-1997  gwr Fix MSGBUFSIZE
 1.45 20-Sep-1997  leo Correct for the extra member in 'struct kern_msgbuf' when calculating
the number of bytes we want to allocate.
 1.44 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.43 10-Jul-1997  veego branches: 1.43.2;
Restore the define of UPAGES.
 1.42 10-Jun-1997  veego Define NBSG from (1 << SEGSHIFT) and move some variables before
<m68k/param.h>.
 1.41 10-Jun-1997  veego Use the MI <m68k/param.h> include.
 1.40 27-Feb-1997  gwr Define VM_MAX_KERNEL_ADDRESS using KERN_END instead of a constant.
 1.39 27-Feb-1997  gwr Allow option MCLSHIFT=x to control MCLBYTES etc.
 1.38 26-Feb-1997  gwr Use ALIGNBYTES in the new ALIGNED_POINTER macro.
(That is always good enough on the m68k.)
 1.37 24-Feb-1997  fvdl Define ALIGNED_POINTER
 1.36 18-Jan-1997  gwr branches: 1.36.4;
Move sun3_btop (etc.) macros from param.h to pte.h
 1.35 13-Dec-1996  gwr Define MAXBSIZE as 32KB to limit the size clustered transfers.
 1.34 04-Mar-1996  cgd add _MACHINE and _MACHINE_ARCH, which are like MACHINE and MACHINE_ARCH,
execpt without quotes. meant to be __CONCAT()ted for easy #includes
of machine-dependent headers for MI code (e.g. for the MI ISA/EISA/PCI/TC
bus code).
 1.33 01-Mar-1996  cgd Clean up tabbing/spacing in defns of MACHINE, MACHINE_ARCH, and MID_MACHINE.
 1.32 16-Feb-1996  gwr Improved delay() implementation with lower overhead,
makes very short delays much more accurate.
 1.31 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.30 10-Nov-1995  gwr Need to define KERNTEXTOFF for kvm_mkdb
 1.29 27-Jun-1995  gwr branches: 1.29.2;
Nuke user-mode DELAY() macro.
 1.28 26-Jun-1995  cgd clean up definitions of ctod(), dtoc(), ctob(), btoc(), btodb(), and
dbtob(). remove unused definitions of ctos(), stoc(), and dtob().
 1.27 13-Jun-1995  gwr Provide delay2us as an inline and make it reasonably accurate,
but conservative (long) by a factor of about 1.25
 1.26 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.25 27-Mar-1995  gwr Put spltty at level 4 and adjust others appropriately.
Also, improve the inline _spl() and move it to psl.h
 1.24 18-Mar-1995  cgd don't be so quick to cast macro arguments to unsigned; if the
arguments are really off_t's (e.g. to btodb), then you can lose
information. This was the "> 4G file systems don't work" bug; physio
uses btodb, which was broken.
 1.23 28-Nov-1994  gwr cosmetic
 1.22 23-Nov-1994  gwr Add USPACE
 1.21 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.20 26-Oct-1994  gwr Remove some unnecessary junk.
 1.19 26-Oct-1994  cgd new RCS ID format.
 1.18 20-Sep-1994  gwr Kill CLOCK_VA, INTERREG_VA. Do spl0() and splx(x) inline too.
 1.17 16-Sep-1994  jtc asm -> __asm (PR #463).
 1.16 23-Aug-1994  gwr Add USPACE
 1.15 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.14 04-May-1994  gwr Make the DELAY macro call the new delay() function.
 1.13 02-May-1994  glass ugh. splimp is the greater of splnet and splbio now. used by pmap module for splpmap()
 1.12 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.11 12-Dec-1993  glass MACHINE_ARCH
 1.10 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.9 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.8 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.7 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.6 08-Aug-1993  glass various changes
 1.5 05-Aug-1993  glass gets to consinit() and blows up
 1.4 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.3 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.2 27-Jun-1993  glass fixed bug in mon.h; fixed NEED_* in cpu.h; spl macro problems
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.29.2.1 10-Nov-1995  gwr Update from HEAD
 1.36.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.43.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.43.2.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.47.4.2 04-Feb-1998  gwr Move UPAGES into the common file.
 1.47.4.1 27-Jan-1998  gwr Remove common stuff found in param.h
 1.48.48.4 24-Jan-2005  skrll Sync with HEAD.
 1.48.48.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.48.48.2 18-Sep-2004  skrll Sync with HEAD.
 1.48.48.1 03-Aug-2004  skrll Sync with HEAD
 1.49.8.1 29-Apr-2005  kent sync with -current
 1.49.6.1 16-Mar-2005  tron Pull up revision 1.50 (requested by chs in ticket #1229):
bring back the sun3 MAXPHYS definition that has been missing for 8 years.
more recently, we changed to relying on MAXPHYS rather than MAXBSIZE to
limit page cache I/O sizes, and sun3 has been broken since then.
 1.49.2.1 16-Mar-2005  tron Pull up revision 1.50 (requested by chs in ticket #1229):
bring back the sun3 MAXPHYS definition that has been missing for 8 years.
more recently, we changed to relying on MAXPHYS rather than MAXBSIZE to
limit page cache I/O sizes, and sun3 has been broken since then.
 1.51.78.1 11-Mar-2010  yamt sync with head
 1.52.4.1 05-Mar-2011  rmind sync with head
 1.52.2.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.53.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.53.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.54.10.1 13-Aug-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #487):
sys/arch/sun3/include/param3.h: revision 1.55
sys/arch/sun3/include/param3.h: revision 1.56
sys/arch/sun2/include/param.h: revision 1.15
sys/arch/sun3/include/param.h: revision 1.61
sys/arch/sun3/include/param3x.h: revision 1.18
Poor sun3 (but not sun3x) has only 31MB KVM address space,
so reduce NKMEMPAGES_MAX_DEFAULT from 64MB to 16MB.
Fixes "panic: ubc_init: failed to map ubc_object" on
TME emulating 3/120 with >16MB RAM.
Should be pulled up to netbsd-6.
Poor sun2 has only 14MB KVA space so reduce NKMEMPAGES_MIN_DEFAULT and
NKMEMPAGES_MAX_DEFAULT values accordingly.
XXX: netbsd-6 GENERIC still gets "panic: pool_get: kmem-4096: page empty"
Also reduce UBC_NWINS from default 1024 to 512
to avoid possible KVA shortage, otherwise
"panic: ubc_init: failed to map ubc_object"
could still happen on netbsd-6 branch.
Should be pulled up to netbsd-6.
 1.54.4.1 30-Oct-2012  yamt sync with head
 1.56.32.1 12-Apr-2018  martin Pull up following revision(s) (requested by mrg in ticket #745):

sys/arch/sun3/conf/Makefile.sun3: revision 1.106
sys/arch/sun3/conf/Makefile.sun3: revision 1.107
sys/arch/sun3/conf/GENERIC3X: revision 1.131
sys/arch/sun3/include/param3.h: revision 1.57
sys/arch/sun3/conf/GENERIC: revision 1.177
sys/arch/sun3/conf/GENERIC: revision 1.178
sys/arch/sun3/include/vmparam3.h: revision 1.39

sun3:
- build libkern as an archive for non modular builds. from maya@
- cut down GENERIC a bunch to bring below 2MB.
- reduce UBC_NWINS, MAXEXEC, and PAGER_MAP_DEFAULT_SIZE to recover
enough lost VA to actually run basic tests.

also disable SYSCTL_INCLUDE_DESCR.

copy sun3 disables to sun3x mostly. it has the same ufsboot 2MB limit.

Build compat code as .a if not MODULAR.

Removes some more unused functions.
 1.18 11-Aug-2012  tsutsui Poor sun3 (but not sun3x) has only 31MB KVM address space,
so reduce NKMEMPAGES_MAX_DEFAULT from 64MB to 16MB.
Fixes "panic: ubc_init: failed to map ubc_object" on
TME emulating 3/120 with >16MB RAM.

Should be pulled up to netbsd-6.
 1.17 08-Feb-2011  rmind branches: 1.17.4; 1.17.10;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.16 15-Oct-2010  tsutsui branches: 1.16.2; 1.16.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.15 11-Dec-2009  tsutsui branches: 1.15.2; 1.15.4;
Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSG, and SEGOFFSET from <machine/param.h>
to <machine/pmap.h> where they should belong
- don't use m68k_round_seg() and m68k_trunc_seg() in sun3 pmap sources
and instead define and use sun3_round_seg() and sun3_trunc_seg()
since they are quite pmap implementation dependent
 1.14 11-Dec-2005  christos branches: 1.14.78;
merge ktrace-lwp.
 1.13 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.12 05-Feb-1998  gwr branches: 1.12.48;
Merge arch/sun3x into arch/sun3
 1.11 03-Oct-1997  gwr branches: 1.11.4;
Increase MSGBUFOFF to 512 so we can be sure there is room for a
kernel core header before the message buffer.
 1.10 02-Oct-1997  gwr Fix MSGBUFSIZE
 1.9 20-Sep-1997  leo Move the definition of MSGBUFSIZE up to the machine-arch level if
possible. Pointed out by Bernd Ernesti.
 1.8 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.7 10-Jul-1997  veego branches: 1.7.2;
Restore the define of UPAGES.
 1.6 10-Jun-1997  veego Define NBSG from (1 << SEGSHIFT) and move some variables before
<m68k/param.h>.
 1.5 10-Jun-1997  veego Use the MI <m68k/param.h> include.
 1.4 27-Feb-1997  gwr Allow option MCLSHIFT=x to control MCLBYTES etc.
 1.3 26-Feb-1997  gwr Use ALIGNBYTES in the new ALIGNED_POINTER macro.
(That is always good enough on the m68k.)
 1.2 24-Feb-1997  fvdl Define ALIGNED_POINTER
 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.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7.2.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.11.4.2 04-Feb-1998  gwr Move UPAGES into the common file.
 1.11.4.1 27-Jan-1998  gwr Remove common stuff found in param.h
 1.12.48.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.48.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.48.1 03-Aug-2004  skrll Sync with HEAD
 1.14.78.1 11-Mar-2010  yamt sync with head
 1.15.4.1 05-Mar-2011  rmind sync with head
 1.15.2.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.16.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.16.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.17.10.1 13-Aug-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #487):
sys/arch/sun3/include/param3.h: revision 1.55
sys/arch/sun3/include/param3.h: revision 1.56
sys/arch/sun2/include/param.h: revision 1.15
sys/arch/sun3/include/param.h: revision 1.61
sys/arch/sun3/include/param3x.h: revision 1.18
Poor sun3 (but not sun3x) has only 31MB KVM address space,
so reduce NKMEMPAGES_MAX_DEFAULT from 64MB to 16MB.
Fixes "panic: ubc_init: failed to map ubc_object" on
TME emulating 3/120 with >16MB RAM.
Should be pulled up to netbsd-6.
Poor sun2 has only 14MB KVA space so reduce NKMEMPAGES_MIN_DEFAULT and
NKMEMPAGES_MAX_DEFAULT values accordingly.
XXX: netbsd-6 GENERIC still gets "panic: pool_get: kmem-4096: page empty"
Also reduce UBC_NWINS from default 1024 to 512
to avoid possible KVA shortage, otherwise
"panic: ubc_init: failed to map ubc_object"
could still happen on netbsd-6 branch.
Should be pulled up to netbsd-6.
 1.17.4.1 30-Oct-2012  yamt sync with head
 1.11 31-Mar-1997  gwr Use <m68k/pcb.h>
 1.10 20-Jan-1997  gwr Make this once again identical to the hp300 version.
Perhaps this should exist as <m68k/include/pcb.h>
 1.9 18-Jun-1996  gwr branches: 1.9.2;
Add the field "pcb_mmuctx" for future use by the pmap code.
(This will make later update of the pmap code much easier.)
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.5 25-May-1994  glass md_coredump
 1.4 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.3 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.2 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.9.2.2 18-Jun-1996  gwr Add the field "pcb_mmuctx" for future use by the pmap code.
(This will make later update of the pmap code much easier.)
 1.9.2.1 18-Jun-1996  gwr file pcb.h was added on branch netbsd-1-2 on 1996-06-18 16:03:46 +0000
 1.34 01-Feb-2020  tsutsui Use "__nothing" macro defined in <sys/cdefs.h> for empty pmap_update().

Suggested by pgoyette@ in PR/54869.
 1.33 18-Jan-2020  tsutsui Fix "modload nfsserver" failure on sun3. PR/54869

sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.
 1.32 11-Dec-2009  tsutsui branches: 1.32.64; 1.32.68; 1.32.70;
Export pmap_procwr() declaration only #ifdef _KERNEL.
 1.31 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.30 28-Apr-2008  martin branches: 1.30.6; 1.30.8;
Remove clause 3 and 4 from TNF licenses
 1.29 11-Dec-2005  christos branches: 1.29.74; 1.29.76; 1.29.78;
merge ktrace-lwp.
 1.28 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.27 26-Feb-1999  is branches: 1.27.42; 1.27.50;
sun3 part of fix for PR 6152
 1.26 16-Mar-1998  gwr Add an anonymous declaration of struct pmap in pmap.h and put
typedef struct pmap *pmap_t there, removing the latter from
pmap3.h and pmap3x.h (so LKMs can use <vm/vm.h>).
 1.25 15-Mar-1998  fair make sure _SUN3_ or _SUN3X_ is defined.
 1.24 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.23 03-Jan-1998  thorpej branches: 1.23.2;
Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
 1.22 02-Jan-1998  thorpej Make pmap_activate() take a proc *.
 1.21 28-Feb-1997  gwr Define pmap_page_index as a macro.
 1.20 18-Feb-1997  gwr No longer need pm_stats
 1.19 18-Feb-1997  gwr Add pmap_wired_count()
 1.18 27-Jan-1997  gwr branches: 1.18.4;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.17 27-Jan-1997  gwr Remove unused PMAP_ACTIVATE/PMAP_DEACTIVATE macros.
Add new _pmap_fault macro used in trap.c
Declare pmap_activate() correctly.
 1.16 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.15 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.14 28-Feb-1996  gwr update PMAP_PREFER
 1.13 10-Apr-1995  mycroft Bring back pmap_kernel(), for now always inlined as a pointer to
kernel_pmap_store.
 1.12 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.11 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 29-Jun-1994  gwr ..wrong version last time...
 1.8 28-Jun-1994  gwr Add PMEGQ_KERNEL for pmegs on the new kernel queue.
 1.7 24-Apr-1994  glass fixed to use new queue stuff. random diffs to make ddb stuff mostly compile
 1.6 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.5 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.4 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.3 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.2 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.1 27-Jul-1993  glass new pmap module
 1.18.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.23.2.1 27-Jan-1998  gwr Conditionally include *3.h or *3x.h as appropriate.
 1.27.50.1 29-Apr-2005  kent sync with -current
 1.27.42.1 24-Jan-2005  skrll Sync with HEAD.
 1.29.78.3 11-Mar-2010  yamt sync with head
 1.29.78.2 04-May-2009  yamt sync with head.
 1.29.78.1 16-May-2008  yamt sync with head.
 1.29.76.1 18-May-2008  yamt sync with head.
 1.29.74.2 17-Jan-2009  mjf Sync with HEAD.
 1.29.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.30.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.30.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.32.70.2 29-Feb-2020  ad Sync with head.
 1.32.70.1 25-Jan-2020  ad Sync with head.
 1.32.68.1 21-Jan-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #636):

sys/arch/sun3/include/pmap.h: revision 1.33
sys/arch/sun3/include/pmap3.h: revision 1.50
sys/arch/sun3/include/pmap3x.h: revision 1.30

Fix "modload nfsserver" failure on sun3. PR/54869
sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.
 1.32.64.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.51 14-Mar-2020  ad pmap_remove_all(): Return a boolean value to indicate the behaviour. If
true, all mappings have been removed, the pmap is totally cleared out, and
UVM can then avoid doing the work to call pmap_remove() for each map entry.
If false, either nothing has been done, or some helpful arch-specific voodoo
has taken place.
 1.50 18-Jan-2020  tsutsui Fix "modload nfsserver" failure on sun3. PR/54869

sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.
 1.49 07-Jan-2013  chs branches: 1.49.38; 1.49.42; 1.49.44;
switch to __USE_TOPDOWN_VM.
 1.48 03-Jun-2011  tsutsui branches: 1.48.2; 1.48.12;
- 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.47 11-Dec-2009  tsutsui branches: 1.47.4; 1.47.6; 1.47.10;
Export NBSG for bootloaders. MMU is enabled even on PROM on sun68k machines.
 1.46 11-Dec-2009  tsutsui Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSG, and SEGOFFSET from <machine/param.h>
to <machine/pmap.h> where they should belong
- don't use m68k_round_seg() and m68k_trunc_seg() in sun3 pmap sources
and instead define and use sun3_round_seg() and sun3_trunc_seg()
since they are quite pmap implementation dependent
 1.45 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.44 28-Apr-2008  martin branches: 1.44.6; 1.44.8;
Remove clause 3 and 4 from TNF licenses
 1.43 04-Jan-2008  ad branches: 1.43.6; 1.43.8; 1.43.10;
Don't pull in unrelated gunk.
 1.42 01-Oct-2006  tsutsui branches: 1.42.28; 1.42.34; 1.42.42;
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.41 16-Feb-2006  perry branches: 1.41.14; 1.41.16;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.40 24-Dec-2005  perry branches: 1.40.2; 1.40.4; 1.40.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.39 11-Dec-2005  christos merge ktrace-lwp.
 1.38 22-Jan-2005  chs branches: 1.38.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.37 17-Jan-2005  atatat Convert the PMAP_PREFER() macro from two arguments (offset and hint)
to four (adding size and direction).

In order for topdown uvm to be an option on ports using PMAP_PREFER,
they will need to "prefer" lower addresses if topdown is being used.
Additionally, at least one port also needs to know the size.
 1.36 22-Sep-2002  chs branches: 1.36.6; 1.36.14;
it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not. doh.
 1.35 22-Sep-2002  chs add pmap_remove_all() hook (empty on most platforms so far).
 1.34 10-Sep-2001  chris branches: 1.34.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.33 03-Jul-2001  chs branches: 1.33.2; 1.33.4;
vm_offset_t -> [pv]addr_t.
 1.32 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.31 26-May-2001  chs replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}.
 1.30 25-Apr-2001  thorpej Garbage-collect pmap_page_index().
 1.29 22-Apr-2001  thorpej Undo a misguided previous change to the pmap_update() API.
 1.28 22-Apr-2001  thorpej Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
 1.27 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.26 16-Mar-1998  gwr branches: 1.26.14; 1.26.26;
Add an anonymous declaration of struct pmap in pmap.h and put
typedef struct pmap *pmap_t there, removing the latter from
pmap3.h and pmap3x.h (so LKMs can use <vm/vm.h>).
 1.25 18-Feb-1998  cgd Move pmap_map() function definition to MD headers, as appropriate. It's
an internal function, and the VM system shouldn't try to prototype it.
(Note that some ports _don't_ prototype it.)
 1.24 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.23 03-Jan-1998  thorpej branches: 1.23.4;
Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
 1.22 02-Jan-1998  thorpej Make pmap_activate() take a proc *.
 1.21 28-Feb-1997  gwr Define pmap_page_index as a macro.
 1.20 18-Feb-1997  gwr No longer need pm_stats
 1.19 18-Feb-1997  gwr Add pmap_wired_count()
 1.18 27-Jan-1997  gwr branches: 1.18.4;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.17 27-Jan-1997  gwr Remove unused PMAP_ACTIVATE/PMAP_DEACTIVATE macros.
Add new _pmap_fault macro used in trap.c
Declare pmap_activate() correctly.
 1.16 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.15 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.14 28-Feb-1996  gwr update PMAP_PREFER
 1.13 10-Apr-1995  mycroft Bring back pmap_kernel(), for now always inlined as a pointer to
kernel_pmap_store.
 1.12 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.11 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 29-Jun-1994  gwr ..wrong version last time...
 1.8 28-Jun-1994  gwr Add PMEGQ_KERNEL for pmegs on the new kernel queue.
 1.7 24-Apr-1994  glass fixed to use new queue stuff. random diffs to make ddb stuff mostly compile
 1.6 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.5 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.4 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.3 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.2 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.1 27-Jul-1993  glass new pmap module
 1.18.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.23.4.1 27-Jan-1998  gwr Make structure layout match Sun3X (just in case useland cares).
 1.26.26.1 21-Jun-2001  nathanw Catch up to -current.
 1.26.14.1 23-Apr-2001  bouyer Sync with HEAD.
 1.33.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.33.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.33.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.34.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.34.4.1 10-Sep-2001  nathanw file pmap3.h was added on branch nathanw_sa on 2002-10-18 02:40:22 +0000
 1.36.14.1 29-Apr-2005  kent sync with -current
 1.36.6.2 24-Jan-2005  skrll Sync with HEAD.
 1.36.6.1 17-Jan-2005  skrll Sync with HEAD.
 1.38.8.2 21-Jan-2008  yamt sync with head
 1.38.8.1 30-Dec-2006  yamt sync with head.
 1.40.6.1 22-Apr-2006  simonb Sync with head.
 1.40.4.1 09-Sep-2006  rpaulo sync with head
 1.40.2.1 18-Feb-2006  yamt sync with head.
 1.41.16.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.41.14.1 18-Nov-2006  ad Sync with head.
 1.42.42.1 08-Jan-2008  bouyer Sync with HEAD
 1.42.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.42.28.1 09-Jan-2008  matt sync with HEAD
 1.43.10.3 11-Mar-2010  yamt sync with head
 1.43.10.2 04-May-2009  yamt sync with head.
 1.43.10.1 16-May-2008  yamt sync with head.
 1.43.8.1 18-May-2008  yamt sync with head.
 1.43.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.43.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.44.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.44.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.47.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.47.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.47.4.1 12-Jun-2011  rmind sync with head
 1.48.12.1 25-Feb-2013  tls resync with head
 1.48.2.1 23-Jan-2013  yamt sync with head
 1.49.44.1 25-Jan-2020  ad Sync with head.
 1.49.42.1 21-Jan-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #636):

sys/arch/sun3/include/pmap.h: revision 1.33
sys/arch/sun3/include/pmap3.h: revision 1.50
sys/arch/sun3/include/pmap3x.h: revision 1.30

Fix "modload nfsserver" failure on sun3. PR/54869
sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.
 1.49.38.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.32 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.31 14-Mar-2020  ad branches: 1.31.28;
pmap_remove_all(): Return a boolean value to indicate the behaviour. If
true, all mappings have been removed, the pmap is totally cleared out, and
UVM can then avoid doing the work to call pmap_remove() for each map entry.
If false, either nothing has been done, or some helpful arch-specific voodoo
has taken place.
 1.30 18-Jan-2020  tsutsui Fix "modload nfsserver" failure on sun3. PR/54869

sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.
 1.29 03-Jun-2011  tsutsui branches: 1.29.54; 1.29.58; 1.29.60;
- 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.28 11-Dec-2009  tsutsui branches: 1.28.4; 1.28.6; 1.28.10;
Export NBSG for bootloaders. MMU is enabled even on PROM on sun68k machines.
 1.27 11-Dec-2009  tsutsui Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSG, and SEGOFFSET from <machine/param.h>
to <machine/pmap.h> where they should belong
- don't use m68k_round_seg() and m68k_trunc_seg() in sun3 pmap sources
and instead define and use sun3_round_seg() and sun3_trunc_seg()
since they are quite pmap implementation dependent
 1.26 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.25 28-Apr-2008  martin branches: 1.25.6; 1.25.8;
Remove clause 3 and 4 from TNF licenses
 1.24 04-Jan-2008  ad branches: 1.24.6; 1.24.8; 1.24.10;
Don't pull in unrelated gunk.
 1.23 01-Oct-2006  tsutsui branches: 1.23.28; 1.23.34; 1.23.42;
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.22 16-Feb-2006  perry branches: 1.22.14; 1.22.16;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.21 24-Dec-2005  perry branches: 1.21.2; 1.21.4; 1.21.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.20 11-Dec-2005  christos merge ktrace-lwp.
 1.19 22-Jan-2005  chs branches: 1.19.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.18 22-Sep-2002  chs branches: 1.18.6; 1.18.14;
it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not. doh.
 1.17 22-Sep-2002  chs add pmap_remove_all() hook (empty on most platforms so far).
 1.16 10-Sep-2001  chris branches: 1.16.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.15 03-Jul-2001  chs branches: 1.15.2; 1.15.4;
vm_offset_t -> [pv]addr_t.
 1.14 26-May-2001  chs replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}.
 1.13 22-Apr-2001  thorpej Undo a misguided previous change to the pmap_update() API.
 1.12 22-Apr-2001  thorpej Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
 1.11 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.10 09-Jun-1998  gwr branches: 1.10.14; 1.10.26;
Move sun3x _pmap_fault macro from pmap.h to trap.c
 1.9 16-Mar-1998  gwr Add an anonymous declaration of struct pmap in pmap.h and put
typedef struct pmap *pmap_t there, removing the latter from
pmap3.h and pmap3x.h (so LKMs can use <vm/vm.h>).
 1.8 18-Feb-1998  cgd Move pmap_map() function definition to MD headers, as appropriate. It's
an internal function, and the VM system shouldn't try to prototype it.
(Note that some ports _don't_ prototype it.)
 1.7 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.6 03-Jan-1998  thorpej branches: 1.6.4;
Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
 1.5 02-Jan-1998  thorpej Make pmap_activate() take a proc *.
 1.4 14-Feb-1997  gwr Define pmap_resident_count(), pmap_wired_count() as
macros that call pmap_count(). (from Jeremy).
 1.3 12-Feb-1997  gwr In struct pmap, replace pm_mmucrp with pm_a_phys.
Define pmap_resident_count(), pmap_wired_count()
to call pmap_resident_pages(), pmap_wired_pages()
respectively, so we can keep those statistics on
lower-level structures instead of here.
 1.2 23-Jan-1997  gwr branches: 1.2.4;
Add <machine/pte.h> and the new pm_mmucrp member of struct pmap.
Kill macros PMAP_ACTIVATE and PMAP_ACTIVATE (not used).
Add macro _pmap_fault for use in trap.c
 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.6.4.1 27-Jan-1998  gwr Some comments, etc.
 1.10.26.1 21-Jun-2001  nathanw Catch up to -current.
 1.10.14.1 23-Apr-2001  bouyer Sync with HEAD.
 1.15.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.15.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.15.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.16.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.16.4.1 10-Sep-2001  nathanw file pmap3x.h was added on branch nathanw_sa on 2002-10-18 02:40:22 +0000
 1.18.14.1 29-Apr-2005  kent sync with -current
 1.18.6.1 24-Jan-2005  skrll Sync with HEAD.
 1.19.8.2 21-Jan-2008  yamt sync with head
 1.19.8.1 30-Dec-2006  yamt sync with head.
 1.21.6.1 22-Apr-2006  simonb Sync with head.
 1.21.4.1 09-Sep-2006  rpaulo sync with head
 1.21.2.1 18-Feb-2006  yamt sync with head.
 1.22.16.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.22.14.1 18-Nov-2006  ad Sync with head.
 1.23.42.1 08-Jan-2008  bouyer Sync with HEAD
 1.23.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.23.28.1 09-Jan-2008  matt sync with HEAD
 1.24.10.3 11-Mar-2010  yamt sync with head
 1.24.10.2 04-May-2009  yamt sync with head.
 1.24.10.1 16-May-2008  yamt sync with head.
 1.24.8.1 18-May-2008  yamt sync with head.
 1.24.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.24.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.25.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.25.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.28.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.28.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.28.4.1 12-Jun-2011  rmind sync with head
 1.29.60.1 25-Jan-2020  ad Sync with head.
 1.29.58.1 21-Jan-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #636):

sys/arch/sun3/include/pmap.h: revision 1.33
sys/arch/sun3/include/pmap3.h: revision 1.50
sys/arch/sun3/include/pmap3x.h: revision 1.30

Fix "modload nfsserver" failure on sun3. PR/54869
sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.
 1.29.54.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.31.28.1 02-Aug-2025  perseant Sync with HEAD
 1.2 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

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

* Removes the PMC code of ARM XSCALE.

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

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

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

* Removes the pmc_evid_t and pmc_ctr_t types.

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

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.1.204.1 10-Jun-2019  christos Sync with HEAD
 1.1.202.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 07-Aug-2002  jdolecek file pmc.h was added on branch kqueue on 2002-09-06 08:42:10 +0000
 1.1.4.2 31-Aug-2002  gehenna catch up with -current.
 1.1.4.1 07-Aug-2002  gehenna file pmc.h was added on branch gehenna-devsw on 2002-08-31 14:52:44 +0000
 1.1.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 07-Aug-2002  nathanw file pmc.h was added on branch nathanw_sa on 2002-08-13 02:19:00 +0000
 1.9 13-Jul-2002  scw m68k syscall rototill:

- Switch all m68k-based ports over to __HAVE_SYSCALL_INTERN.
- Add systrace glue.
- Define struct mdproc in <m68k/proc.h> instead of <machine/proc.h>.
(They were all defined exactly the same anyway, other than a couple
of the MDP_* flags.)
 1.8 25-Nov-1996  gwr branches: 1.8.44; 1.8.48; 1.8.56;
Get rid of md_upte[] and my copyright line.
 1.7 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 23-Jul-1994  gwr branches: 1.5.2;
Get rid of MDP_AST
 1.4 27-May-1994  gwr branches: 1.4.2;
Catch up with frame.h chages, merge stuff from new hp300 port.
 1.3 06-May-1994  gwr Track changes to proc.h
 1.2 12-Dec-1993  glass snapshot of my private sources
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.4.2.1 26-Jul-1994  cgd From trunk.
 1.5.2.2 23-Jul-1994  gwr Get rid of MDP_AST
 1.5.2.1 23-Jul-1994  gwr file proc.h was added on branch netbsd-1-0 on 1994-07-23 03:23:45 +0000
 1.8.56.1 17-Jul-2002  gehenna catch up with -current.
 1.8.48.2 01-Aug-2002  nathanw Catch up to -current.
 1.8.48.1 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.8.44.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 30-May-1994  glass so libkern compiles
 1.20 28-May-2001  chs branches: 1.20.8;
move the spl*() and IPL_* definitions to intr.h.
 1.19 13-Apr-2001  thorpej Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
 1.18 22-Feb-2001  chs branches: 1.18.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.17 14-Jan-2001  thorpej Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
 1.16 22-Aug-2000  thorpej Add spllock(). See spl(9) for details.
 1.15 05-Aug-1999  thorpej branches: 1.15.2;
Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.
 1.14 24-Nov-1998  kleink Need declarations of defined inlined spl/sr functions.
 1.13 29-May-1997  gwr Add inline definitions for _getsr() and _splraise(), and
define splimp() using splraise so early calls to the VM
code (and pmap) do not accidently enable interrupts.
 1.12 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.11 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.10 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.9 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.8 10-Oct-1995  gwr The previous hack to save two instructions when the
return value of splx() was ignored did not prevent the
optimizer from re-ordering the asm statements! (Yikes!)
Revert this to the old, single asm statement method.
Thanks VERY MUCH to David Jones for finding this!
 1.7 13-Aug-1995  mycroft Add splsoftnet().
 1.6 27-Mar-1995  gwr Put spltty at level 4 and adjust others appropriately.
Also, improve the inline _spl() and move it to psl.h
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.15.2.4 21-Apr-2001  bouyer Sync with HEAD
 1.15.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.15.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.15.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.20.8.2 28-May-2001  chs move the spl*() and IPL_* definitions to intr.h.
 1.20.8.1 28-May-2001  chs file psl.h was added on branch nathanw_sa on 2001-05-28 21:06:20 +0000
 1.20 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.19 11-Dec-2005  christos branches: 1.19.74; 1.19.76; 1.19.78;
merge ktrace-lwp.
 1.18 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.17 05-Sep-2001  tsutsui branches: 1.17.6; 1.17.22; 1.17.30;
vm_offset_t -> vaddr_t
 1.16 05-Feb-1998  gwr branches: 1.16.28;
Merge arch/sun3x into arch/sun3
 1.15 10-Jun-1997  veego branches: 1.15.10;
Delete _btos and _stob.
The remaining 'Mach derived conversion macros' are now in <m68k/param.h>
 1.14 13-Mar-1997  gwr s/sun3_/_/ in sun3_(round|trunc)_(page|seg) macros
 1.13 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.12 18-Jan-1997  gwr Move sun3_btop (etc.) macros from param.h to pte.h
 1.11 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.10 05-May-1996  gwr Add VA_SEGNUM for libkvm.
 1.9 10-Mar-1995  gwr Fix PA_PGNUM for high addresses (cast to unsigned).
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.3 08-Aug-1993  glass various changes
 1.2 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.1 27-Jul-1993  glass new pmap module
 1.15.10.1 27-Jan-1998  gwr Conditionally include *3.h or *3x.h as appropriate.
 1.16.28.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.17.30.1 29-Apr-2005  kent sync with -current
 1.17.22.1 24-Jan-2005  skrll Sync with HEAD.
 1.17.6.2 05-Sep-2001  tsutsui vm_offset_t -> vaddr_t
 1.17.6.1 05-Sep-2001  tsutsui file pte.h was added on branch nathanw_sa on 2001-09-05 13:31:37 +0000
 1.19.78.1 16-May-2008  yamt sync with head.
 1.19.76.1 18-May-2008  yamt sync with head.
 1.19.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.18 12-Jan-2009  tsutsui Add parantheses to macro to suppress possible compiler warnings.
 1.17 28-Apr-2008  martin branches: 1.17.8;
Remove clause 3 and 4 from TNF licenses
 1.16 05-Feb-1998  gwr branches: 1.16.150; 1.16.152; 1.16.154;
Merge arch/sun3x into arch/sun3
 1.15 10-Jun-1997  veego branches: 1.15.4;
Delete _btos and _stob.
The remaining 'Mach derived conversion macros' are now in <m68k/param.h>
 1.14 13-Mar-1997  gwr s/sun3_/_/ in sun3_(round|trunc)_(page|seg) macros
 1.13 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.12 18-Jan-1997  gwr Move sun3_btop (etc.) macros from param.h to pte.h
 1.11 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.10 05-May-1996  gwr Add VA_SEGNUM for libkvm.
 1.9 10-Mar-1995  gwr Fix PA_PGNUM for high addresses (cast to unsigned).
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.3 08-Aug-1993  glass various changes
 1.2 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.1 27-Jul-1993  glass new pmap module
 1.15.4.1 27-Jan-1998  gwr Minor tweaks.
 1.16.154.2 04-May-2009  yamt sync with head.
 1.16.154.1 16-May-2008  yamt sync with head.
 1.16.152.1 18-May-2008  yamt sync with head.
 1.16.150.2 17-Jan-2009  mjf Sync with HEAD.
 1.16.150.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.9 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.8 28-Apr-2008  martin branches: 1.8.124;
Remove clause 3 and 4 from TNF licenses
 1.7 05-Feb-1998  gwr branches: 1.7.150; 1.7.152; 1.7.154;
Merge arch/sun3x into arch/sun3
 1.6 10-Jun-1997  veego branches: 1.6.4;
Delete _btos and _stob.
The remaining 'Mach derived conversion macros' are now in <m68k/param.h>
 1.5 14-May-1997  jeremy Long awaited MI/MD separation completed.
 1.4 13-Mar-1997  gwr s/sun3x_/_/ in sun3x_(round|trunc)_(page|seg) macros
 1.3 23-Jan-1997  gwr Wrap prototypes with ifdef _KERNEL
 1.2 16-Jan-1997  gwr Add an introductory comment about pte.h vs mc68851.h
Move sun3x_round_up_page() to here.
 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 27-Jan-1998  gwr Remove Sun3 stuff that did not belong, etc.
 1.7.154.1 16-May-2008  yamt sync with head.
 1.7.152.1 18-May-2008  yamt sync with head.
 1.7.150.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.124.1 02-Aug-2025  perseant Sync with HEAD
 1.4 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.1 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.11 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.8 27-Jan-1994  cgd HP300 -> MACHINE
 1.7 08-Jan-1994  cgd stubs which pint to m68k include
 1.6 06-Jan-1994  mycroft Still need old #defines for now.
 1.5 06-Jan-1994  mycroft Implement `struct reg'.
 1.4 08-Dec-1993  mycroft Move #define of NIPCREG outside #fidef.
 1.3 02-Sep-1993  mycroft Ditto.
 1.2 22-May-1993  cgd add rcsids to everything and clean up headers
 1.1 13-May-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 13-May-1993  cgd add hp300 kernel files. generic kernel files might need some help...
 1.2 12-Feb-1997  gwr Now using <sys/kgdb.h>
 1.1 15-Jun-1996  gwr branches: 1.1.2; 1.1.6;
Add KGDB support
 1.1.6.1 12-Mar-1997  is Merge in changes from The Trunk
 1.1.2.2 15-Jun-1996  gwr Add KGDB support
 1.1.2.1 15-Jun-1996  gwr file remote-sl.h was added on branch netbsd-1-2 on 1996-06-15 14:34:36 +0000
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file rwlock.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file rwlock.h was added on branch yamt-lazymbuf on 2007-02-26 09:08:35 +0000
 1.5 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.4 27-Jan-1997  gwr branches: 1.4.14;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.3 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.2 24-May-1995  gwr Define struct saif
 1.1 07-Feb-1995  gwr Add saio.h and move relevant struct from mon.h into it.
 1.4.14.1 25-Jan-1998  gwr Now in ../stand/libsa
 1.1 20-Dec-1994  cgd make the definition of _JBLEN mach. dep. header-dependent.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.6 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.5 20-Jun-1998  mrg moved to <dev/sun/disklabel.h>
 1.4 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.3 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 13-May-1994  gwr SCSI driver works!
 1.2 11-Dec-2005  christos branches: 1.2.18;
merge ktrace-lwp.
 1.1 11-Jul-2005  christos branches: 1.1.6;
Add m68k sunos_machdep.h
 1.1.6.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.6.1 11-Jul-2005  skrll file sunos_machdep.h was added on branch ktrace-lwp on 2005-11-10 13:59:54 +0000
 1.2.18.2 21-Jun-2006  yamt sync with head.
 1.2.18.1 11-Dec-2005  yamt file sunos_machdep.h was added on branch yamt-lazymbuf on 2006-06-21 14:57:16 +0000
 1.4 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.3 09-Nov-1999  kleink branches: 1.3.40; 1.3.218;
Rip protection against multiple inclusion from wrapper headers.
 1.2 29-Apr-1999  kleink branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10;
Pull in the right generic m68k header. (Where was my mind?)
 1.1 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.2.10.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.6.1 15-Nov-1999  fvdl Sync with -current
 1.2.4.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.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3.218.1 10-Jun-2019  christos Sync with HEAD
 1.3.40.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.8 11-Mar-1997  gwr Remove unnecessary differences (T_BRKPT, T_WATCHPOINT gone).
 1.7 21-Nov-1994  gwr branches: 1.7.12;
Lots of changes. Fairly stable now.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.3 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.2 10-Aug-1993  glass fixed problem that caused two consecutive segments to be using the same
pmeg unknowingly. still too many printfs, not sure how many are actualy
in the machine dependent code. reaches cpu_startup() where it stops
deliberately. next project: autoconfig(), maybe kgdb
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.7.12.1 12-Mar-1997  is Merge in changes from The Trunk
 1.23 14-Jan-2024  thorpej Merge common sun68k types defns into <sun68k/types.h>.
 1.22 01-Apr-2021  simonb Define __HAVE_LEGACY_INTRCNT to indicate this port uses legacy intrcnt
interrupt accounting.
 1.21 01-Apr-2021  simonb Whitespace: #define<tab>
 1.20 08-May-2018  christos branches: 1.20.14; 1.20.16;
make as not having pmap statistics available
 1.19 28-Oct-2012  chs branches: 1.19.36;
no need to define __BROKEN_CONFIG_UNIT_USAGE, the code that this enabled
has been gone for years.
 1.18 12-Jun-2011  rmind branches: 1.18.2; 1.18.12;
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.17 20-Jan-2008  joerg branches: 1.17.32; 1.17.42;
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.16 17-Oct-2007  garbled branches: 1.16.2; 1.16.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.15 14-Jul-2007  ad branches: 1.15.10;
Generic soft interrupts are mandatory.
 1.14 05-Oct-2006  tsutsui branches: 1.14.8; 1.14.16;
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.13 05-Sep-2006  gdamore branches: 1.13.2; 1.13.4;
Update sun3 to use timecounters (interrupt clock only) and generic-todr.
 1.12 28-Feb-2002  simonb branches: 1.12.32; 1.12.46; 1.12.50;
Use "#define<tab>".
 1.11 05-Feb-2000  cgd branches: 1.11.8; 1.11.12;
add __BROKEN_CONFIG_UNIT_USAGE #define, becuase these ports do very
wrong things with device configuration data "cf_unit" information.
 1.10 17-Dec-1996  gwr branches: 1.10.30;
Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.9 05-Dec-1996  cgd First step inn removing config_scan() and the hacks that gave devices
on indirect-config busses a (permanent) softc that they could share
between 'match' and 'attach' routines:

Define __BROKEN_INDIRECT_CONFIG so that old autoconfiguration
interfaces are used, until drivers are converted to use the new
interfaces (actually, converted back to use the _older_ interfaces)
which prohibit indirect configuration devices from receiving a softc
in their match routine that they can share with their attach routine.
 1.8 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.7 27-Jun-1995  gwr Remove temporary __BDEVSW_DUMP_OLD_TYPE (our dumpsys is safe 8^)
 1.6 26-Jun-1995  cgd define __BDEVSW_DUMP_OLD_TYPE for ports where it's true. clean up
some m68k ports inclusion of common header.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.10.30.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.11.12.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.11.8.1 16-Mar-2002  jdolecek Catch up with -current.
 1.12.50.1 14-Sep-2006  yamt sync with head.
 1.12.46.1 09-Sep-2006  rpaulo sync with head
 1.12.32.3 21-Jan-2008  yamt sync with head
 1.12.32.2 03-Sep-2007  yamt sync with head.
 1.12.32.1 30-Dec-2006  yamt sync with head.
 1.13.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.13.2.1 18-Nov-2006  ad Sync with head.
 1.14.16.1 03-Oct-2007  garbled Sync with HEAD
 1.14.8.1 15-Jul-2007  ad Sync with head.
 1.15.10.2 23-Mar-2008  matt sync with HEAD
 1.15.10.1 06-Nov-2007  matt sync with HEAD
 1.16.8.1 23-Jan-2008  bouyer Sync with HEAD.
 1.16.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.17.42.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.17.32.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.18.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.2.1 30-Oct-2012  yamt sync with head
 1.19.36.1 21-May-2018  pgoyette Sync with HEAD
 1.20.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.20.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 23-May-1994  gwr Contents got doubled somehow - remove 2nd copy.
 1.2 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.1 27-Jan-1994  mycroft Pointer to common version.
 1.1 13-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k vector table.
 1.38 01-Feb-2020  tsutsui Add MAX/MIN PAGE_SIZE and PAGE_SHIFT definitions of m68k for jemalloc(3).

Background:
- All m68k ports have fixed PAGE_SIZE value in their kernels,
but each port uses different PAGE_SIZE value (4096 or 8192)
due to historical reasons.
- Currently module(7) binaries are built per each port so
all m68k kernel sources don't support run-time variable PAGE_SIZE.
- MI <uvm/uvm_param.h> assumes that the port supports a variable
PAGE_SIZE on module(7) builds if both MAX_PAGE_SIZE and MIN_PAGE_SIZE
are defined and they have different values.
- On the other hand, jemalloc(3) checks MAX_PAGE_SHIFT in
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
for internal optimization.
- m68k ports share userland binaries (especially pkgsrc binaries)
among all ports, so we need to define MAX_PAGE_SHIFT as 13 to
support m68k ports where PAGE_SIZE==8192.
(though this would affect only if static binaries built on
4k page hosts are executed on 8k page hosts)

To solve these inconsistency on PAGE_SIZE definitions,
we should have an independent PAGE_SIZE related definitions
for userland, but it requires major reorganization.
For now (especially for netbsd-9) we define MAX/MIN PAGE_SIZE and
PAGE_SHIFT values in <m68k/vmparam.h> only in !defined(_KERNEL) case.

Discussed on source-changes-d@ and tech-kern@ with christos@ and thorpej@:
https://mail-index.netbsd.org/source-changes-d/2020/01/thread1.html#012035
https://mail-index.netbsd.org/tech-kern/2020/01/thread1.html#025954

Should be pulled up to netbsd-9.
 1.37 07-Jan-2013  chs branches: 1.37.38; 1.37.42; 1.37.44;
switch to __USE_TOPDOWN_VM.
 1.36 06-Nov-2010  uebayasi branches: 1.36.8; 1.36.18;
Remove incomplete, never worked dynamic run-time memory registration
(uvm_page_physload(9)). This functionality will be re-added later.
 1.35 15-Oct-2010  tsutsui 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.34 30-Apr-2010  pooka Raise the blade, make the change, don't quite rearrange to where
it's sane. But improves the non-monolithic kernel case anyway.
 1.33 28-Apr-2008  martin branches: 1.33.20; 1.33.22;
Remove clause 3 and 4 from TNF licenses
 1.32 02-Apr-2003  thorpej branches: 1.32.104; 1.32.106; 1.32.108;
Use PAGE_SIZE rather than NBPG.
 1.31 15-Nov-2001  soren MAXSLP is defined to be a machine-independent scheduling parameter,
so move it into sys/param.h.
 1.30 03-Jul-2001  chs branches: 1.30.2; 1.30.8;
move parts that are the same from vmparam3{,x}.h to vmparam.h.
 1.29 01-May-2001  thorpej Per discussion w/ chuck and chuck, restructure the md page stuff
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
 1.28 29-Apr-2001  thorpej Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure. Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM. These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

This deprecates struct pmap_physseg. As a transitional measure,
allow a port to #define PMAP_PHYSSEG so that it can continue to
use it until its pmap is converted to use VM_MDPAGE_MEMBERS.

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now). Changes to other pmap
modules will follow.
 1.27 04-Feb-2001  jmc branches: 1.27.2;
In the LKM section add some things the LKM's need (since they aren't
defining _SUN3_ or _SUN3X_ generally to pickup the full vmparam.h

Added MAXDSIZ (set to sun3's limit) and VM_NFREELIST
 1.26 14-Nov-2000  thorpej Sun3 and Sun3x both use 8K pages. Make PAGE_* and friends into
compile-time constants.
 1.25 26-Jan-2000  tsutsui Remove obsoleted macros.
 1.24 04-Dec-1999  ragge CL* discarding.
 1.23 10-Apr-1999  gwr branches: 1.23.2; 1.23.8; 1.23.14;
Fix compile error in: sys/lkm/vfs/miscfs/procfs
 1.22 05-Apr-1999  gwr Move VM_PHYSSEG_MAX to the common vmparam.h (needed by LKMs).
 1.21 18-Feb-1999  gwr It appears that pmap_physseg is now required in userland. Too bad.
 1.20 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.19 12-Jul-1997  perry branches: 1.19.8;
update comment from 1981 on memory and disk prices -- pr-2754 from Curt Sampson
 1.18 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.17 29-May-1997  gwr Increase the default datasize limit to 16MB (enough to build libc).
 1.16 27-Feb-1997  gwr branches: 1.16.2;
Define VM_MAX_KERNEL_ADDRESS using KERN_END instead of a constant.
 1.15 18-Jan-1997  gwr branches: 1.15.2; 1.15.4;
Define MACHINE_NONCONTIG here instead of in conf/std.sun3.
 1.14 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.13 08-Aug-1995  gwr Add default value for SHMMAXPGS (from Jason Thorpe - fixes PR#1220)
 1.12 24-May-1995  gwr Update cpu_fork() to eliminate double mapping of kernel stacks.
 1.11 13-Feb-1995  gwr DVMA slave mapping support.
 1.10 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.9 26-Oct-1994  cgd new RCS ID format.
 1.8 12-Dec-1993  glass snapshot of my private sources
 1.7 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.6 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.5 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.4 13-Aug-1993  glass snapshot. ready to call configure(), partial integration of torek's config
stuff, i.e it looks to do the right thing but we haven't written any code
yet :)
 1.3 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.2 27-Jul-1993  glass new pmap module
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.15.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.15.2.1 12-Feb-1997  mrg initial work for dynamic swap additions.
 1.16.2.2 01-Jun-1997  mrg update to trunk.
 1.16.2.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.19.8.3 05-Feb-1998  gwr OK, move some stuff back to the kernel-only part.
 1.19.8.2 04-Feb-1998  gwr Move a few things to the common file:
USRTEXT, MAXSLP, SAFERSS, VM_*
 1.19.8.1 27-Jan-1998  gwr Conditionally include *3.h or *3x.h as appropriate.
 1.23.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.23.8.3 11-Feb-2001  bouyer Sync with HEAD.
 1.23.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.23.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.23.2.2 10-Apr-1999  gwr Fix compile error in: sys/lkm/vfs/miscfs/procfs
 1.23.2.1 10-Apr-1999  gwr file vmparam.h was added on branch netbsd-1-4 on 1999-04-10 02:15:47 +0000
 1.27.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.30.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.30.8.1 03-Jul-2001  nathanw file vmparam.h was added on branch nathanw_sa on 2002-01-08 00:28:19 +0000
 1.30.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.32.108.2 11-Aug-2010  yamt sync with head.
 1.32.108.1 16-May-2008  yamt sync with head.
 1.32.106.1 18-May-2008  yamt sync with head.
 1.32.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.33.22.2 05-Mar-2011  rmind sync with head
 1.33.22.1 30-May-2010  rmind sync with head
 1.33.20.3 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.33.20.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.33.20.1 26-Apr-2010  uebayasi Remove the unfinished code to add a memory segment after uvm_page_init().
It doesn't even compile.

(In the future, we should allocate struct vm_page [] on the added memory
segment for NUMA's sake.)
 1.36.18.1 25-Feb-2013  tls resync with head
 1.36.8.1 23-Jan-2013  yamt sync with head
 1.37.44.1 29-Feb-2020  ad Sync with head.
 1.37.42.1 10-Feb-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #682):

sys/arch/next68k/include/vmparam.h: revision 1.27
sys/arch/mac68k/include/vmparam.h: revision 1.46
sys/arch/sun3/include/vmparam.h: revision 1.38
sys/arch/m68k/include/vmparam.h: revision 1.1
sys/arch/hp300/include/vmparam.h: revision 1.41
sys/arch/m68k/include/Makefile: revision 1.32
sys/arch/amiga/include/vmparam.h: revision 1.48
distrib/sets/lists/comp/ad.m68k: revision 1.63
sys/arch/x68k/include/vmparam.h: revision 1.40
sys/arch/mvme68k/include/vmparam.h: revision 1.38
sys/arch/luna68k/include/vmparam.h: revision 1.23
sys/arch/news68k/include/vmparam.h: revision 1.23
sys/arch/atari/include/vmparam.h: revision 1.34
sys/arch/cesfic/include/vmparam.h: revision 1.19

Add MAX/MIN PAGE_SIZE and PAGE_SHIFT definitions of m68k for jemalloc(3).

Background:
- All m68k ports have fixed PAGE_SIZE value in their kernels,
but each port uses different PAGE_SIZE value (4096 or 8192)
due to historical reasons.
- Currently module(7) binaries are built per each port so
all m68k kernel sources don't support run-time variable PAGE_SIZE.
- MI <uvm/uvm_param.h> assumes that the port supports a variable
PAGE_SIZE on module(7) builds if both MAX_PAGE_SIZE and MIN_PAGE_SIZE
are defined and they have different values.
- On the other hand, jemalloc(3) checks MAX_PAGE_SHIFT in
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
for internal optimization.
- m68k ports share userland binaries (especially pkgsrc binaries)
among all ports, so we need to define MAX_PAGE_SHIFT as 13 to
support m68k ports where PAGE_SIZE==8192.
(though this would affect only if static binaries built on
4k page hosts are executed on 8k page hosts)

To solve these inconsistency on PAGE_SIZE definitions,
we should have an independent PAGE_SIZE related definitions
for userland, but it requires major reorganization.

For now (especially for netbsd-9) we define MAX/MIN PAGE_SIZE and
PAGE_SHIFT values in <m68k/vmparam.h> only in !defined(_KERNEL) case.

Discussed on source-changes-d@ and tech-kern@ with christos@ and thorpej@:
https://mail-index.netbsd.org/source-changes-d/2020/01/thread1.html#012035
https://mail-index.netbsd.org/tech-kern/2020/01/thread1.html#025954

Should be pulled up to netbsd-9.
 1.37.38.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.39 03-Mar-2018  mrg sun2/sun3:
- build libkern as an archive for non modular builds. from maya@
sun3:
- cut down GENERIC a bunch to bring below 2MB.
- reduce UBC_NWINS, MAXEXEC, and PAGER_MAP_DEFAULT_SIZE to recover
enough lost VA to actually run basic tests.
 1.38 02-Feb-2017  rin branches: 1.38.6;
PR port-mac68k/51923
Bump default MAXTSIZ to 32MB for m68k ports, which allos us to use GCC 5.4 on
GENERIC kernels.
Ok jklos
 1.37 15-Oct-2010  tsutsui branches: 1.37.18; 1.37.36; 1.37.40; 1.37.44;
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.36 30-Apr-2010  pooka Raise the blade, make the change, don't quite rearrange to where
it's sane. But improves the non-monolithic kernel case anyway.
 1.35 06-Mar-2009  joerg branches: 1.35.2; 1.35.4;
Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
 1.34 25-Oct-2007  yamt branches: 1.34.20; 1.34.28; 1.34.34;
defparam PAGER_MAP_SIZE.
 1.33 11-Dec-2005  christos branches: 1.33.30; 1.33.48; 1.33.50; 1.33.54;
merge ktrace-lwp.
 1.32 07-Aug-2003  agc branches: 1.32.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.31 10-Dec-2002  thorpej branches: 1.31.6;
Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
 1.30 03-Jul-2001  chs branches: 1.30.8;
move parts that are the same from vmparam3{,x}.h to vmparam.h.
 1.29 21-Feb-2001  chs reduce PAGER_MAP_SIZE to 4MB, we're short on KVA.
 1.28 11-Feb-2000  thorpej Update for the NKMEMPAGES changes.
 1.27 04-Dec-1999  ragge CL* discarding.
 1.26 26-Apr-1999  thorpej branches: 1.26.2; 1.26.8;
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.25 05-Apr-1999  gwr branches: 1.25.2; 1.25.4;
Move VM_PHYSSEG_MAX to the common vmparam.h (needed by LKMs).
 1.24 18-Feb-1999  gwr It appears that pmap_physseg is now required in userland. Too bad.
 1.23 16-Jan-1999  chuck MNN is no longer optional, remove dead code
 1.22 08-Jul-1998  thorpej Define one page free list, and put all pages on it.
 1.21 20-Feb-1998  gwr Switch to MACHINE_NEW_NONCONTIG
 1.20 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.19 12-Jul-1997  perry branches: 1.19.4;
update comment from 1981 on memory and disk prices -- pr-2754 from Curt Sampson
 1.18 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.17 29-May-1997  gwr Increase the default datasize limit to 16MB (enough to build libc).
 1.16 27-Feb-1997  gwr branches: 1.16.2;
Define VM_MAX_KERNEL_ADDRESS using KERN_END instead of a constant.
 1.15 18-Jan-1997  gwr branches: 1.15.2; 1.15.4;
Define MACHINE_NONCONTIG here instead of in conf/std.sun3.
 1.14 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.13 08-Aug-1995  gwr Add default value for SHMMAXPGS (from Jason Thorpe - fixes PR#1220)
 1.12 24-May-1995  gwr Update cpu_fork() to eliminate double mapping of kernel stacks.
 1.11 13-Feb-1995  gwr DVMA slave mapping support.
 1.10 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.9 26-Oct-1994  cgd new RCS ID format.
 1.8 12-Dec-1993  glass snapshot of my private sources
 1.7 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.6 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.5 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.4 13-Aug-1993  glass snapshot. ready to call configure(), partial integration of torek's config
stuff, i.e it looks to do the right thing but we haven't written any code
yet :)
 1.3 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.2 27-Jul-1993  glass new pmap module
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.15.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.15.2.1 12-Feb-1997  mrg initial work for dynamic swap additions.
 1.16.2.2 01-Jun-1997  mrg update to trunk.
 1.16.2.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.19.4.2 05-Feb-1998  gwr OK, move some stuff back to the kernel-only part.
 1.19.4.1 04-Feb-1998  gwr Move a few things to the common file:
USRTEXT, MAXSLP, SAFERSS, VM_*
 1.25.4.2 06-Aug-1999  chs take an initial guess at UBC parameters.
 1.25.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.25.2.2 05-Apr-1999  gwr Move VM_PHYSSEG_MAX to the common vmparam.h (needed by LKMs).
 1.25.2.1 05-Apr-1999  gwr file vmparam3.h was added on branch netbsd-1-4 on 1999-04-05 14:35:14 +0000
 1.26.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.26.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.26.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.30.8.2 11-Dec-2002  thorpej Sync with HEAD.
 1.30.8.1 03-Jul-2001  thorpej file vmparam3.h was added on branch nathanw_sa on 2002-12-11 06:12:34 +0000
 1.31.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.31.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.31.6.1 03-Aug-2004  skrll Sync with HEAD
 1.32.16.1 27-Oct-2007  yamt sync with head.
 1.33.54.1 13-Nov-2007  bouyer Sync with HEAD
 1.33.50.1 06-Nov-2007  matt sync with HEAD
 1.33.48.1 28-Oct-2007  joerg Sync with HEAD.
 1.33.30.1 03-Dec-2007  ad Sync with HEAD.
 1.34.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.34.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.34.20.2 11-Aug-2010  yamt sync with head.
 1.34.20.1 04-May-2009  yamt sync with head.
 1.35.4.2 05-Mar-2011  rmind sync with head
 1.35.4.1 30-May-2010  rmind sync with head
 1.35.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.35.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.37.44.1 21-Apr-2017  bouyer Sync with HEAD
 1.37.40.1 20-Mar-2017  pgoyette Sync with HEAD
 1.37.36.1 05-Feb-2017  skrll Sync with HEAD
 1.37.18.1 03-Dec-2017  jdolecek update from HEAD
 1.38.6.1 12-Apr-2018  martin Pull up following revision(s) (requested by mrg in ticket #745):

sys/arch/sun3/conf/Makefile.sun3: revision 1.106
sys/arch/sun3/conf/Makefile.sun3: revision 1.107
sys/arch/sun3/conf/GENERIC3X: revision 1.131
sys/arch/sun3/include/param3.h: revision 1.57
sys/arch/sun3/conf/GENERIC: revision 1.177
sys/arch/sun3/conf/GENERIC: revision 1.178
sys/arch/sun3/include/vmparam3.h: revision 1.39

sun3:
- build libkern as an archive for non modular builds. from maya@
- cut down GENERIC a bunch to bring below 2MB.
- reduce UBC_NWINS, MAXEXEC, and PAGER_MAP_DEFAULT_SIZE to recover
enough lost VA to actually run basic tests.

also disable SYSCTL_INCLUDE_DESCR.

copy sun3 disables to sun3x mostly. it has the same ufsboot 2MB limit.

Build compat code as .a if not MODULAR.

Removes some more unused functions.
 1.23 02-Feb-2017  rin PR port-mac68k/51923
Bump default MAXTSIZ to 32MB for m68k ports, which allos us to use GCC 5.4 on
GENERIC kernels.
Ok jklos
 1.22 08-Feb-2011  rmind branches: 1.22.14; 1.22.32; 1.22.36; 1.22.40;
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.21 15-Oct-2010  tsutsui branches: 1.21.2; 1.21.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.20 30-Apr-2010  pooka Raise the blade, make the change, don't quite rearrange to where
it's sane. But improves the non-monolithic kernel case anyway.
 1.19 06-Mar-2009  joerg branches: 1.19.2; 1.19.4;
Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
 1.18 11-Dec-2005  christos branches: 1.18.78; 1.18.86; 1.18.92;
merge ktrace-lwp.
 1.17 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.16 10-Dec-2002  thorpej branches: 1.16.6;
Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
 1.15 03-Jul-2001  chs branches: 1.15.8;
move parts that are the same from vmparam3{,x}.h to vmparam.h.
 1.14 11-Feb-2000  thorpej Update for the NKMEMPAGES changes.
 1.13 04-Dec-1999  ragge CL* discarding.
 1.12 26-Apr-1999  thorpej branches: 1.12.2; 1.12.8;
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.11 05-Apr-1999  gwr branches: 1.11.2; 1.11.4;
Move VM_PHYSSEG_MAX to the common vmparam.h (needed by LKMs).
 1.10 18-Feb-1999  gwr It appears that pmap_physseg is now required in userland. Too bad.
 1.9 16-Jan-1999  chuck MNN is no longer optional, remove dead code
 1.8 12-Dec-1998  gwr Switch to MACHINE_NEW_NONCONTIG (Yea! Finally!:)
 1.7 08-Jul-1998  thorpej Define one page free list, and put all pages on it.
 1.6 17-Jun-1998  gwr Turn off MACHINE_NEW_NONCONTIG for now. Bug...
 1.5 10-Jun-1998  gwr Switch over to MACHINE_NEW_NONCONTIG
 1.4 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.3 12-Jul-1997  perry branches: 1.3.4;
update comment from 1981 on memory and disk prices -- pr-2754 from Curt Sampson
 1.2 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 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.4; 1.1.1.1.8;
Initial import. Gets as far as nfs_mountroot.
 1.1.1.1.8.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.1.1.1.4.1 12-Feb-1997  mrg initial work for dynamic swap additions.
 1.3.4.2 05-Feb-1998  gwr OK, move some stuff back to the kernel-only part.
 1.3.4.1 04-Feb-1998  gwr Move a few things to the common file:
USRTEXT, MAXSLP, SAFERSS, VM_*
 1.11.4.2 06-Aug-1999  chs take an initial guess at UBC parameters.
 1.11.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.11.2.2 05-Apr-1999  gwr Move VM_PHYSSEG_MAX to the common vmparam.h (needed by LKMs).
 1.11.2.1 05-Apr-1999  gwr file vmparam3x.h was added on branch netbsd-1-4 on 1999-04-05 14:35:14 +0000
 1.12.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.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.15.8.2 11-Dec-2002  thorpej Sync with HEAD.
 1.15.8.1 03-Jul-2001  thorpej file vmparam3x.h was added on branch nathanw_sa on 2002-12-11 06:12:35 +0000
 1.16.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.6.1 03-Aug-2004  skrll Sync with HEAD
 1.18.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.78.2 11-Aug-2010  yamt sync with head.
 1.18.78.1 04-May-2009  yamt sync with head.
 1.19.4.2 05-Mar-2011  rmind sync with head
 1.19.4.1 30-May-2010  rmind sync with head
 1.19.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.19.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.21.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.21.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.22.40.1 21-Apr-2017  bouyer Sync with HEAD
 1.22.36.1 20-Mar-2017  pgoyette Sync with HEAD
 1.22.32.1 05-Feb-2017  skrll Sync with HEAD
 1.22.14.1 03-Dec-2017  jdolecek update from HEAD
 1.2 27-Aug-2002  uwe Make sun ports use common keyboard/firm events related includes
from dev/sun.
 1.1 01-Dec-1994  gwr branches: 1.1.48; 1.1.52; 1.1.60;
Export some headers that X will want, and minor clean-up.
 1.1.60.1 31-Aug-2002  gehenna catch up with -current.
 1.1.52.1 27-Aug-2002  nathanw Catch up to -current.
 1.1.48.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 08-May-2004  kleink branches: 1.1.2;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 08-May-2004  skrll file wchar_limits.h was added on branch ktrace-lwp on 2004-08-03 10:42:05 +0000
 1.14 29-Mar-2008  tsutsui Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.13 11-Mar-2007  tsutsui branches: 1.13.38;
Remove splzs() definition, which is in <sun68k/intr.h>.
 1.12 05-Oct-2006  tsutsui branches: 1.12.4; 1.12.8;
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.11 11-Dec-2005  christos branches: 1.11.20; 1.11.22;
merge ktrace-lwp.
 1.10 22-Jan-2005  chs branches: 1.10.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.9 07-Aug-2003  agc branches: 1.9.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.8 11-Mar-2002  chs branches: 1.8.12;
override cn_trap() with zs_abort() so we can drop to the monitor
if there's no DDB. fixes PR 12547.
 1.7 20-Aug-1999  chs branches: 1.7.16; 1.7.20;
copy some definitions from the sparc port. fixes PR 7880.
 1.6 17-Dec-1996  gwr Adapt to the new version of dev/ic/z8530*
(Note: now define zsc_softc here.)
 1.5 13-Oct-1996  christos backout previous kprintf change
 1.4 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.3 30-Jan-1996  gwr Eliminate remaining direct references to the z8530 chip
to allow the MD access functions to do delays, etc.
 1.2 24-Jan-1996  gwr Update for the new z8530 driver
 1.1 24-Jan-1996  gwr file z8530var.h was initially added on branch netbsd-1-1.
 1.7.20.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.7.16.1 16-Mar-2002  jdolecek Catch up with -current.
 1.8.12.4 24-Jan-2005  skrll Sync with HEAD.
 1.8.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.12.1 03-Aug-2004  skrll Sync with HEAD
 1.9.8.1 29-Apr-2005  kent sync with -current
 1.10.8.2 03-Sep-2007  yamt sync with head.
 1.10.8.1 30-Dec-2006  yamt sync with head.
 1.11.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.11.20.1 18-Nov-2006  ad Sync with head.
 1.12.8.1 13-Mar-2007  ad Sync with head.
 1.12.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.13.38.1 03-Apr-2008  mjf Sync with HEAD.

RSS XML Feed