Home | History | Annotate | only in /src/sys/arch/cesfic
History log of /src/sys/arch/cesfic
RevisionDateAuthorComments
 1.2 06-Jan-2003  lukem Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

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

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

Per lengthy discussion with Andrew Brown.
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 07-Jan-2003  thorpej Sync with HEAD.
 1.1.8.1 14-May-2001  thorpej file Makefile was added on branch nathanw_sa on 2003-01-07 21:05:04 +0000
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 04-Dec-2003  keihan netbsd.org -> NetBSD.org

All "netbsd.org" is now gone from src/sys/arch.
 1.1 14-May-2001  drochner branches: 1.1.8; 1.1.24;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file README was added on branch nathanw_sa on 2001-05-14 18:22:59 +0000
 1.30 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.29 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.28 24-Apr-2021  thorpej branches: 1.28.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.27 27-Sep-2019  chs branches: 1.27.10;
do not clear "cold" in MD code, that is done in MI code.
this instance was missed when that was changed 20 years ago.
 1.26 29-Jul-2012  mlelstv branches: 1.26.40;
Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

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

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

Make cpu_rootconf(9) describe the calling order.
 1.25 06-Jun-2011  matt branches: 1.25.2; 1.25.8;
CFATTACH_DECL(..., sizeof(struct device), -> CFATTACH_DECL_NEW(..., 0
struct device * -> device_t
struct cfdata * -> cfdata_t
use bool when appropriate
 1.24 07-Nov-2009  cegger branches: 1.24.4; 1.24.10;
Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
 1.23 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.22 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.21 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.20 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.19 22-Jun-2008  tsutsui branches: 1.19.4; 1.19.10;
Unify splraiseipl(9) implementation among m68k ports as per
suggestion from isaki@ on port-m68k.

For cesfic (compile test only):
- use static splraise4() for splvm() and remove isrcomputeipl() for IPL_VM
because this port supports only one model
- make makeiplcookie(9) return PSL bits via ipl2psl_table[] rather than
ipl indexes
- make ipl2psl_table[] uint16_t rather than int
 1.18 03-Dec-2007  ad branches: 1.18.14; 1.18.18; 1.18.20; 1.18.22;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.17 05-Mar-2007  tsutsui branches: 1.17.2; 1.17.18; 1.17.20; 1.17.26;
MI softintr(9)'fy. Untested.

This port needs much more cleanups, it seems...
 1.16 24-Jan-2007  hubertf branches: 1.16.2;
Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

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

Thanks to martin@ for the input on testing.
 1.15 11-Dec-2005  christos branches: 1.15.20;
merge ktrace-lwp.
 1.14 26-Aug-2005  drochner s/locdesc_t/int/g
 1.13 09-Jun-2005  he branches: 1.13.2;
Adapt to compiling with -Wcast-qual by passing NULL instead of a string
to config_rootfound().
 1.12 01-Apr-2005  yamt merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.11 23-Oct-2004  thorpej branches: 1.11.4; 1.11.6;
Centralize the declaration of booted_device and booted_partition.
 1.10 13-Sep-2004  drochner autoconf cleanup: turn xxxsubmatch() functions into the locator
passing variants
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 01-Apr-2003  thorpej branches: 1.8.2;
Use PAGE_SIZE rather than NBPG.
 1.7 13-Dec-2002  drochner do a TBIAS after modifying cache enable bits
 1.6 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.3 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.2 26-Jul-2001  drochner branches: 1.2.6;
pmap_changebit() requires pv tracking, so replace it by manual PTE construction
 1.1 14-May-2001  drochner branches: 1.1.2;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.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.1.2.1 03-Aug-2001  lukem update to -current
 1.2.6.3 19-Dec-2002  thorpej Sync with HEAD.
 1.2.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.6.1 26-Jul-2001  nathanw file autoconf.c was added on branch nathanw_sa on 2002-10-18 02:36:09 +0000
 1.8.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.8.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.8.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.6.1 26-Jan-2005  yamt convert arch/cesfic to new apis.
 1.11.4.1 29-Apr-2005  kent sync with -current
 1.13.2.4 07-Dec-2007  yamt sync with head
 1.13.2.3 03-Sep-2007  yamt sync with head.
 1.13.2.2 26-Feb-2007  yamt sync with head.
 1.13.2.1 21-Jun-2006  yamt sync with head.
 1.15.20.1 01-Feb-2007  ad Sync with head.
 1.16.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.17.26.1 08-Dec-2007  mjf Sync with HEAD.
 1.17.20.1 09-Jan-2008  matt sync with HEAD
 1.17.18.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.17.2.1 03-Dec-2007  ad Sync with HEAD.
 1.18.22.1 27-Jun-2008  simonb Sync with head.
 1.18.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.18.18.2 11-Mar-2010  yamt sync with head
 1.18.18.1 04-May-2009  yamt sync with head.
 1.18.14.1 29-Jun-2008  mjf Sync with HEAD.
 1.19.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.19.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.24.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.24.4.1 12-Jun-2011  rmind sync with head
 1.25.8.1 08-Aug-2012  martin Pull up following revision(s) (requested by mlelstv in ticket #466):
sys/arch/amiga/amiga/autoconf.c: revision 1.113
sys/arch/rs6000/rs6000/autoconf.c: revision 1.4
sys/arch/emips/emips/autoconf.c: revision 1.6
sys/arch/sandpoint/sandpoint/autoconf.c: revision 1.27
sys/arch/evbmips/alchemy/autoconf.c: revision 1.18
sys/arch/sgimips/sgimips/autoconf.c: revision 1.43
sys/arch/atari/atari/autoconf.c: revision 1.63
sys/arch/powerpc/oea/ofw_autoconf.c: revision 1.17
sys/arch/mmeye/mmeye/autoconf.c: revision 1.9
distrib/sets/lists/comp/mi: revision 1.1771
sys/arch/mipsco/mipsco/autoconf.c: revision 1.25
sys/arch/iyonix/iyonix/autoconf.c: revision 1.14
sys/arch/hp300/hp300/autoconf.c: revision 1.100
sys/kern/init_main.c: revision 1.445
sys/arch/pmax/pmax/autoconf.c: revision 1.79
sys/arch/netwinder/netwinder/autoconf.c: revision 1.11
sys/arch/dreamcast/dreamcast/autoconf.c: revision 1.10
sys/arch/ibmnws/ibmnws/autoconf.c: revision 1.12
sys/arch/evbppc/ev64260/autoconf.c: revision 1.17
sys/arch/evbmips/gdium/autoconf.c: revision 1.5
sys/arch/algor/algor/autoconf.c: revision 1.21
share/man/man9/Makefile: revision 1.367
sys/arch/ews4800mips/ews4800mips/autoconf.c: revision 1.9
sys/arch/amigappc/amigappc/autoconf.c: revision 1.5
sys/arch/x86/x86/x86_autoconf.c: revision 1.65
sys/arch/acorn26/acorn26/autoconf.c: revision 1.9
sys/arch/mvmeppc/mvmeppc/autoconf.c: revision 1.13
sys/arch/vax/vax/autoconf.c: revision 1.94
sys/arch/usermode/dev/cpu.c: revision 1.72
sys/arch/evbppc/virtex/autoconf.c: revision 1.5
sys/arch/next68k/next68k/autoconf.c: revision 1.26
sys/arch/mac68k/mac68k/autoconf.c: revision 1.73
sys/arch/ia64/ia64/autoconf.c: revision 1.6
sys/arch/evbppc/obs405/obs405_autoconf.c: revision 1.6
share/man/man9/cpu_rootconf.9: revision 1.7
sys/arch/landisk/landisk/autoconf.c: revision 1.6
sys/arch/evbmips/malta/autoconf.c: revision 1.16
sys/arch/sun3/sun3/autoconf.c: revision 1.76
sys/arch/evbppc/explora/autoconf.c: revision 1.13
sys/arch/sun3/sun3/autoconf.c: revision 1.77
sys/arch/evbmips/loongson/autoconf.c: revision 1.3
sys/arch/evbmips/atheros/autoconf.c: revision 1.11
sys/arch/sparc64/sparc64/autoconf.c: revision 1.188
sys/arch/acorn32/acorn32/autoconf.c: revision 1.18
sys/arch/evbarm/evbarm/autoconf.c: revision 1.13
sys/arch/cobalt/cobalt/autoconf.c: revision 1.30
sys/arch/mvme68k/mvme68k/autoconf.c: revision 1.46
sys/arch/hp700/hp700/autoconf.c: revision 1.48
sys/arch/evbmips/adm5120/autoconf.c: revision 1.5
sys/arch/hpcmips/hpcmips/autoconf.c: revision 1.25
sys/arch/alpha/alpha/autoconf.c: revision 1.52
sys/arch/sparc/sparc/autoconf.c: revision 1.244
sys/arch/evbppc/pmppc/autoconf.c: revision 1.7
sys/arch/bebox/bebox/autoconf.c: revision 1.25
sys/arch/luna68k/luna68k/autoconf.c: revision 1.13
sys/arch/hpcarm/hpcarm/autoconf.c: revision 1.20
sys/arch/evbppc/walnut/autoconf.c: revision 1.21
sys/arch/cesfic/cesfic/autoconf.c: revision 1.26
sys/arch/cats/cats/autoconf.c: revision 1.17
sys/arch/x68k/x68k/autoconf.c: revision 1.67
sys/arch/news68k/news68k/autoconf.c: revision 1.21
sys/arch/arc/arc/autoconf.c: revision 1.34
sys/arch/evbsh3/evbsh3/autoconf.c: revision 1.11
sys/sys/conf.h: revision 1.143
sys/arch/evbmips/rasoc/autoconf.c: revision 1.3
sys/arch/hpcsh/hpcsh/autoconf.c: revision 1.26
sys/arch/sun68k/sun68k/autoconf.c: revision 1.29
sys/arch/evbmips/rmixl/autoconf.c: revision 1.6
sys/arch/zaurus/zaurus/autoconf.c: revision 1.12
sys/arch/xen/x86/autoconf.c: revision 1.15
sys/arch/evbppc/mpc85xx/autoconf.c: revision 1.6
sys/arch/shark/shark/autoconf.c: revision 1.18
sys/arch/prep/prep/autoconf.c: revision 1.25
sys/arch/newsmips/newsmips/autoconf.c: revision 1.36
sys/arch/sbmips/sbmips/autoconf.c: revision 1.8
Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.
No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().
Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().
Make cpu_rootconf(9) describe the calling order.
add rootconf(9) as a link to cpu_rootconf(9)
make this compile again
 1.25.2.1 30-Oct-2012  yamt sync with head
 1.26.40.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.27.10.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.27.10.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.27.10.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.27.10.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.27.10.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

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

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.28.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file clk_dp8570a.c was added on branch nathanw_sa on 2001-05-14 18:23:00 +0000
 1.6 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.5 06-Sep-2006  gdamore branches: 1.5.60; 1.5.68; 1.5.74;
Cesfic converted to timecounters (clockinterrupt only ) and generic-todr
(which is meaningless, since it lacks any kind of RTC.)
 1.4 11-Dec-2005  christos branches: 1.4.4; 1.4.8;
merge ktrace-lwp.
 1.3 28-Sep-2003  cl branches: 1.3.16;
Cast to (void *) to appease gcc3.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 14-May-2001  drochner branches: 1.1.8; 1.1.24;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file clock.c was added on branch nathanw_sa on 2001-05-14 18:23:00 +0000
 1.3.16.1 30-Dec-2006  yamt sync with head.
 1.4.8.1 14-Sep-2006  yamt sync with head.
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.5.74.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.68.1 28-Apr-2009  skrll Sync with HEAD.
 1.5.60.1 04-May-2009  yamt sync with head.
 1.6 26-Oct-2002  jdolecek now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
 1.5 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.4 19-Jul-2002  thorpej Rename cdev_systrace_init() to cdev_clonemisc_init(), so it can
be properly used by any misc. cloning device. While here, correct
a comment to indicate that "open" is the only entry point and that
everything else is handled with fileops.
 1.3 17-Jun-2002  christos MD systrace gluons.
 1.2 12-Jan-2002  manu branches: 1.2.8;
dded clockctl
 1.1 14-May-2001  drochner branches: 1.1.2; 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.6 11-Nov-2002  nathanw Catch up to -current
 1.1.8.5 17-Sep-2002  nathanw Catch up to -current.
 1.1.8.4 01-Aug-2002  nathanw Catch up to -current.
 1.1.8.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.8.1 14-May-2001  nathanw file conf.c was added on branch nathanw_sa on 2002-02-28 04:08:42 +0000
 1.1.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.8.3 21-Jul-2002  gehenna catch up with -current.
 1.2.8.2 14-Jul-2002  gehenna catch up with -current.
 1.2.8.1 16-May-2002  gehenna Bye block/character device swicth tables.
 1.3 02-Nov-2002  chs enhance the common m68k db_memrw.c to handle read-only kernel text
and switch all the motorola-MMU m68k platforms to use it.
 1.2 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.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 11-Nov-2002  nathanw Catch up to -current
 1.1.8.1 14-May-2001  nathanw file db_memrw.c was added on branch nathanw_sa on 2002-11-11 21:57:37 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file dp8570a.h was added on branch nathanw_sa on 2001-05-14 18:23:01 +0000
 1.6 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.5 18-Mar-2009  cegger bcopy -> memcpy
 1.4 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.3 11-Dec-2005  christos branches: 1.3.78; 1.3.86; 1.3.92;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 14-May-2001  drochner branches: 1.1.8; 1.1.24;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file eeprom.c was added on branch nathanw_sa on 2001-05-14 18:23:01 +0000
 1.3.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.78.2 11-Mar-2010  yamt sync with head
 1.3.78.1 04-May-2009  yamt sync with head.
 1.23 15-Jan-2024  thorpej No need for our own spurious interrupt handler now that m68k_intr.c
handles them for us.
 1.22 15-Jan-2024  thorpej G/C __HAVE_LEGACY_INTRCNT from cesfic.
 1.21 09-Jan-2024  thorpej Remove duplicated / slightly-tweaked loadustp() (load user segment table)
routines from all of the m68k ports using the shared pmap. Instead, in
pmap_init(), set up a function pointer to the appropriate mmu_load_urp*()
function in mmu_subr.s.
 1.20 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.19 27-Dec-2023  thorpej No need to export FC_PURGE here.
 1.18 27-Dec-2023  thorpej Stop using magic numbers for the MMU root pointer attributes and the
Translation Control register, and also get rid of "#if PGSHIFT == ..."
where those magic numbers are used.

Instead, define new macros: MMU51_SRP_BITS, MMU51_CRP_BITS, MMU51_TCR_BITS,
and MMU40_TCR_BITS, in terms of the definitions in mmu_{40,51}.h. These
automagically adapt to 8K and 4K pages based on the machine-specific value
of PGSHIFT.
 1.17 20-Feb-2020  skrll G/C
 1.16 17-Feb-2020  skrll G/C LS{SLEEP,RUN,ONPROC}

LWP status manipulation was moved out of assembly long ago.
 1.15 14-Jan-2011  rmind branches: 1.15.60; 1.15.66;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.14 20-Dec-2010  matt Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.13 10-Dec-2009  rmind branches: 1.13.4;
Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.12 23-Nov-2009  rmind Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.11 20-Sep-2008  tsutsui Remove advertising clause for UCB in various genassym.cf files,
which were derived from genassym.c in 4.4BSD-Lite2 (or 386BSD).
Closes PR misc/39573. Approved by martin@.
 1.10 17-Oct-2007  garbled branches: 1.10.16; 1.10.20; 1.10.22; 1.10.26;
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.9 21-May-2007  tsutsui branches: 1.9.10;
Adapt rest of m68k ports to yamt-idlelwp. Compile tested only.
 1.8 09-Feb-2007  ad branches: 1.8.6; 1.8.8; 1.8.14;
Merge newlock2 to head.
 1.7 11-Dec-2005  christos branches: 1.7.20;
merge ktrace-lwp.
 1.6 04-Nov-2003  dsl branches: 1.6.16;
Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
 1.5 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.4 08-Apr-2003  thorpej branches: 1.4.2;
Use PAGE_SIZE rather than NBPG.
 1.3 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.2 26-Sep-2002  thorpej Remove <sys/map.h>
 1.1 14-May-2001  drochner branches: 1.1.2; 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.6 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.5 05-Oct-2002  gmcgarry Add RAS offsets.
 1.1.8.4 02-Aug-2002  nathanw Don't need SAF_UPCALL anymore.
 1.1.8.3 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.1.8.2 18-Nov-2001  scw MD Scheduler Activation bits for Cesfic.
Compile-tested only.
 1.1.8.1 14-May-2001  scw file genassym.cf was added on branch nathanw_sa on 2001-11-18 18:08:10 +0000
 1.1.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.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.6.16.2 03-Sep-2007  yamt sync with head.
 1.6.16.1 26-Feb-2007  yamt sync with head.
 1.7.20.1 06-Feb-2007  ad Update m68k pasteware.
 1.8.14.1 22-May-2007  matt Update to HEAD.
 1.8.8.1 11-Jul-2007  mjf Sync with head.
 1.8.6.1 27-May-2007  ad Sync with head.
 1.9.10.1 06-Nov-2007  matt sync with HEAD
 1.10.26.1 19-Oct-2008  haad Sync with HEAD.
 1.10.22.1 10-Oct-2008  skrll Sync with HEAD.
 1.10.20.2 11-Mar-2010  yamt sync with head
 1.10.20.1 04-May-2009  yamt sync with head.
 1.10.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.13.4.1 05-Mar-2011  rmind sync with head
 1.15.66.1 29-Feb-2020  ad Sync with head.
 1.15.60.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.20 15-Jan-2024  thorpej Switch cesfic over to the common interrupt dispatch code.
 1.19 02-Apr-2021  rin For ports with __HAVE_LEGACY_INTRCNT, turn intrcnt[] and derived
variables into u_int, to match with kern/subr_evcnt.c.
 1.18 18-Nov-2020  thorpej branches: 1.18.2;
malloc(9) -> kmem(9)
 1.17 10-Nov-2019  chs branches: 1.17.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.16 20-Dec-2010  matt branches: 1.16.60;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.15 18-Mar-2009  cegger branches: 1.15.4;
Ansify function definitions w/o arguments. Generated with sed.
 1.14 16-Mar-2009  dsl ANSIfy functions with function-pointer arguments
 1.13 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.12 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.11 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.10 22-Jun-2008  tsutsui branches: 1.10.4; 1.10.10;
Unify splraiseipl(9) implementation among m68k ports as per
suggestion from isaki@ on port-m68k.

For cesfic (compile test only):
- use static splraise4() for splvm() and remove isrcomputeipl() for IPL_VM
because this port supports only one model
- make makeiplcookie(9) return PSL bits via ipl2psl_table[] rather than
ipl indexes
- make ipl2psl_table[] uint16_t rather than int
 1.9 03-May-2008  martin branches: 1.9.2; 1.9.4;
Move to 2 clause TNF license
 1.8 03-Dec-2007  ad branches: 1.8.14; 1.8.16; 1.8.18;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.7 05-Mar-2007  tsutsui branches: 1.7.2; 1.7.18; 1.7.20; 1.7.26;
MI softintr(9)'fy. Untested.

This port needs much more cleanups, it seems...
 1.6 21-Dec-2006  yamt branches: 1.6.2;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.5 11-Dec-2005  christos branches: 1.5.20; 1.5.22;
merge ktrace-lwp.
 1.4 15-Jul-2003  lukem branches: 1.4.16;
__KERNEL_RCSID()
 1.3 13-Dec-2002  drochner branches: 1.3.6;
use <net/netisr_dispatch.h>
 1.2 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.1 14-May-2001  drochner branches: 1.1.2; 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.3 19-Dec-2002  thorpej Sync with HEAD.
 1.1.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.1 14-May-2001  nathanw file isr.c was added on branch nathanw_sa on 2002-10-18 02:36:10 +0000
 1.1.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.3 07-Dec-2007  yamt sync with head
 1.4.16.2 03-Sep-2007  yamt sync with head.
 1.4.16.1 30-Dec-2006  yamt sync with head.
 1.5.22.2 09-Oct-2006  yamt fix mystakes in the previous.
 1.5.22.1 22-Sep-2006  yamt implement splraiseipl for cesfic.
 1.5.20.1 12-Jan-2007  ad Sync with head.
 1.6.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.7.26.1 08-Dec-2007  mjf Sync with HEAD.
 1.7.20.1 09-Jan-2008  matt sync with HEAD
 1.7.18.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.7.2.2 03-Dec-2007  ad Sync with HEAD.
 1.7.2.1 03-Dec-2007  ad Sync with HEAD.
 1.8.18.2 04-May-2009  yamt sync with head.
 1.8.18.1 16-May-2008  yamt sync with head.
 1.8.16.1 18-May-2008  yamt sync with head.
 1.8.14.2 29-Jun-2008  mjf Sync with HEAD.
 1.8.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.4.1 27-Jun-2008  simonb Sync with head.
 1.9.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.10.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.15.4.1 05-Mar-2011  rmind sync with head
 1.16.60.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.17.8.2 03-Apr-2021  thorpej Sync with HEAD.
 1.17.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.18.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5 15-Jan-2024  thorpej Switch cesfic over to the common interrupt dispatch code.
 1.4 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.3 22-Jun-2008  tsutsui branches: 1.3.4; 1.3.10;
Unify splraiseipl(9) implementation among m68k ports as per
suggestion from isaki@ on port-m68k.

For cesfic (compile test only):
- use static splraise4() for splvm() and remove isrcomputeipl() for IPL_VM
because this port supports only one model
- make makeiplcookie(9) return PSL bits via ipl2psl_table[] rather than
ipl indexes
- make ipl2psl_table[] uint16_t rather than int
 1.2 03-May-2008  martin branches: 1.2.2; 1.2.4;
Move to 2 clause TNF license
 1.1 14-May-2001  drochner branches: 1.1.8; 1.1.126; 1.1.128; 1.1.130;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.130.2 04-May-2009  yamt sync with head.
 1.1.130.1 16-May-2008  yamt sync with head.
 1.1.128.1 18-May-2008  yamt sync with head.
 1.1.126.2 29-Jun-2008  mjf Sync with HEAD.
 1.1.126.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file isr.h was added on branch nathanw_sa on 2001-05-14 18:23:02 +0000
 1.2.4.1 27-Jun-2008  simonb Sync with head.
 1.2.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.3.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.2 03-Nov-2002  chs merge all the m68k copies of kgdb_machdep.c.
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 11-Nov-2002  nathanw Catch up to -current
 1.1.8.1 14-May-2001  nathanw file kgdb_machdep.c was added on branch nathanw_sa on 2002-11-11 21:57:37 +0000
 1.48 04-Nov-2025  thorpej Use the return lwp0 u-area return value from pmap_bootstrap2(), rather
than referencing lwp0uarea directly.
 1.47 04-Nov-2025  thorpej Rename pmap_bootstrap_finalize() to pmap_bootstrap2(), and change it
to return a pointer to the lwp0 u-area (in preparation for an upcoming
change).

Other than the return value, NFC.
 1.46 17-Jan-2024  thorpej Make sigcode.s and sunos_sigcode.s build as their own stand-alone files.
 1.45 17-Jan-2024  thorpej Make compat_13_sigreturn13.s and compat_16_sigreturn14.s build as their
own stand-alone files and G/C the now-empty sigreturn.s.
 1.44 16-Jan-2024  thorpej Build m68k/support.s on its own; don't include it from locore.s
 1.43 15-Jan-2024  thorpej No need for our own spurious interrupt handler now that m68k_intr.c
handles them for us.
 1.42 15-Jan-2024  thorpej G/C __HAVE_LEGACY_INTRCNT from cesfic.
 1.41 15-Jan-2024  thorpej Switch cesfic over to the common interrupt dispatch code.
 1.40 15-Jan-2024  thorpej Switch cesfic over to the common vector table.
 1.39 09-Jan-2024  thorpej Statically-initialize the '851 / '030 protorp with MMU51_SRP_BITS. In
pmap_init(), re-initialize protorp with MMU51_CRP_BITS. Remove the now-
redundant code that does this in each of the m68k platforms.
 1.38 09-Jan-2024  thorpej Remove duplicated / slightly-tweaked loadustp() (load user segment table)
routines from all of the m68k ports using the shared pmap. Instead, in
pmap_init(), set up a function pointer to the appropriate mmu_load_urp*()
function in mmu_subr.s.
 1.37 27-Dec-2023  thorpej Stop using magic numbers for the MMU root pointer attributes and the
Translation Control register, and also get rid of "#if PGSHIFT == ..."
where those magic numbers are used.

Instead, define new macros: MMU51_SRP_BITS, MMU51_CRP_BITS, MMU51_TCR_BITS,
and MMU40_TCR_BITS, in terms of the definitions in mmu_{40,51}.h. These
automagically adapt to 8K and 4K pages based on the machine-specific value
of PGSHIFT.
 1.36 26-Dec-2023  thorpej G/C unused ploadw().
 1.35 25-Dec-2023  thorpej loadustp(): Optimize for the overwhelmingly common case of "not the HP MMU".
Rather than converting the level 1 table address to a page number before
calling loadustp() only to have loadustp() convert it back to an address
for the '851, '030, '040, and '060, instead pass the address and convert
to a page number only in the case of the HP MMU.

This is a wash on HP MMU machines (9000/320 and 9000/350), and saves at
least 4 instructions (2x moveq + 2x lsXl) on every context switch on
everything else.
 1.34 30-May-2022  andvar branches: 1.34.4;
s/identifing/identifying/ and s/multipler/multiplier/ in comments.
 1.33 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.32 15-Mar-2014  tsutsui branches: 1.32.28; 1.32.30;
Use common m68k/busaddrerr.s for bus error and address error handlers.

No binary changes on GENERIC.
 1.31 09-Mar-2014  tsutsui Remove an instruction for nonexistent 060 branch prediction error accounting.

It's amiga and atari specific and copied from amiga/locore.s
to mac68k/locore.s in rev 1.80, then pasted into other ports.
Note this is harmless because all these ports don't have 68060 variants
(i.e. it's inside #if defined(M68060) block) and mvme68k (which has 68060)
has removed it since the initial import.
 1.30 09-Mar-2014  tsutsui Remove unused m68k_fault_addr, which is required only on mac68k for SBC.

It looks hp300 one was copied from mac68k in rev 1.75
and then it was pasted to other ports again and again.
 1.29 31-Jan-2014  tsutsui defined(LKM) -> defined(MODULAR)
 1.28 22-Dec-2011  tsutsui branches: 1.28.6; 1.28.10;
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.
 1.27 26-Nov-2011  tsutsui branches: 1.27.2;
Make sure to call pflusha before (not after) enabling MMU on
68030/68851 initialization paths.

Pointed out by isaki@ per observation of ATC status on XM6i emulator.
Tested on TT030, HP362, NWS-1750, and X68030 by me.

XXX: probably we can remove existing pflusha or TBIA calls after MMU turned
XXX: on (and before enabling cache) but I leave them as is for now to avoid
XXX: unexcpected side effects.
 1.26 15-Nov-2011  tsutsui Move spread getsfc() and getdfc() functions into common m68k/support.s.

Note:
- ENTRY_NOPROFILE() is okay since they are used only for debug printf
- they are declared to return int so no need to put a return value into %a0
 1.25 27-Dec-2010  tsutsui branches: 1.25.8;
Fix typo (and pasted lines). From OpenBSD.
 1.24 20-Dec-2010  matt Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.23 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.22 25-Feb-2010  skrll branches: 1.22.2;
s/cpu_fork/cpu_lwp_fork/ in comment.
 1.21 13-Dec-2009  tsutsui branches: 1.21.2;
Now we have Sysseg_pa value so no need to calculate it from KVA Sysseg.
Tested on hp300.

XXX: mac68k seems to have a different VA vs PA mechanism so I leave it for now.
 1.20 11-Dec-2009  tsutsui Move uvm_setpagesize() calls from locore.s to pmap_bootstrap_finalize().
Also explicitly set uvmexp.pagesize to prepare 8KB/page settings.

XXX: There is #ifdef !defined(amiga) && !defined(atari) workaround
XXX: because they have different pmap initialization functions.
 1.19 04-Dec-2009  tsutsui Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc.
Also update some comment.
Compile test only.
 1.18 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.17 11-Jan-2009  tsutsui Fix inverted logic on FPU type check in fpfault(). From OpenBSD.
 1.16 17-Oct-2007  garbled branches: 1.16.16; 1.16.20; 1.16.28;
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 12-Jun-2007  mhitch branches: 1.15.10;
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.14 21-May-2007  tsutsui Adapt rest of m68k ports to yamt-idlelwp. Compile tested only.
 1.13 11-Dec-2005  christos branches: 1.13.24; 1.13.30; 1.13.32; 1.13.38; 1.13.40;
merge ktrace-lwp.
 1.12 04-Mar-2004  nathanw branches: 1.12.16;
Centralize identical copies of proc_trampoline code.

(lots more opportunites here for the bored hacker, such as rei and trap0...)
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.10 23-Jun-2003  martin branches: 1.10.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.9 27-Apr-2003  ragge Preserve the symbol table in the LKM || KSYMS cases also.
 1.8 08-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.7 19-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.6 02-Nov-2002  chs finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.
 1.5 19-May-2002  jdolecek use jmp label:l to force absolute, rather than pc-relative, adressing
 1.4 19-Mar-2002  drochner branches: 1.4.4;
work around a pc-relative jump optimization in early startup
 1.3 22-Jul-2001  wiz branches: 1.3.6;
seperate -> separate
 1.2 18-May-2001  drochner branches: 1.2.2;
cleanup and ELF preparation (_XXX_LABEL(), .align)
 1.1 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.2.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.1 03-Aug-2001  lukem update to -current
 1.3.6.6 11-Nov-2002  nathanw Catch up to -current
 1.3.6.5 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.3.6.4 20-Jun-2002  nathanw Catch up to -current.
 1.3.6.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.6.2 18-Nov-2001  scw MD Scheduler Activation bits for Cesfic.
Compile-tested only.
 1.3.6.1 22-Jul-2001  scw file locore.s was added on branch nathanw_sa on 2001-11-18 18:08:10 +0000
 1.4.4.1 30-May-2002  gehenna Catch up with -current.
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.16.1 03-Sep-2007  yamt sync with head.
 1.13.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.13.38.2 26-Jun-2007  garbled Sync with HEAD.
 1.13.38.1 22-May-2007  matt Update to HEAD.
 1.13.32.1 11-Jul-2007  mjf Sync with head.
 1.13.30.2 15-Jul-2007  ad Sync with head.
 1.13.30.1 27-May-2007  ad Sync with head.
 1.13.24.1 18-Jun-2007  liamjfoy Pull up following revision(s) (requested by mhitch in ticket #728):
sys/arch/mvme68k/mvme68k/locore.s: revision 1.98
sys/arch/mac68k/mac68k/trap.c: revision 1.128
sys/arch/next68k/next68k/locore.s: revision 1.48
sys/arch/mac68k/mac68k/locore.s: revision 1.152
sys/arch/sun3/sun3/locore.s: revision 1.88
sys/arch/sun2/sun2/locore.s: revision 1.19
sys/arch/sun2/sun2/trap.c: revision 1.32
sys/arch/m68k/m68k/db_trace.c: revision 1.51
sys/arch/mvme68k/mvme68k/trap.c: revision 1.90
sys/arch/news68k/news68k/trap.c: revision 1.53
sys/arch/luna68k/luna68k/locore.s: revision 1.27
sys/arch/atari/atari/locore.s: revision 1.99
sys/arch/sun3/sun3/trap.c: revision 1.130
sys/arch/x68k/x68k/trap.c: revision 1.89
sys/arch/next68k/next68k/trap.c: revision 1.67
sys/arch/x68k/x68k/locore.s: revision 1.79
sys/arch/news68k/news68k/locore.s: revision 1.43
sys/arch/luna68k/luna68k/trap.c: revision 1.46
sys/arch/hp300/hp300/locore.s: revision 1.140
sys/arch/cesfic/cesfic/locore.s: revision 1.15
sys/arch/cesfic/cesfic/trap.c: revision 1.35
sys/arch/m68k/m68k/trap_subr.s: revision 1.12
sys/arch/amiga/amiga/locore.s: revision 1.143
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.15.10.1 06-Nov-2007  matt sync with HEAD
 1.16.28.1 19-Jan-2009  skrll Sync with HEAD.
 1.16.20.3 11-Aug-2010  yamt sync with head.
 1.16.20.2 11-Mar-2010  yamt sync with head
 1.16.20.1 04-May-2009  yamt sync with head.
 1.16.16.1 17-Jan-2009  mjf Sync with HEAD.
 1.21.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.21.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.22.2.2 05-Mar-2011  rmind sync with head
 1.22.2.1 03-Jul-2010  rmind sync with head
 1.25.8.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25.8.1 17-Apr-2012  yamt sync with head
 1.27.2.1 18-Feb-2012  mrg merge to -current.
 1.28.10.1 18-May-2014  rmind sync with head
 1.28.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.30.1 10-Jun-2019  christos Sync with HEAD
 1.32.28.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.34.4.1 27-Jun-2024  martin Pull up following revision(s) (requested by rin in ticket #724
to fix build fallout on the branch):

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

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

Make compat_13_sigreturn13.s and compat_16_sigreturn14.s build as their
own stand-alone files and G/C the now-empty sigreturn.s.
 1.74 05-Mar-2024  thorpej Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

It's a small step, but it's a step.
 1.73 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.72 09-Oct-2021  tsutsui Call cnpollc(9) before cngetc(9) as the cons(9) man page says.

Currently most ports do nothing in cnpollc(9), but this is required to
handle wskbd(9) .set_leds op in cngetc(9) properly, at least on luna68k.
 1.71 11-Jun-2020  ad uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched. It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.
 1.70 31-Dec-2019  ad Rename uvm_free() -> uvm_availmem().
 1.69 21-Dec-2019  ad uvmexp.free -> uvm_free()
 1.68 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.67 22-Dec-2016  cherry branches: 1.67.6; 1.67.16;
physmem should be of type psize_t

Also, use PRIxPSIZE when printf(9)ing physmem.
 1.66 05-Nov-2015  pgoyette branches: 1.66.2;
Remove superfluous #includes - nothing depends on them
 1.65 24-Mar-2014  christos branches: 1.65.6;
- use cpu_{g,s}etmodel
- remove unused
 1.64 08-Aug-2012  drochner branches: 1.64.2; 1.64.4;
build fix for gcc -fno-common, from Radoslaw Kujawa
 1.63 27-Jul-2012  matt Remove safepri and use IPL_SAFEPRI instead. This may be defined in a MD
header file (if not, a value of 0 is assmued).
 1.62 12-Feb-2012  matt Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.61 12-Dec-2011  mrg implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

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

fixes PR#45705.
 1.60 12-Jun-2011  rmind branches: 1.60.2; 1.60.6;
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.59 16-May-2011  tsutsui branches: 1.59.2;
- merge and move pasted m68k MD setreg() functions into m68k/m68k_machdep.c
- move m68881_save() and m68881_restore() declarations into <m68k/m68k.h>

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

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.57 08-Feb-2011  rmind Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.56 17-Jan-2011  tsutsui branches: 1.56.2;
Explicitly include <machine/pcb.h> for struct pcb.
 1.55 16-Oct-2010  tsutsui branches: 1.55.2;
Prepare empty module_init_md() for options MODULAR for all other m68k ports.
 1.54 08-Feb-2010  joerg branches: 1.54.2;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.53 10-Dec-2009  matt branches: 1.53.2;
Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds). Should result in no code differences.
 1.52 23-Nov-2009  rmind Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.51 26-Aug-2009  thorpej Make this compile again (64-bit dev_t printf format).
 1.50 15-Aug-2009  matt Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
 1.49 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.48 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.47 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.46 17-Jan-2009  tsutsui branches: 1.46.2;
Move extern decls for Sysseg, Sysptmap, Sysptsize, mem_size, virtual_avail,
virtual_end, and protection_codes[] to common <m68k/pmap_motorola.h>,
and also make protection_codes[] unsigned.

XXX: avail_start and avail_end should also be moved, but it causes
XXX: -Wshadow warnings in uvm/uvm_page.c:uvm_page_physload() and
XXX: I don't have a good idea of alternative names for now.
 1.45 30-Nov-2008  martin As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
 1.44 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

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

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

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

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.
 1.42 14-Sep-2008  tsutsui branches: 1.42.2;
Remove ancient workaround hacks for gcc 2.7.2.
 1.41 02-Jul-2008  ad branches: 1.41.2;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.40 31-Dec-2007  ad branches: 1.40.6; 1.40.10; 1.40.12; 1.40.14;
Remove COMPAT_HPUX.
 1.39 17-Oct-2007  garbled branches: 1.39.2; 1.39.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.38 21-May-2007  tsutsui branches: 1.38.10;
Adapt rest of m68k ports to yamt-idlelwp. Compile tested only.
 1.37 05-Mar-2007  tsutsui branches: 1.37.2; 1.37.4; 1.37.10;
Allocate msgbufaddr in pmap_bootstrap.c where it's initilized,
and move its declaration into <m68k/pmap_motorola.h>.
 1.36 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.35 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.34 09-Feb-2007  ad branches: 1.34.2;
Merge newlock2 to head.
 1.33 21-Oct-2006  mrg in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev. this occurs when we try to set the dumpdev to a device
with no driver loaded. this fixes PR#34872.

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

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

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
 1.32 27-Dec-2005  yamt branches: 1.32.20; 1.32.22;
cpu_exec_aout_makecmds: make this compilable after ktrace-lwp merge.
 1.31 11-Dec-2005  christos merge ktrace-lwp.
 1.30 25-Apr-2005  lukem branches: 1.30.2;
Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.
 1.29 11-Feb-2005  yamt remove uvm_map_protect from cpu_startup of several ports.
- they shouldn't be needed with the current fault handler.
- they causes assertion failure with the recent vm_map implementation.

discussed on tech-kern@. reviewed by Chuck Silvers.
PR/29179 from Julio M. Merino Vidal.
 1.28 24-Mar-2004  atatat branches: 1.28.8; 1.28.10;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
 1.27 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.26 30-Dec-2003  pk Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

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

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.
 1.25 04-Dec-2003  atatat Dynamic sysctl.

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

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

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

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
 1.24 27-Sep-2003  cl Cast through (void *) to appease gcc3.
 1.23 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.22 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.21 15-Jul-2003  lukem __KERNEL_RCSID()
 1.20 29-Jun-2003  fvdl branches: 1.20.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.19 28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.18 23-Jun-2003  martin Make sure to include opt_foo.h if a defflag option FOO is used.
 1.17 10-May-2003  thorpej Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

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

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

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

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

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
 1.15 26-Apr-2003  ragge Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.14 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.13 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 13-Dec-2002  drochner scatter some pmap_update(pmap_kernel()) to reduce differences to other ports
 1.11 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.10 19-Sep-2002  ragge Do not include <sys/clist.h>, it's not used in NetBSD at all.
 1.9 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.8 25-Aug-2002  thorpej Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.
 1.7 14-May-2002  matt branches: 1.7.2;
Eliminate more commons or redundant declarations.
 1.6 20-Mar-2002  christos kill remaining PS_STRINGS instances.
 1.5 06-Mar-2002  tsutsui Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.
 1.4 04-Mar-2002  simonb Don't "extern int cold;" - this is in <sys/kernel.h>.
 1.3 15-Jun-2001  drochner branches: 1.3.2; 1.3.8;
vm_map_t -> struct vm_map *
vm_page_t -> struct vm_page *
simple_lock_data_t -> struct simplelock
 1.2 30-May-2001  lukem add missing #include "opt_kgdb.h"
 1.1 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.3.8.12 19-Dec-2002  thorpej Sync with HEAD.
 1.3.8.11 18-Oct-2002  nathanw Catch up to -current.
 1.3.8.10 17-Sep-2002  nathanw Catch up to -current.
 1.3.8.9 27-Aug-2002  nathanw Catch up to -current.
 1.3.8.8 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.3.8.7 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

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

(Behold the Power of Ed)
 1.3.8.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.8.3 02-Dec-2001  scw If an FPU is available, call m68k_make_fpu_idle_frame() to generate
a reference FPU idle frame.
 1.3.8.2 18-Nov-2001  scw MD Scheduler Activation bits for Cesfic.
Compile-tested only.
 1.3.8.1 15-Jun-2001  scw file machdep.c was added on branch nathanw_sa on 2001-11-18 18:08:10 +0000
 1.3.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.7.2.2 30-Aug-2002  gehenna catch up with -current.
 1.7.2.1 17-May-2002  gehenna Replace the access to devsw table and the hard-coded major with devsw API.
 1.20.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.20.2.6 15-Feb-2005  skrll Sync with HEAD.
 1.20.2.5 17-Jan-2005  skrll Adapt to branch.
 1.20.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.20.2.2 03-Aug-2004  skrll Sync with HEAD
 1.20.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.28.10.1 12-Feb-2005  yamt sync with head.
 1.28.8.1 29-Apr-2005  kent sync with -current
 1.30.2.5 21-Jan-2008  yamt sync with head
 1.30.2.4 03-Sep-2007  yamt sync with head.
 1.30.2.3 26-Feb-2007  yamt sync with head.
 1.30.2.2 30-Dec-2006  yamt sync with head.
 1.30.2.1 21-Jun-2006  yamt sync with head.
 1.32.22.1 22-Oct-2006  yamt sync with head
 1.32.20.2 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.32.20.1 18-Nov-2006  ad Sync with head.
 1.34.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.34.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.37.10.1 22-May-2007  matt Update to HEAD.
 1.37.4.1 11-Jul-2007  mjf Sync with head.
 1.37.2.1 27-May-2007  ad Sync with head.
 1.38.10.2 09-Jan-2008  matt sync with HEAD
 1.38.10.1 06-Nov-2007  matt sync with HEAD
 1.39.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.39.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.40.14.1 03-Jul-2008  simonb Sync with head.
 1.40.12.4 24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.40.12.3 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.40.12.2 14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

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

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

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

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

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.40.10.4 11-Mar-2010  yamt sync with head
 1.40.10.3 16-Sep-2009  yamt sync with head
 1.40.10.2 19-Aug-2009  yamt sync with head.
 1.40.10.1 04-May-2009  yamt sync with head.
 1.40.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.40.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.40.6.1 02-Jul-2008  mjf Sync with HEAD.
 1.41.2.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.41.2.1 19-Oct-2008  haad Sync with HEAD.
 1.42.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.42.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.46.2.1 13-May-2009  jym Sync with HEAD.

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

Work and depression still in progress.
 1.55.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.56.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.56.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.59.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.60.6.1 18-Feb-2012  mrg merge to -current.
 1.60.2.3 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.60.2.2 30-Oct-2012  yamt sync with head
 1.60.2.1 17-Apr-2012  yamt sync with head
 1.64.4.1 18-May-2014  rmind sync with head
 1.64.2.2 03-Dec-2017  jdolecek update from HEAD
 1.64.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.65.6.2 05-Feb-2017  skrll Sync with HEAD
 1.65.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.66.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.66.2.1 20-Jul-2016  pgoyette Adapt the machine/arch dependent code to the new {b,c}devsw reference
counting.

XXX Most of these will require testing by someone other than myself, as
I have a limited selection of hardware!
 1.67.16.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.67.16.1 10-Jun-2019  christos Sync with HEAD
 1.67.6.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.15 12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

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

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

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

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

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

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.14 08-Feb-2011  rmind branches: 1.14.2;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.13 14-Mar-2009  dsl branches: 1.13.2; 1.13.4; 1.13.6; 1.13.8;
Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.12 19-Dec-2008  cegger branches: 1.12.2;
use M_ZERO on malloc() and remove subsequent bzero().
 1.11 05-Mar-2007  tsutsui branches: 1.11.40; 1.11.44; 1.11.52;
Remove an unnecessary cast and use (char *) on pointer arith.
 1.10 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.9 11-Dec-2005  christos branches: 1.9.26;
merge ktrace-lwp.
 1.8 07-Aug-2003  agc branches: 1.8.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

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

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

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

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.4 05-Oct-2002  chs fix void * math, turn on -Wpointer-arith.
 1.3 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.2 27-Feb-2002  christos branches: 1.2.8;
- Use DEV_ constants, instead of documenting the numbers!
- Delete cdev_decl(mm); where appropriate, and other hand-crufting [hi powerpc!]
 1.1 14-May-2001  drochner branches: 1.1.2; 1.1.4; 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.5 11-Nov-2002  nathanw Catch up to -current
 1.1.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.1.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.8.1 14-May-2001  nathanw file mem.c was added on branch nathanw_sa on 2002-02-28 04:08:43 +0000
 1.1.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.1.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.1.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.2.8.1 17-May-2002  gehenna Add the character device switch.
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.1 03-Sep-2007  yamt sync with head.
 1.9.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.11.52.2 28-Apr-2009  skrll Sync with HEAD.
 1.11.52.1 19-Jan-2009  skrll Sync with HEAD.
 1.11.44.1 04-May-2009  yamt sync with head.
 1.11.40.2 17-Jan-2009  mjf Sync with HEAD.
 1.11.40.1 29-Mar-2008  mjf Add a mem_init() function for each architecture that requests a device
node for /dev/mem, /dev/null, /dev/zero, etc.

This will disappear when I move this code (and others) to be a
pseudo-device. When we have machine-independent mem code this will all be
unnecessary anyway.
 1.12.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.13.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.4.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.13.2.1 30-Oct-2010  uebayasi Implement pmap_physload_device(9) to replace xmd(4) MD backend.
Implement pmap_mmap(9) and use it from mem(4) and xmd(4).
 1.14.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.18 05-Nov-2002  chs merge pmap.c for all 4k-page motorola-MMU (or compatible) m68k platforms.
 1.17 03-Nov-2002  chs merge pmap.h for all 4k-page motorola-MMU (or compatible) m68k platforms.
 1.16 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.15 14-Oct-2002  chs merge pte.h for m68k w/ motorola or compatible MMU
(only 4k-page platforms so far).
 1.14 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.13 22-May-2002  drochner -Subtract vm_map_min(kernel_map) from kernel virtual addresses to get offsets
into kernel_object where this was missing.
(important here because VM_MIN_KERNEL_ADDRESS != 0)
-add some diagnostics
-eliminate some differences to other Utah derived pmaps
 1.12 08-Mar-2002  thorpej branches: 1.12.6;
Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map). Try to deal with this:

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

From art@openbsd.org.
 1.11 02-Jan-2002  chs pmap_page_protect(VM_PROT_NONE) must remove all mappings in the PV list,
even if they are wired. we need to be able to remove all mappings to
pages that are being freed due to (eg.) file truncation.
 1.10 16-Dec-2001  tsutsui Fix comments for ref-count of PT pages.
 1.9 13-Dec-2001  chs change the reference-counting of PT pages to start from zero instead of
one, so that we don't mess up the global count of wired pages by having
the page's wire_count be non-zero when we free the page.
pointed out by Michael Hitch.
 1.8 24-Nov-2001  isaki fix typo s/68551/68851/ in a comment.
 1.7 19-Nov-2001  chs allocate and free page table pages explicitly instead of abusing
uvm_fault_wire(). this allows us to make pt_map non-pageable,
but we need to be careful in pmap_remove() not to attempt to
reference PTEs after the PTP has been freed.
 1.6 29-Sep-2001  chs branches: 1.6.4;
fix typo in pmap_kremove() which was invalidating the wrong TLB entry.
from Hiroki Tanikawa in PR 14099.
 1.5 10-Sep-2001  chris Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.4 26-Jul-2001  drochner branches: 1.4.2;
incorporate patch from Chuck Silvers which basically reduces
pmap_kenter_pa() / pmap_kremove() to the basics - ie, removes pv tracking
 1.3 15-Jun-2001  drochner branches: 1.3.2;
vm_map_t -> struct vm_map *
vm_page_t -> struct vm_page *
simple_lock_data_t -> struct simplelock
 1.2 16-May-2001  drochner get up-to-date (splimp->splvm, cleanup, sprinkle pmap_update())
 1.1 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.3.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.3.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.2.1 03-Aug-2001  lukem update to -current
 1.4.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.6.4.9 11-Nov-2002  nathanw Catch up to -current
 1.6.4.8 18-Oct-2002  nathanw Catch up to -current.
 1.6.4.7 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.6.4.6 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.6.4.5 20-Jun-2002  nathanw Catch up to -current.
 1.6.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.6.4.3 08-Jan-2002  nathanw Catch up to -current.
 1.6.4.2 18-Nov-2001  scw MD Scheduler Activation bits for Cesfic.
Compile-tested only.
 1.6.4.1 29-Sep-2001  scw file pmap.c was added on branch nathanw_sa on 2001-11-18 18:08:10 +0000
 1.12.6.1 30-May-2002  gehenna Catch up with -current.
 1.36 04-Nov-2025  thorpej Rename pmap_bootstrap_finalize() to pmap_bootstrap2(), and change it
to return a pointer to the lwp0 u-area (in preparation for an upcoming
change).

Other than the return value, NFC.
 1.35 24-Jul-2021  andvar Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.34 10-Feb-2012  mhitch branches: 1.34.64;
Sigh, it's been too long since I've done some of this. Fix the RELOC().
 1.33 10-Feb-2012  mhitch Oops - have to RELOC(physmem) here.
 1.32 10-Feb-2012  mhitch The recent kmem changes allocate a large kernel address space before
pmap_init() is called, and the initial kernel PT pages aren't enough
for the allocations pmap_init(). This fails because pmap_kenter_pa()
tries to allocate a new kernel PT page and traps because the pmap has
not been initialized. When computing the number if initial kernel PT
pages, include enough to allow kmem to map the physical memory. This
should fix PR/45915. OK by releng@. One mac68k system has been verified
to boot. Volunteers to test the others welcome. Amigas with at least
up to 128MB of memory were OK, but larger memory will need some adjusting.
 1.31 02-Jan-2011  tsutsui branches: 1.31.8; 1.31.12;
Tidy up common comments. (Yes, too many dup code...)
 1.30 02-Jan-2011  tsutsui Pull code that maps the kernel segment table cache invalidated for 040/060,
to reduce diffs from other m68k ports.

Compile test only. (any working machine for these port?)
 1.29 02-Jan-2011  tsutsui Misc cosmetics to reduce diff among hp300 derived m68k ports.
XXX: too many quirks to merge...
 1.28 25-Dec-2010  tsutsui Fix another fatal typo. sigh.
 1.27 25-Dec-2010  tsutsui Fix fatal typo and pasted lines slipped in the last December
that prevent 68030 machines boot on these ports.
(only hp300 and mvme68k have supported 030 models)

Sorry for so long breakage.
 1.26 11-Dec-2009  tsutsui branches: 1.26.4;
Use appropriate macro during pmap initialization:
- use SYSMAP_VA, SEGSHIFT for Sysmap address and table entries
- use TIA_SIZE, TIB_SIZE for sizes of table entries

Now page size dependent numbers are almost replaced with proper macro.

Tested on atari, hp300, and news68k.
 1.25 06-Dec-2009  tsutsui Move initialization of protection_codes[] and kernel_pmap()
from MD pmap bootstrap sources to common pmap_bootstrap_finalize().

Tested on atari, hp300, mac68k, and news68k.

XXX: Why is protection_codes[] array initialized at run time?
 1.24 06-Dec-2009  tsutsui Sync MMU table initialization with amiga and atari a bit:

- for 040/060, move L2 descs for Sysptmap from the last L2 block in segment
table pages to the contiguous block with ones for segment table mappings

- for 020/030, invalidate ste and pte entries separately since
ste size (TIA_SIZE) and pte size (TIB_SIZE) could be different
on 8KB/page systems

Tested on hp300 (040), mac68k (LC040), and news68k (030)
(and untested on others).

XXX: some more stuff in pmap_bootstrap.c could be moved into
XXX: common pmap_bootstrap_finalize()?
 1.23 05-Dec-2009  tsutsui Use proper macro, variable names, types, and assignments for readability.
 1.22 05-Dec-2009  tsutsui Replace obsolete vm_offset_t with appropriate paddr_t or vaddr_t.
(why gcc compiles these differ!?)
 1.21 04-Dec-2009  tsutsui Allocate lwp0upa (PA of lwp0 uarea) right after kernel rather than
between other page tables to use different mappings for ste/pte pages
as well as amiga and atari. Should resolve XXX comments in next68k and x68k.

Tested on hp300 and mac68k.
 1.20 04-Dec-2009  tsutsui No need to initialize lwp0 u-area in pmap_bootstrap()
since it will be done in pmap_bootstrap_finalize().
 1.19 04-Dec-2009  tsutsui Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc.
Also update some comment.
Compile test only.
 1.18 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.17 11-Aug-2009  matt Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)
 1.16 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.15 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.14 17-Jan-2009  tsutsui branches: 1.14.2;
Move extern decls for Sysseg, Sysptmap, Sysptsize, mem_size, virtual_avail,
virtual_end, and protection_codes[] to common <m68k/pmap_motorola.h>,
and also make protection_codes[] unsigned.

XXX: avail_start and avail_end should also be moved, but it causes
XXX: -Wshadow warnings in uvm/uvm_page.c:uvm_page_physload() and
XXX: I don't have a good idea of alternative names for now.
 1.13 28-Dec-2008  tsutsui Use the global kernel_pmap_ptr pointer in each MD pmap_bootstrap.c
(where MMU is not enabled yet) and make kernel_pmap_store static again.
Also consistently use uintptr_t on address conversion in RELOC() macro.

Tested on hp300 (PA != VA) and news68k (PA == VA).
 1.12 17-Oct-2007  garbled branches: 1.12.16; 1.12.20; 1.12.28;
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.11 18-May-2007  tsutsui branches: 1.11.10;
Update comments to sync yamt-km merge (Sysmap has been moved).

See also:
http://mail-index.netbsd.org/source-changes/2005/02/23/0004.html
 1.10 05-Mar-2007  tsutsui branches: 1.10.2; 1.10.4; 1.10.10;
Allocate msgbufaddr in pmap_bootstrap.c where it's initilized,
and move its declaration into <m68k/pmap_motorola.h>.
 1.9 05-Mar-2007  tsutsui - add missed '*'
- vmmap is (char *) in pmap_motorola.h
 1.8 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.7 11-Dec-2005  christos branches: 1.7.26;
merge ktrace-lwp.
 1.6 01-Apr-2005  yamt branches: 1.6.2;
merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.5 07-Aug-2003  agc branches: 1.5.8; 1.5.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 01-Apr-2003  thorpej branches: 1.3.2;
Use PAGE_SIZE rather than NBPG.
 1.2 05-Nov-2002  chs merge pmap.c for all 4k-page motorola-MMU (or compatible) m68k platforms.
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 11-Nov-2002  nathanw Catch up to -current
 1.1.8.1 14-May-2001  nathanw file pmap_bootstrap.c was added on branch nathanw_sa on 2002-11-11 21:57:40 +0000
 1.3.2.4 01-Apr-2005  skrll Sync with HEAD.
 1.3.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.5.10.2 28-Feb-2005  yamt sync some whitespace and comments among m68k pmap_bootstrap variants.
no functional changes.
 1.5.10.1 24-Feb-2005  yamt change kernel va layout, following mac68k.
 1.5.8.1 29-Apr-2005  kent sync with -current
 1.6.2.1 03-Sep-2007  yamt sync with head.
 1.7.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.10.10.1 22-May-2007  matt Update to HEAD.
 1.10.4.1 11-Jul-2007  mjf Sync with head.
 1.10.2.1 27-May-2007  ad Sync with head.
 1.11.10.1 06-Nov-2007  matt sync with HEAD
 1.12.28.2 28-Apr-2009  skrll Sync with HEAD.
 1.12.28.1 19-Jan-2009  skrll Sync with HEAD.
 1.12.20.3 11-Mar-2010  yamt sync with head
 1.12.20.2 19-Aug-2009  yamt sync with head.
 1.12.20.1 04-May-2009  yamt sync with head.
 1.12.16.1 17-Jan-2009  mjf Sync with HEAD.
 1.14.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.26.4.1 05-Mar-2011  rmind sync with head
 1.31.12.1 18-Feb-2012  mrg merge to -current.
 1.31.8.1 17-Apr-2012  yamt sync with head
 1.34.64.1 01-Aug-2021  thorpej Sync with HEAD.
 1.3 08-Dec-2004  chs use the m68k-common procfs_machdep.c on all m68k platforms.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 14-May-2001  drochner branches: 1.1.8; 1.1.24;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.24.4 18-Dec-2004  skrll Sync with HEAD.
 1.1.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file procfs_machdep.c was added on branch nathanw_sa on 2001-05-14 18:23:04 +0000
 1.6 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.5 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.4 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.3 11-Dec-2005  christos branches: 1.3.78; 1.3.86; 1.3.92;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 14-May-2001  drochner branches: 1.1.8; 1.1.24;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file sic6351.c was added on branch nathanw_sa on 2001-05-14 18:23:05 +0000
 1.3.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.78.1 04-May-2009  yamt sync with head.
 1.3 03-Nov-2002  chs use a merged sys_machdep.c for all the motorola-MMU m68k platforms.
 1.2 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.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.5 11-Nov-2002  nathanw Catch up to -current
 1.1.8.4 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.1.8.3 29-May-2002  nathanw #include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)
 1.1.8.2 18-Nov-2001  scw MD Scheduler Activation bits for Cesfic.
Compile-tested only.
 1.1.8.1 14-May-2001  scw file sys_machdep.c was added on branch nathanw_sa on 2001-11-18 18:08:10 +0000
 1.63 20-Jan-2024  thorpej Largely unify the <machine/cpu.h> headers on the m68k platforms.
 1.62 05-Oct-2023  ad Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).
 1.61 25-Sep-2021  tsutsui Call cnpollc(9) before cngetc(9) as the cons(9) man page says.

Affects only inside #ifdef DEBUG part on "trap during panic" in trap.c
derived from hp300.
 1.60 21-Nov-2019  ad mi_userret(): take care of calling preempt(), set spc_curpriority directly,
and remove MD code that does the same.
 1.59 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.58 18-Feb-2019  thorpej Refactor the 68040 writeback() from each m68k port's trap handler into a
shared copy: m68040_writeback(). It is essentially a copy of the Atari
version, with some minor cosmetic tweaks and one small performance optimization
from the mvme68k port.

Tested by rjs@ on a Quadra 950. (Thanks!)
 1.57 04-Mar-2015  martin branches: 1.57.18;
Handle EINVAL in the fault path and send SIGBUS on mmap'd access past EOF
 1.56 19-Feb-2012  rmind branches: 1.56.2; 1.56.16;
Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.55 08-Feb-2011  rmind branches: 1.55.4; 1.55.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.54 17-Jan-2011  tsutsui branches: 1.54.2;
Explicitly include <machine/pcb.h> for struct pcb.
 1.53 20-Dec-2010  matt branches: 1.53.2;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.52 07-Jul-2010  chs implement ucas_* for m68k.
 1.51 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.50 20-Mar-2010  chs fix copy{in,out}{,str}() to return the error returned by uvm_fault().
fixes PR 41813.
 1.49 23-Nov-2009  rmind branches: 1.49.2; 1.49.4;
Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.48 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.47 18-Mar-2009  cegger bcopy -> memcpy
 1.46 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.45 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.44 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.43 27-Jan-2009  martin branches: 1.43.2;
Centralize fpu exception to siginfo code encoding for all m68k archs,
fixes a failure in the lib/libc/ieeefp/except regression test.
 1.42 15-Oct-2008  wrstuden branches: 1.42.2; 1.42.4;
Merge wrstuden-revivesa into HEAD.
 1.41 24-Apr-2008  ad branches: 1.41.2; 1.41.4; 1.41.8;
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
 1.40 31-Dec-2007  ad branches: 1.40.6; 1.40.8;
Remove COMPAT_HPUX.
 1.39 03-Dec-2007  ad branches: 1.39.6;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.38 05-Nov-2007  ad branches: 1.38.2;
Don't set l_usrpri / spc_curpriority here. mi_userret() does it.
 1.37 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.36 01-Sep-2007  mhitch branches: 1.36.4;
68030 and 68040 processors consider the read portion of a read-modify-write
transfer as a write to ensure the memory is writable before starting any
transfer. The fault status information does not reflect this in the 'read'
status bit (i.e. it shows up as a read access), so faults with a RMW access
to non-writable memory was not getting the correct protection. The page would
be read-only and the instruction would fault over and over.

A specific example is when a process forks, and the child process attempts
to execute a RMW access to a data page, which is read-only because it's CoP
Copy-On-Write.

When checking if the page needs to be writablek, also check the locked transfer
and treat any locked transfer as a write.

68060 already handled this correctly, since it has separate read and write
fault bits, and both are set on a RMW access and the trap code was checking
the write status bit.

Fixes PR#36848.
 1.35 12-Jun-2007  mhitch branches: 1.35.4; 1.35.8; 1.35.10;
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.34 21-May-2007  tsutsui Adapt rest of m68k ports to yamt-idlelwp. Compile tested only.
 1.33 05-Mar-2007  tsutsui branches: 1.33.2; 1.33.4; 1.33.10;
MI softintr(9)'fy. Untested.

This port needs much more cleanups, it seems...
 1.32 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.31 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.30 09-Feb-2007  ad branches: 1.30.2;
Merge newlock2 to head.
 1.29 23-Jul-2006  ad branches: 1.29.4; 1.29.8; 1.29.10;
Use the LWP cached credentials where sane.
 1.28 19-Jul-2006  ad - Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
 1.27 15-May-2006  yamt - include kauth.h for kauth_cred_geteuid.
- tweak indent for a long line.
 1.26 14-May-2006  elad integrate kauth.
 1.25 15-Mar-2006  drochner branches: 1.25.2;
adapt to uvm_fault() interface cleanup: kill the useless 3rd argument
 1.24 07-Mar-2006  thorpej branches: 1.24.2;
Clean up fallout proc_is_traced_p() change:
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
about KTRACE and SYSTRACE, but do no more.
 1.23 25-Feb-2006  wiz branches: 1.23.2;
Fix some typos.
 1.22 11-Dec-2005  christos branches: 1.22.2; 1.22.4; 1.22.6;
merge ktrace-lwp.
 1.21 09-Jun-2005  he branches: 1.21.2;
Adapt to compiling with -Wcast-qual by adding consts.
 1.20 28-Aug-2004  jdolecek use uvm_grow() to update stack segment size on stack page fault instead
of MD code
 1.19 14-Mar-2004  cl add kernel part of concurrency support for SA on MP systems
- move per VP data into struct sadata_vp referenced from l->l_savp
* VP id
* lock on VP data
* LWP on VP
* recently blocked LWP on VP
* queue of LWPs woken which ran on this VP before sleep
* faultaddr
* LWP cache for upcalls
* upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP
 1.18 08-Nov-2003  tsutsui Remove obsolete comments about curproc.
 1.17 02-Nov-2003  cl Extend the #ifdef M68040 so that the `sig' variable declaration is moved
in as well, as it's otherwise not used. (from atari/atari/trap.c and
x68k/x68k/trap.c)
 1.16 31-Oct-2003  cl Reduce code duplication by adding mi_userret() in sys/userret.h
containing signal posting, kernel-exit handling and sa_upcall processing.

XXX the pc532, sparc, sparc64 and vax ports should have their
XXX userret() code rearranged to use this.
 1.15 08-Oct-2003  thorpej * Shuffle some data structures so, and add a flags word to ksiginfo_t.
Right now the only flag is used to indicate if a ksiginfo_t is a
result of a trap. Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap. Expands to 0 if the ksiginfo_t was
not the result of a trap. This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern. Reviewed and OK's by Christos.
 1.14 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.13 17-Sep-2003  cl add MD part of SA/pthread pagefault handling on all m68k ports
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 01-Apr-2003  thorpej branches: 1.10.2;
Use PAGE_SIZE rather than NBPG.
 1.9 28-Jan-2003  wiz success, not sucess. Noted by mjl.
 1.8 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.7 20-Oct-2002  chs branches: 1.7.2;
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.6 14-Feb-2002  chs allow writing to write-only mappings. fixes PR 3493.
 1.5 10-Sep-2001  chris branches: 1.5.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.4 15-Jun-2001  drochner branches: 1.4.2; 1.4.4;
vm_map_t -> struct vm_map *
vm_page_t -> struct vm_page *
simple_lock_data_t -> struct simplelock
 1.3 30-May-2001  lukem add missing #include "opt_kgdb.h"
 1.2 16-May-2001  drochner get up-to-date (get rid of vm specific error codes, sprinkle pmap_update())
 1.1 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.4.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.4.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.4.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.5.4.10 07-Jan-2003  thorpej In the SA universe, the switch-to-this-LWP decision is made at a
different level than where preempt() calls are made, which renders
the "newlwp" argument useless. Replace it with a "more work to do"
boolean argument. Returning to userspace preempt() calls pass 0.
"Voluntary" preemptions in e.g. uiomove() pass 1. This will be used
to indicate to the SA subsystem that the LWP is not yet finished in
the kernel.

Collapse the SA vs. non-SA cases of preempt() together, making the
conditional code block much smaller, and don't call sa_preempt() if
more work is to come.

NOTE: THIS IS NOT A COMPLETE FIX TO THE preempt()-in-uiomove() PROBLEM
THAT CURRENTLY EXISTS FOR SA PROCESSES.
 1.5.4.9 11-Nov-2002  nathanw Catch up to -current
 1.5.4.8 26-Sep-2002  nathanw Change "if (l->l_flag & L_SA_UPCALL)" to "while (l->l_flag & L_SA_UPCALL)"
in userret() functions or equivalent, to permit delivery of multiple upcalls
in a single kernel entry.

XXX It's getting crowded in here. Collapsing posting signals, upcalls, and
XXX kernel-exit handling into one mechanism would be nice.
 1.5.4.7 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.5.4.6 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.5.4.5 28-Feb-2002  nathanw Catch up to -current.
 1.5.4.4 17-Dec-2001  nathanw cpu_upcall() -> sa_upcall_userret().
 1.5.4.3 25-Nov-2001  scw Deal with `want_resched' with trap()'s T_ASTFLT case where it belongs
instead of in userret().
 1.5.4.2 18-Nov-2001  scw MD Scheduler Activation bits for Cesfic.
Compile-tested only.
 1.5.4.1 10-Sep-2001  scw file trap.c was added on branch nathanw_sa on 2001-11-18 18:08:10 +0000
 1.7.2.1 18-Dec-2002  gmcgarry Merge pcred and ucred, and poolify. TBD: check backward compatibility
and factor-out some higher-level functionality.
 1.10.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.2 03-Sep-2004  skrll Sync with HEAD
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.21.2.7 21-Jan-2008  yamt sync with head
 1.21.2.6 07-Dec-2007  yamt sync with head
 1.21.2.5 15-Nov-2007  yamt sync with head.
 1.21.2.4 03-Sep-2007  yamt sync with head.
 1.21.2.3 26-Feb-2007  yamt sync with head.
 1.21.2.2 30-Dec-2006  yamt sync with head.
 1.21.2.1 21-Jun-2006  yamt sync with head.
 1.22.6.2 01-Jun-2006  kardel Sync with head.
 1.22.6.1 22-Apr-2006  simonb Sync with head.
 1.22.4.1 09-Sep-2006  rpaulo sync with head
 1.22.2.1 01-Mar-2006  yamt sync with head.
 1.23.2.4 11-Aug-2006  yamt sync with head
 1.23.2.3 24-May-2006  yamt sync with head.
 1.23.2.2 01-Apr-2006  yamt sync with head.
 1.23.2.1 13-Mar-2006  yamt sync with head.
 1.24.2.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.24.2.2 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.24.2.1 07-Mar-2006  elad file trap.c was added on branch elad-kernelauth on 2006-03-08 00:43:06 +0000
 1.25.2.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.29.10.2 23-Sep-2007  wrstuden Sync with somewhat-recent netbsd-4.
 1.29.10.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.29.8.2 11-Sep-2007  msaitoh Pull up following revision(s) (requested by mhitch in ticket #866):
sys/arch/atari/atari/trap.c: 1.92
sys/arch/mac68k/mac68k/trap.c: 1.129
sys/arch/amiga/amiga/trap.c: 1.116
sys/arch/mvme68k/mvme68k/trap.c: 1.91
sys/arch/news68k/news68k/trap.c: 1.54
sys/arch/sun3/sun3/trap.c: 1.131
sys/arch/next68k/next68k/trap.c: 1.68
sys/arch/luna68k/luna68k/trap.c: 1.47
sys/arch/cesfic/cesfic/trap.c: 1.36
sys/arch/x68k/x68k/trap.c: 1.90
sys/arch/hp300/hp300/trap.c: 1.132
68030 and 68040 processors consider the read portion of a read-modify-write
transfer as a write to ensure the memory is writable before starting any
transfer. The fault status information does not reflect this in the 'read'
status bit (i.e. it shows up as a read access), so faults with a RMW access
to non-writable memory was not getting the correct protection. The page would
be read-only and the instruction would fault over and over.
A specific example is when a process forks, and the child process attempts
to execute a RMW access to a data page, which is read-only because it's CoP
Copy-On-Write.
When checking if the page needs to be writablek, also check the locked transfer
and treat any locked transfer as a write.
68060 already handled this correctly, since it has separate read and write
fault bits, and both are set on a RMW access and the trap code was checking
the write status bit.
Fixes PR#36848.
 1.29.8.1 18-Jun-2007  liamjfoy Pull up following revision(s) (requested by mhitch in ticket #728):
sys/arch/mvme68k/mvme68k/locore.s: revision 1.98
sys/arch/mac68k/mac68k/trap.c: revision 1.128
sys/arch/next68k/next68k/locore.s: revision 1.48
sys/arch/mac68k/mac68k/locore.s: revision 1.152
sys/arch/sun3/sun3/locore.s: revision 1.88
sys/arch/sun2/sun2/locore.s: revision 1.19
sys/arch/sun2/sun2/trap.c: revision 1.32
sys/arch/m68k/m68k/db_trace.c: revision 1.51
sys/arch/mvme68k/mvme68k/trap.c: revision 1.90
sys/arch/news68k/news68k/trap.c: revision 1.53
sys/arch/luna68k/luna68k/locore.s: revision 1.27
sys/arch/atari/atari/locore.s: revision 1.99
sys/arch/sun3/sun3/trap.c: revision 1.130
sys/arch/x68k/x68k/trap.c: revision 1.89
sys/arch/next68k/next68k/trap.c: revision 1.67
sys/arch/x68k/x68k/locore.s: revision 1.79
sys/arch/news68k/news68k/locore.s: revision 1.43
sys/arch/luna68k/luna68k/trap.c: revision 1.46
sys/arch/hp300/hp300/locore.s: revision 1.140
sys/arch/cesfic/cesfic/locore.s: revision 1.15
sys/arch/cesfic/cesfic/trap.c: revision 1.35
sys/arch/m68k/m68k/trap_subr.s: revision 1.12
sys/arch/amiga/amiga/locore.s: revision 1.143
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.29.4.2 06-Feb-2007  ad Update m68k pasteware.
 1.29.4.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.30.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.30.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.33.10.3 03-Oct-2007  garbled Sync with HEAD
 1.33.10.2 26-Jun-2007  garbled Sync with HEAD.
 1.33.10.1 22-May-2007  matt Update to HEAD.
 1.33.4.1 11-Jul-2007  mjf Sync with head.
 1.33.2.4 03-Dec-2007  ad Sync with HEAD.
 1.33.2.3 09-Oct-2007  ad Sync with head.
 1.33.2.2 15-Jul-2007  ad Sync with head.
 1.33.2.1 27-May-2007  ad Sync with head.
 1.35.10.2 09-Jan-2008  matt sync with HEAD
 1.35.10.1 06-Nov-2007  matt sync with HEAD
 1.35.8.3 09-Dec-2007  jmcneill Sync with HEAD.
 1.35.8.2 06-Nov-2007  joerg Sync with HEAD.
 1.35.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.35.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.36.4.1 13-Nov-2007  bouyer Sync with HEAD
 1.38.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.38.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.39.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.40.8.1 18-May-2008  yamt sync with head.
 1.40.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.40.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.41.8.1 19-Oct-2008  haad Sync with HEAD.
 1.41.4.4 30-Jun-2008  wrstuden Change how we make SA threads not generate upcalls. Instead of clearing
LW_SA, use a private flag, LP_SA_NOBLOCK, that we set when we want
to not generate upcalls. This means we do NOT need to lock (l)
(ourselves) to set it.

Adjust tests that look at LW_SA. Now, we are an upcall-generating
lwp if ((l->l_flag & LW_SA) && (~l->l_pflag & LP_SA_NOBLOCK)).

Introduce code pattern to set & remember this:

f = ~l->l_pflag & LP_SA_NOBLOCK;
l->l_pflag |= LP_SA_NOBLOCK;

...

/* f is now LP_SA_NOBLOCK if it wasn't set in l_pflag before */

l->l_pflag ^= f;

I updated a lot of the trap handlers to do trap handling iff LP_SA_NOBLOCK
is not set. I tried to figure out if the trap handler could be triggered
for user-based faults as opposed to kernel faults to user addresses, and
only look at LP_SA_NOBLOCK for the latter.

Above is a result of discussions with rmind at to reduce lock twiddling.

Also, per same discussions, add locking to sys_sa_preempt(). p_lock is
the lock we want.

Also, per same discussions, remove use of LSSUSPENDED as a thread state.
We needed to use it when we were emulating the 4.X and previous behavior
of hiding cached threads. For the moment, we now have them instead
remain visible to all and have them sleeping on the "lwpcache" wait
channel.

sa_newcachelwp(): sa_putcachelwp() wants savp_mutex held, not p_lock.

Tweak some comments.
 1.41.4.3 22-Jun-2008  wrstuden Re-add cpu_upcall() and page fault code. i386 kernels now compile.
They don't boot, but that seems to be a consequence of current from the
day this branch was started.
 1.41.4.2 14-May-2008  wrstuden Per discussion with ad at n dot o, revert signal mask handling
changes.

The l_sigstk changes are most likely totally un-needed as SA will
never use a signal stack - we send an upcall (or will as other
diffs are brought in).

The l_sigmask changes were too controvertial. In all honesty, I
think it's probably best to revert them. The main reason they were
there is the fact that in an SA process, we don't mask signals per
kernel thread, we mask them per user thread. In the kernel, we want
them all to get turned into upcalls. Thus the normal state of
l_sigmask in an SA process is for it to always be empty.

While we are in the process of delivering a signal, we want to
temporarily mask a signal (so we don't recursively exhaust our
upcall stacks). However signal delivery is rare (important, but
rare), and delivering back-to-back signals is even rarer. So rather
than cause every user of a signal mask to be prepared for this very
rare case, we will just add a second check later in the signal
delivery code. Said change is not in this diff.

This also un-compensates all of our compatability code for dealing
with SA. SA is a NetBSD-specific thing, so there's no need for
Irix, Linux, Solaris, SVR4 and so on to cope with it.

As previously, everything other than kern_sa.c compiles in i386
GENERIC as of this checkin. I will switch to ALL soon for compile
testing.
 1.41.4.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.41.2.3 11-Aug-2010  yamt sync with head.
 1.41.2.2 11-Mar-2010  yamt sync with head
 1.41.2.1 04-May-2009  yamt sync with head.
 1.42.4.1 02-Feb-2009  snj Pull up following revision(s) (requested by martin in ticket #332):
sys/arch/amiga/amiga/trap.c: revision 1.122
sys/arch/atari/atari/trap.c: revision 1.99
sys/arch/cesfic/cesfic/trap.c: revision 1.43
sys/arch/hp300/hp300/trap.c: revision 1.140
sys/arch/luna68k/luna68k/trap.c: revision 1.55
sys/arch/m68k/include/signal.h: revision 1.25
sys/arch/m68k/m68k/sig_machdep.c: revision 1.41
sys/arch/mac68k/mac68k/trap.c: revision 1.136 via patch
sys/arch/mvme68k/mvme68k/trap.c: revision 1.98
sys/arch/news68k/news68k/trap.c: revision 1.60
sys/arch/next68k/next68k/trap.c: revision 1.75
sys/arch/sun2/sun2/trap.c: revision 1.37
sys/arch/sun3/sun3/trap.c: revision 1.136
sys/arch/x68k/x68k/trap.c: revision 1.97
Centralize fpu exception to siginfo code encoding for all m68k archs,
fixes a failure in the lib/libc/ieeefp/except regression test.
 1.42.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.42.2.1 03-Mar-2009  skrll Sync with HEAD.
 1.43.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.49.4.3 05-Mar-2011  rmind sync with head
 1.49.4.2 03-Jul-2010  rmind sync with head
 1.49.4.1 30-May-2010  rmind sync with head
 1.49.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.49.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.53.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.54.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.55.8.1 24-Feb-2012  mrg sync to -current.
 1.55.4.1 17-Apr-2012  yamt sync with head
 1.56.16.1 06-Apr-2015  skrll Sync with HEAD
 1.56.2.1 03-Dec-2017  jdolecek update from HEAD
 1.57.18.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.57.18.1 10-Jun-2019  christos Sync with HEAD
 1.5 15-Jan-2024  thorpej Switch cesfic over to the common vector table.
 1.4 08-Feb-2011  rmind Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.3 11-Dec-2005  christos branches: 1.3.100; 1.3.106; 1.3.108;
merge ktrace-lwp.
 1.2 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.1 14-May-2001  drochner branches: 1.1.8; 1.1.24;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file vectors.s was added on branch nathanw_sa on 2001-05-14 18:23:06 +0000
 1.3.108.1 17-Feb-2011  bouyer Sync with HEAD
 1.3.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.100.1 05-Mar-2011  rmind sync with head
 1.10 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.9 04-Mar-2002  simonb Don't need to declare phys_map - it is declared in <uvm/uvm_extern.h>.
 1.8 26-Feb-2002  simonb Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
 1.7 10-Sep-2001  chris branches: 1.7.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.6 19-Aug-2001  chs branches: 1.6.2;
add missing pmap_update().
 1.5 19-Aug-2001  chs use pmap_k* in vmapbuf() and vunmapbuf() since there's no VAC on this platform.

in vunmapbuf(), call pmap_*remove() explicitly since uvm_km_free_wakeup()
will soon no longer do it for us.
 1.4 26-Jul-2001  drochner use pmap_kenter/remove in pagemove() to make it work with memory mapped
by pmap_kenter_pa() (ie buffer pages)
 1.3 15-Jun-2001  drochner branches: 1.3.2;
vm_map_t -> struct vm_map *
vm_page_t -> struct vm_page *
simple_lock_data_t -> struct simplelock
 1.2 16-May-2001  drochner get up-to-date (sprinkle pmap_update())
 1.1 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.3.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.3.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.3.2.1 03-Aug-2001  lukem update to -current
 1.6.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.7.4.8 11-Nov-2002  nathanw Catch up to -current
 1.7.4.7 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.7.4.6 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.7.4.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.7.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.7.4.3 08-Dec-2001  thorpej cpu_fork() -> cpu_lwp_fork(). This logically forks an LWP, not a
complete process. As noted by Gregory McGarry on tech-kern.
 1.7.4.2 18-Nov-2001  scw MD Scheduler Activation bits for Cesfic.
Compile-tested only.
 1.7.4.1 10-Sep-2001  scw file vm_machdep.c was added on branch nathanw_sa on 2001-11-18 18:08:11 +0000
 1.2 06-Jan-2003  lukem Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

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

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

Per lengthy discussion with Andrew Brown.
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 07-Jan-2003  thorpej Sync with HEAD.
 1.1.8.1 14-May-2001  thorpej file .keep_me was added on branch nathanw_sa on 2003-01-07 21:05:05 +0000
 1.1 06-Jan-2003  lukem branches: 1.1.2;
Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

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

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

Per lengthy discussion with Andrew Brown.
 1.1.2.2 07-Jan-2003  thorpej Sync with HEAD.
 1.1.2.1 06-Jan-2003  thorpej file Makefile was added on branch nathanw_sa on 2003-01-07 21:05:05 +0000
 1.78 12-Feb-2023  abs Add optoion GENERIC.local include to the end of ~all GENERIC configs

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

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

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

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

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

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.74 10-Aug-2020  rin Add -fno-omit-frame-pointer to m68k kernels with DDB for backtraces.
-omit-frame-pointer is enabled for -O1 and higher for GCC8 by default.
 1.73 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.72 26-Apr-2019  sevan Enable BUFQ_PRIOCSCAN, CARP, Veriexec by default in GENERIC kernel configs.
On ports without a GENERIC kernel config enable in individul files, e.g evbmips.
Omit on:
atari, dreamcast, emips, epoc32, evbppc/VIRTEX*, ia64, luna68x, mvme68k,
mvmeppc, playstation2, riscv, sun2, sun3, x68k, zaurus due to resource
constraints or port infancy.
 1.71 14-Mar-2019  thorpej G/C "MAPPECOPY". It is the deadest of wood, and never actually worked in
NetBSD.
 1.70 01-Aug-2018  maxv Unreference IPF/PF from all the config files, and enable NPF instead when
wanted. This also fixes some inconsistencies I saw in several files (eg
IPF options while IPF was not compiled, IPF+PF enabled by default, etc).
 1.69 23-Jan-2018  sevan branches: 1.69.2; 1.69.4;
Alternate buffer queue strategies no longer considered experimental, update
description.

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

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

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

ok riastradh
 1.66 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 2.
 1.65 16-Nov-2014  manu branches: 1.65.2; 1.65.12;
Remove unused extended attributes kernel options

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

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

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

There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
 1.62 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.61 05-Jul-2014  tsutsui branches: 1.61.2;
Use COPTS="-O2 -fno-reorder-blocks" as defined in sys.mk for userland.

Compile tests only.
 1.60 30-Jun-2013  rmind branches: 1.60.4;
G/C PFIL_HOOKS from the kernel configs.
 1.59 27-Apr-2013  christos branches: 1.59.4;
the bogus number police
 1.58 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.57 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.56 10-Mar-2012  joerg branches: 1.56.2;
P1003_1B_SEMAPHORE is no longer optional.
 1.55 22-Nov-2011  tls branches: 1.55.2;

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

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

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.53 08-Feb-2010  joerg branches: 1.53.2; 1.53.4; 1.53.6;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.52 24-Jan-2009  mrg branches: 1.52.4;
add COMPAT_50 to all the configs with COMPAT_40.
 1.51 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.50 10-Aug-2008  tls branches: 1.50.2;
Add accept filters to GENERIC kernels where they exist.
 1.49 30-May-2008  tsutsui branches: 1.49.4;
Add options COMPAT_40 to files which have options COMPAT_30.
 1.48 31-Dec-2007  ad branches: 1.48.6; 1.48.8; 1.48.10; 1.48.12;
Remove systrace. Ok core@.
 1.47 04-Nov-2007  xtraeme branches: 1.47.2; 1.47.8;
Remove System V semaphores and share memory options to set the limits:
SEMMNI, SEMMNS, SEMUME and SHMMAXPGS.

They can be tweaked via sysctl now. Ports that were setting values on
them weren't touched, I only removed the ones that were commented out.
 1.46 11-Nov-2006  jmmv branches: 1.46.8; 1.46.26; 1.46.28; 1.46.32;
Remove tmpfs's experimental status. OK'ed by core@.
 1.45 26-Aug-2006  tsutsui branches: 1.45.2; 1.45.4;
Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.44 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.43 28-Jun-2006  liamjfoy branches: 1.43.2;
Add CARP to GENERIC kernel configs. CARP is not enabled by default.

ok: christos
 1.42 05-Feb-2006  cube branches: 1.42.2; 1.42.10;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.41 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.40 02-Feb-2006  reinoud branches: 1.40.2;
Add commented out UDF file-system entry in all GENERIC configurations.
 1.39 09-Dec-2005  elad branches: 1.39.2; 1.39.4;
Add (commented out) Veriexec options and pseudo-device to GENERIC kernels,
and remove the i386 GENERIC_VERIEXEC config.
 1.38 03-Nov-2005  chs turn off DEBUG and DIAGNOSTIC in GENERIC kernels so that they
are compatible with the LKMs that are part of the release.
 1.37 10-Sep-2005  jmmv Initial addition of tmpfs, an efficient memory file-system. This project
was developed as part of Google's Summer of Code 2005 program. This
change adds the kernel code, the mount_tmpfs utility, a regression test
suite and does all other related changes to integrate these.

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

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

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

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

Suggested by perry and soda on tech-kern.
Please refer options(4) for details for these options.
 1.29 25-Feb-2005  simonb branches: 1.29.2;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.28 10-Nov-2004  christos branches: 1.28.4; 1.28.6;
Add COMPAT_BSDPTY to the rest of the config files.
 1.27 04-Sep-2004  manu IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
 1.26 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.25 28-Jun-2004  bouyer Add options P1003_1B_SEMAPHORE
to all GENERIC-like kernel config files where SYSV* options were already
present (commented out if the SYSV* options are commented out).
Fix lib/25897 and lib/25898.
 1.24 26-Jun-2004  abs Add (commented out) ALTQ options to all GENERIC-like files
 1.23 22-Jun-2004  itojun have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
 1.22 18-Jun-2004  christos ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM
 1.21 16-Jun-2004  christos Add pseudo-device ptm on all the generic flavored kernels.
 1.20 22-Sep-2003  cl branches: 1.20.2;
add COMPAT_15/COMPAT_16
 1.19 26-Apr-2003  ragge branches: 1.19.2;
Add pseudo-device ksyms.
 1.18 27-Feb-2003  perseant Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
 1.17 22-Nov-2002  wiz Fix typo (responsiness -> responsiveness).
 1.16 18-Oct-2002  junyoung Add NEW_BUFQ_STRATEGY (disabled by default).
 1.15 14-Oct-2002  elric Added commented out cgd(4)s to GENERIC configs.
 1.14 06-Oct-2002  provos add SYSTRACE; approved perry.
 1.13 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.12 17-Jun-2002  lukem Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
 1.11 25-Apr-2002  atatat branches: 1.11.2; 1.11.4;
Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.10 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.9 27-Jan-2002  jdolecek add options PIPE_SOCKETPAIR to individual kernel configs
the option is commented out on everything but kernels I was able
to recognize as INSTALL-like or ones for small memory machines
 1.8 28-Dec-2001  martin Add PPPoE to all generic kernels that should be able to use it.
XXX TODO: do this for INSTALL kernels too, add sysinst support and make the
XXX needed binaries available on the ramdisk root fs.
 1.7 14-Dec-2001  gmcgarry Add a blurb to the top of all GENERIC files. This serves three purposes:
- to clarify some terminology
- to clarify the intention of the GENERIC file
- to cross-reference some useful man pages
 1.6 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.5 01-Sep-2001  atatat branches: 1.5.6;
Add bridge pseudo devices to GENERIC configs
 1.4 25-Aug-2001  chs add COMPAT_AOUT_M68K stuff.
 1.3 08-Jul-2001  abs branches: 1.3.2;
Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
 1.2 30-Jun-2001  darcy Add System V semaphore resource limits to each GENERIC file that has an
option for System V semaphores. It appears that there are no overrides
in the code and each file has the following added.

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

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

Note - the i386 port was not forgotten. It was done separately.
 1.1 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.3.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.5.6.8 11-Dec-2002  thorpej Sync with HEAD.
 1.5.6.7 11-Nov-2002  nathanw Catch up to -current
 1.5.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.5.6.5 20-Jun-2002  nathanw Catch up to -current.
 1.5.6.4 17-Apr-2002  nathanw Catch up to -current.
 1.5.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.5.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.6.1 01-Sep-2001  nathanw file GENERIC was added on branch nathanw_sa on 2002-01-08 00:23:57 +0000
 1.11.4.1 01-Aug-2002  lukem Pull up revision 1.12 (requested by lukem in ticket #312):
Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
 1.11.2.1 14-Jul-2002  gehenna catch up with -current.
 1.19.2.7 11-Dec-2005  christos Sync with head.
 1.19.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.19.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.19.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.19.2.1 03-Aug-2004  skrll Sync with HEAD
 1.20.2.3 15-Jul-2004  he Pull up revision 1.26 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.20.2.2 02-Jul-2004  he Pull up revision 1.25 (requested by bouyer in ticket #573):
Add options P1003_1B_SEMAPHORE to all GENERIC-like kernel
config files where SYSV* options were already present
(commented out if the SYSV* options are commented out).
Fixes PR#25897 and PR#25898.
 1.20.2.1 30-Jun-2004  jdc Pull up revision 1.24 (requested by abs in ticket #567).

Add (commented out) ALTQ options to all GENERIC-like files
 1.28.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.28.4.1 29-Apr-2005  kent sync with -current
 1.29.2.2 05-Nov-2005  tron Pull up following revision(s) (requested by chs in ticket #929):
sys/arch/hp300/conf/GENERIC: revision 1.124
sys/arch/acorn32/conf/GENERIC: revision 1.62
sys/arch/pdp10/conf/GENERIC: revision 1.19
sys/arch/mvme68k/conf/GENERIC: revision 1.61
sys/arch/netwinder/conf/GENERIC: revision 1.70
sys/arch/sbmips/conf/GENERIC: revision 1.46
sys/arch/macppc/conf/GENERIC: revision 1.214
sys/arch/bebox/conf/GENERIC: revision 1.89
sys/arch/cobalt/conf/GENERIC: revision 1.83
sys/arch/cats/conf/GENERIC: revision 1.92
sys/arch/shark/conf/GENERIC: revision 1.53
sys/arch/amiga/conf/GENERIC.in: revision 1.45
sys/arch/acorn26/conf/GENERIC: revision 1.37
sys/arch/cesfic/conf/GENERIC: revision 1.38
sys/arch/iyonix/conf/GENERIC: revision 1.21
sys/arch/alpha/conf/GENERIC: revision 1.277
sys/arch/vax/conf/GENERIC: revision 1.143
sys/arch/atari/conf/GENERIC.in: revision 1.56
sys/arch/mipsco/conf/GENERIC: revision 1.53
sys/arch/ofppc/conf/GENERIC: revision 1.85
sys/arch/next68k/conf/GENERIC: revision 1.96
sys/arch/arc/conf/GENERIC: revision 1.125
sys/arch/dreamcast/conf/GENERIC: revision 1.62
turn off DEBUG and DIAGNOSTIC in GENERIC kernels so that they
are compatible with the LKMs that are part of the release.
 1.29.2.1 14-Aug-2005  riz Pull up revision 1.32 (requested by hubertf in ticket #625):
Add support for reading cloop2 compressed filesystem images,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.31.2.4 21-Jan-2008  yamt sync with head
 1.31.2.3 15-Nov-2007  yamt sync with head.
 1.31.2.2 30-Dec-2006  yamt sync with head.
 1.31.2.1 21-Jun-2006  yamt sync with head.
 1.39.4.1 09-Sep-2006  rpaulo sync with head
 1.39.2.1 18-Feb-2006  yamt sync with head.
 1.40.2.1 22-Apr-2006  simonb Sync with head.
 1.42.10.1 13-Jul-2006  gdamore Merge from HEAD.
 1.42.2.2 03-Sep-2006  yamt sync with head.
 1.42.2.1 11-Aug-2006  yamt sync with head
 1.43.2.2 22-Sep-2006  riz Pull up following revision(s) (requested by tsutsui in ticket #170):
sys/arch/sparc64/conf/GENERIC: revision 1.63
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.55
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.54
sys/arch/next68k/conf/GENERIC: revision 1.105
sys/arch/ews4800mips/conf/GENERIC: revision 1.12
sys/arch/arc/conf/GENERIC: revision 1.142
sys/arch/sun3/conf/GENERIC3X: revision 1.91
sys/arch/amd64/conf/GENERIC: revision 1.105
sys/arch/sun2/conf/GENERIC: revision 1.58
sys/arch/amiga/conf/GENERIC.in: revision 1.55
sys/arch/mac68k/conf/GENERIC: revision 1.175
sys/arch/acorn26/conf/GENERIC: revision 1.46
sys/arch/shark/conf/GENERIC: revision 1.65
sys/arch/cesfic/conf/GENERIC: revision 1.45
sys/arch/sandpoint/conf/GENERIC: revision 1.36
sys/arch/iyonix/conf/GENERIC: revision 1.32
sys/arch/mvme68k/conf/GENERIC: revision 1.69
sys/arch/evbarm/conf/ARMADILLO210: revision 1.3
sys/arch/vax/conf/GENERIC: revision 1.154
sys/arch/mipsco/conf/GENERIC: revision 1.61
sys/arch/evbarm/conf/ARMADILLO9: revision 1.14
sys/arch/cobalt/conf/GENERIC: revision 1.103
sys/arch/ofppc/conf/GENERIC: revision 1.94
sys/arch/hp700/conf/GENERIC: revision 1.69
sys/arch/playstation2/conf/GENERIC: revision 1.8
sys/arch/dreamcast/conf/GENERIC: revision 1.73
sys/arch/news68k/conf/GENERIC: revision 1.81
sys/arch/macppc/conf/GENERIC: revision 1.234
sys/arch/hp300/conf/GENERIC: revision 1.134
sys/arch/mmeye/conf/GENERIC: revision 1.83
sys/arch/ibmnws/conf/GENERIC: revision 1.26
sys/arch/cats/conf/GENERIC: revision 1.109
sys/arch/sparc/conf/GENERIC: revision 1.191
sys/arch/pdp10/conf/GENERIC: revision 1.27
sys/arch/acorn32/conf/GENERIC: revision 1.75
sys/arch/luna68k/conf/GENERIC: revision 1.74
sys/arch/bebox/conf/GENERIC: revision 1.101
sys/arch/pmax/conf/GENERIC: revision 1.148
sys/arch/x68k/conf/GENERIC: revision 1.130
sys/arch/sun3/conf/GENERIC: revision 1.134
sys/arch/prep/conf/GENERIC: revision 1.126
sys/arch/alpha/conf/GENERIC: revision 1.293
sys/arch/newsmips/conf/GENERIC: revision 1.94
sys/arch/netwinder/conf/GENERIC: revision 1.83
sys/arch/hpcsh/conf/GENERIC: revision 1.69
sys/arch/sbmips/conf/GENERIC: revision 1.55
sys/arch/pc532/conf/GENERIC: revision 1.65
sys/arch/hpcmips/conf/GENERIC: revision 1.192
Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.43.2.1 14-Aug-2006  tron Pull up following revision(s) (requested by elad in ticket #17):
sys/arch/sparc/conf/KRUPS: revision 1.38
sys/arch/i386/conf/XEN2_DOMU: revision 1.2
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.197
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.53
sys/arch/evbsh5/conf/SIMULATOR: revision 1.12
sys/arch/sparc/conf/MRCOFFEE: revision 1.17
sys/arch/next68k/conf/GENERIC: revision 1.104
sys/arch/i386/conf/VIRTUALPC: revision 1.44
sys/arch/ews4800mips/conf/GENERIC: revision 1.11
sys/arch/evbsh5/conf/CAYMAN: revision 1.23
sys/arch/arc/conf/GENERIC: revision 1.141
sys/arch/amd64/conf/GENERIC: revision 1.103
sys/arch/sun3/conf/GENERIC3X: revision 1.90
sys/arch/evbarm/conf/HDL_G: revision 1.3
sys/arch/sun2/conf/GENERIC: revision 1.57
sys/arch/news68k/conf/GENERIC_TINY: revision 1.51
sys/arch/evbppc/conf/EXPLORA451: revision 1.27
sys/arch/amiga/conf/GENERIC.in: revision 1.54
sys/arch/mac68k/conf/GENERIC: revision 1.174
sys/arch/acorn26/conf/GENERIC: revision 1.45
sys/arch/shark/conf/GENERIC: revision 1.64
sys/arch/cesfic/conf/GENERIC: revision 1.44
sys/arch/mvme68k/conf/GENERIC: revision 1.68
sys/arch/i386/conf/XEN2_DOM0: revision 1.4
sys/arch/atari/conf/GENERIC.in: revision 1.63
sys/arch/amiga/conf/GENERIC: revision 1.240
sys/arch/i386/conf/LAMB: revision 1.65
sys/arch/i386/conf/GENERIC: revision 1.773
sys/arch/acorn32/conf/EB7500ATX: revision 1.26
sys/arch/x68k/conf/GENERIC: revision 1.128
sys/arch/vax/conf/GENERIC: revision 1.153
sys/arch/atari/conf/ATARITT: revision 1.81
sys/arch/mipsco/conf/GENERIC: revision 1.60
sys/arch/cobalt/conf/GENERIC: revision 1.101
sys/arch/evbarm/conf/ARMADILLO9: revision 1.13
sys/arch/ofppc/conf/GENERIC: revision 1.93
sys/arch/atari/conf/MILAN-PCIIDE: revision 1.51
sys/arch/arc/conf/RPC44: revision 1.26
sys/arch/sparc64/conf/GENERIC: revision 1.59
sys/arch/i386/conf/XEN3_DOMU: revision 1.2
sys/arch/hp700/conf/GENERIC: revision 1.68
sys/arch/atari/conf/MILAN-ISAIDE: revision 1.47
sys/arch/macppc/conf/GENERIC: revision 1.231
sys/arch/dreamcast/conf/GENERIC: revision 1.72
sys/arch/news68k/conf/GENERIC: revision 1.80
sys/arch/hp300/conf/GENERIC: revision 1.133
sys/arch/mmeye/conf/GENERIC: revision 1.82
sys/arch/macppc/conf/MAMBO: revision 1.2
sys/arch/cats/conf/GENERIC: revision 1.107
sys/arch/atari/conf/FALCON: revision 1.79
sys/arch/acorn32/conf/GENERIC: revision 1.71
sys/arch/sparc/conf/GENERIC: revision 1.190
sys/arch/news68k/conf/LIBERO: revision 1.40
sys/arch/amiga/conf/DRACO: revision 1.114
sys/arch/cobalt/conf/INSTALL: revision 1.23
sys/arch/luna68k/conf/GENERIC: revision 1.73
sys/arch/bebox/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.147
sys/arch/amiga/conf/WSCONS: revision 1.52
sys/arch/macppc/conf/POWERMAC_G5: revision 1.2
sys/arch/alpha/conf/ALPHA: revision 1.218
sys/arch/sun3/conf/GENERIC: revision 1.133
sys/arch/prep/conf/GENERIC: revision 1.124
sys/arch/alpha/conf/GENERIC: revision 1.291
sys/arch/atari/conf/HADES: revision 1.71
sys/arch/newsmips/conf/GENERIC: revision 1.93
sys/arch/netwinder/conf/GENERIC: revision 1.82
sys/arch/hpcmips/conf/GENERIC: revision 1.190
sys/arch/amiga/conf/AMIGA: revision 1.98
sys/arch/sbmips/conf/GENERIC: revision 1.54
sys/arch/pc532/conf/GENERIC: revision 1.64
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.53
Disable SYSTRACE by default on all kernels (discussed with core)
 1.45.4.1 10-Dec-2006  yamt sync with head.
 1.45.2.1 18-Nov-2006  ad Sync with head.
 1.46.32.1 13-Nov-2007  bouyer Sync with HEAD
 1.46.28.2 09-Jan-2008  matt sync with HEAD
 1.46.28.1 06-Nov-2007  matt sync with HEAD
 1.46.26.1 04-Nov-2007  jmcneill Sync with HEAD.
 1.46.8.1 03-Dec-2007  ad Sync with HEAD.
 1.47.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.47.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.48.12.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.48.12.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.48.10.2 11-Mar-2010  yamt sync with head
 1.48.10.1 04-May-2009  yamt sync with head.
 1.48.8.1 04-Jun-2008  yamt sync with head
 1.48.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.48.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.48.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.49.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.49.4.1 19-Oct-2008  haad Sync with HEAD.
 1.50.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.50.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.52.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.53.6.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.53.4.1 06-Jun-2011  jruoho Sync with HEAD.
 1.53.2.1 21-Apr-2011  rmind sync with head
 1.54.4.3 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.54.4.2 30-Oct-2012  yamt sync with head
 1.54.4.1 17-Apr-2012  yamt sync with head
 1.55.2.1 11-Mar-2012  mrg sync to latest -current
 1.56.2.4 03-Dec-2017  jdolecek update from HEAD
 1.56.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.56.2.2 23-Jun-2013  tls resync from head
 1.56.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.59.4.1 28-Aug-2013  rmind sync with head
 1.60.4.1 10-Aug-2014  tls Rebase.
 1.61.2.2 18-Nov-2014  snj Pull up following revision(s) (requested by manu in ticket #251):
sys/arch/acorn26/conf/GENERIC: revision 1.81
sys/arch/acorn32/conf/GENERIC: revision 1.116
sys/arch/alpha/conf/GENERIC: revision 1.362
sys/arch/amd64/conf/ALL: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.404
sys/arch/amd64/conf/XEN3_DOM0: revision 1.112
sys/arch/amd64/conf/XEN3_DOMU: revision 1.60
sys/arch/amiga/conf/GENERIC.in: revision 1.129
sys/arch/amiga/conf/GENERIC: revision 1.311
sys/arch/amigappc/conf/GENERIC: revision 1.24
sys/arch/arc/conf/GENERIC: revision 1.184
sys/arch/bebox/conf/GENERIC: revision 1.145
sys/arch/cats/conf/GENERIC: revision 1.155
sys/arch/cesfic/conf/GENERIC: revision 1.65
sys/arch/cobalt/conf/GENERIC: revision 1.147
sys/arch/dreamcast/conf/GENERIC: revision 1.121
sys/arch/emips/conf/GENERIC: revision 1.15
sys/arch/epoc32/conf/GENERIC: revision 1.8
sys/arch/ews4800mips/conf/GENERIC: revision 1.51
sys/arch/hp300/conf/GENERIC: revision 1.190
sys/arch/hpcmips/conf/GENERIC: revision 1.229
sys/arch/hpcsh/conf/GENERIC: revision 1.106
sys/arch/hppa/conf/GENERIC: revision 1.6
sys/arch/i386/conf/ALL: revision 1.389
sys/arch/i386/conf/GENERIC: revision 1.1118
sys/arch/i386/conf/XEN3_DOM0: revision 1.93
sys/arch/i386/conf/XEN3_DOMU: revision 1.65
sys/arch/ibmnws/conf/GENERIC: revision 1.46
sys/arch/iyonix/conf/GENERIC: revision 1.88
sys/arch/landisk/conf/GENERIC: revision 1.45
sys/arch/luna68k/conf/GENERIC: revision 1.119
sys/arch/mac68k/conf/GENERIC: revision 1.220
sys/arch/macppc/conf/GENERIC: revision 1.320
sys/arch/macppc/conf/MAMBO: revision 1.24
sys/arch/macppc/conf/POWERMAC_G5: revision 1.25
sys/arch/mipsco/conf/GENERIC: revision 1.88
sys/arch/mmeye/conf/GENERIC: revision 1.120
sys/arch/mvme68k/conf/GENERIC: revision 1.94
sys/arch/mvmeppc/conf/GENERIC: revision 1.24
sys/arch/netwinder/conf/GENERIC: revision 1.126
sys/arch/news68k/conf/GENERIC: revision 1.125
sys/arch/newsmips/conf/GENERIC: revision 1.129
sys/arch/next68k/conf/GENERIC: revision 1.139
sys/arch/ofppc/conf/GENERIC: revision 1.157
sys/arch/pmax/conf/GENERIC64: revision 1.21
sys/arch/pmax/conf/GENERIC: revision 1.185
sys/arch/prep/conf/GENERIC: revision 1.174
sys/arch/rs6000/conf/GENERIC: revision 1.33
sys/arch/sandpoint/conf/GENERIC: revision 1.88
sys/arch/sbmips/conf/GENERIC: revision 1.101
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.28
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.104
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.106
sys/arch/shark/conf/GENERIC: revision 1.121
sys/arch/sparc/conf/GENERIC: revision 1.248
sys/arch/sparc/conf/TADPOLE3GX: revision 1.65
sys/arch/sparc64/conf/GENERIC: revision 1.177
sys/arch/sparc64/conf/NONPLUS64: revision 1.44
sys/arch/sun2/conf/GENERIC: revision 1.94
sys/arch/sun3/conf/GENERIC: revision 1.171
sys/arch/vax/conf/GENERIC: revision 1.193
sys/arch/vax/conf/VAX780: revision 1.19
sys/arch/x68k/conf/GENERIC: revision 1.179
sys/arch/zaurus/conf/GENERIC: revision 1.65
sys/ufs/files.ufs: revision 1.38
Remove unused extended attributes kernel options

As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
 1.61.2.1 14-Nov-2014  martin Pull up following revision(s) (requested by manu in ticket #232):
sys/arch/next68k/conf/GENERIC: revision 1.138
sys/arch/cobalt/conf/GENERIC: revision 1.146
sys/arch/mvme68k/conf/GENERIC: revision 1.93
sys/arch/vax/conf/VAX780: revision 1.18
sys/arch/newsmips/conf/GENERIC: revision 1.128
sys/arch/luna68k/conf/GENERIC: revision 1.118
sys/arch/sbmips/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.184
sys/arch/alpha/conf/GENERIC: revision 1.361
sys/arch/sparc64/conf/GENERIC: revision 1.176
sys/arch/sun3/conf/GENERIC: revision 1.170
sys/arch/shark/conf/GENERIC: revision 1.120
sys/arch/landisk/conf/GENERIC: revision 1.44
sys/arch/bebox/conf/GENERIC: revision 1.144
sys/arch/sparc64/conf/NONPLUS64: revision 1.43
sys/arch/sandpoint/conf/GENERIC: revision 1.87
sys/arch/emips/conf/GENERIC: revision 1.14
sys/arch/amd64/conf/XEN3_DOM0: revision 1.111
sys/arch/dreamcast/conf/GENERIC: revision 1.120
sys/arch/cesfic/conf/GENERIC: revision 1.64
sys/arch/mmeye/conf/GENERIC: revision 1.119
sys/arch/epoc32/conf/GENERIC: revision 1.7
sys/arch/x68k/conf/GENERIC: revision 1.178
sys/arch/iyonix/conf/GENERIC: revision 1.87
sys/arch/sun2/conf/GENERIC: revision 1.93
sys/arch/ews4800mips/conf/GENERIC: revision 1.50
sys/arch/amd64/conf/XEN3_DOMU: revision 1.59
sys/arch/acorn26/conf/GENERIC: revision 1.80
sys/arch/acorn32/conf/GENERIC: revision 1.115
sys/arch/macppc/conf/POWERMAC_G5: revision 1.24
sys/arch/i386/conf/GENERIC: revision 1.1117
sys/arch/arc/conf/GENERIC: revision 1.183
sys/arch/cats/conf/GENERIC: revision 1.154
sys/arch/amiga/conf/GENERIC.in: revision 1.128
sys/arch/zaurus/conf/GENERIC: revision 1.64
sys/arch/netwinder/conf/GENERIC: revision 1.125
sys/arch/hppa/conf/GENERIC: revision 1.5
sys/arch/mvmeppc/conf/GENERIC: revision 1.23
sys/arch/macppc/conf/GENERIC: revision 1.319
sys/arch/amiga/conf/GENERIC: revision 1.310
sys/arch/pmax/conf/GENERIC64: revision 1.20
sys/arch/macppc/conf/MAMBO: revision 1.23
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.27
sys/arch/amigappc/conf/GENERIC: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.403
sys/arch/ofppc/conf/GENERIC: revision 1.156
sys/arch/mac68k/conf/GENERIC: revision 1.219
sys/arch/i386/conf/XEN3_DOMU: revision 1.64
sys/arch/mipsco/conf/GENERIC: revision 1.87
sys/arch/hp300/conf/GENERIC: revision 1.189
sys/arch/vax/conf/GENERIC: revision 1.192
sys/arch/news68k/conf/GENERIC: revision 1.124
sys/arch/ibmnws/conf/GENERIC: revision 1.45
sys/arch/hpcsh/conf/GENERIC: revision 1.105
sys/arch/sparc/conf/TADPOLE3GX: revision 1.64
sys/arch/i386/conf/XEN3_DOM0: revision 1.92
sys/arch/sparc/conf/GENERIC: revision 1.247
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.105
sys/arch/prep/conf/GENERIC: revision 1.173
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.103
sys/arch/rs6000/conf/GENERIC: revision 1.32
sys/arch/hpcmips/conf/GENERIC: revision 1.228
Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels
This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr
Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
 1.65.12.1 26-Jan-2018  martin Pull up following revision(s) (requested by sevan in ticket #510):
sys/arch/sun3/conf/GENERIC3X: revision 1.130
sys/arch/sparc64/conf/GENERIC: revision 1.203
sys/arch/news68k/conf/LIBERO: revision 1.66
sys/arch/amiga/conf/DRACO: revision 1.185
sys/arch/evbarm/conf/MV2120: revision 1.35
sys/arch/x68k/conf/GENERIC: revision 1.187
sys/arch/rs6000/conf/GENERIC: revision 1.39
sys/arch/news68k/conf/GENERIC_TINY: revision 1.86
sys/arch/i386/conf/XEN3_DOMU: revision 1.88
sys/arch/iyonix/conf/GENERIC: revision 1.97
sys/arch/evbarm64/conf/A64EMUL: revision 1.11
sys/arch/mvme68k/conf/GENERIC: revision 1.98
sys/arch/acorn32/conf/GENERIC: revision 1.124
sys/arch/i386/conf/XEN3_DOM0: revision 1.125
sys/arch/cobalt/conf/INSTALL: revision 1.65
sys/arch/macppc/conf/GENERIC_601: revision 1.16
sys/arch/hppa/conf/GENERIC: revision 1.17
sys/arch/amiga/conf/GENERIC.in: revision 1.137
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.33
sys/arch/netwinder/conf/GENERIC: revision 1.134
sys/arch/amd64/conf/XEN3_DOMU: revision 1.83
sys/arch/mac68k/conf/GENERIC: revision 1.225
sys/arch/arc/conf/RPC44: revision 1.54
sys/arch/mipsco/conf/GENERIC: revision 1.92
sys/arch/cats/conf/GENERIC: revision 1.166
sys/arch/amd64/conf/XEN3_DOM0: revision 1.145
sys/arch/amigappc/conf/GENERIC: revision 1.33
sys/arch/sun3/conf/GENERIC: revision 1.176
sys/arch/news68k/conf/GENERIC: revision 1.130
sys/arch/hpcsh/conf/GENERIC: revision 1.110
sys/arch/hp300/conf/GENERIC: revision 1.198
sys/arch/atari/conf/GENERIC.in: revision 1.115
sys/arch/sparc/conf/MRCOFFEE: revision 1.54
sys/arch/evbppc/conf/EXPLORA451: revision 1.62
sys/arch/cesfic/conf/GENERIC: revision 1.69
sys/arch/vax/conf/GENERIC: revision 1.204
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.115
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.112
sys/arch/sparc/conf/GENERIC: revision 1.258
sys/arch/next68k/conf/GENERIC: revision 1.145
sys/arch/evbarm/conf/MMNET_GENERIC: revision 1.34
sys/arch/prep/conf/GENERIC: revision 1.185
sys/arch/amiga/conf/INSTALL: revision 1.129
sys/arch/newsmips/conf/GENERIC: revision 1.133
sys/arch/cobalt/conf/GENERIC: revision 1.156
sys/arch/sun2/conf/GENERIC: revision 1.99
sys/arch/luna68k/conf/INSTALL: revision 1.25
sys/arch/amigappc/conf/NULL: revision 1.53
sys/arch/acorn26/conf/GENERIC: revision 1.85
sys/arch/vax/conf/VAX780: revision 1.25
sys/arch/luna68k/conf/GENERIC: revision 1.125
sys/arch/ews4800mips/conf/GENERIC: revision 1.56
sys/arch/macppc/conf/POWERMAC_G5: revision 1.29
sys/arch/arc/conf/GENERIC: revision 1.189
sys/arch/macppc/conf/MAMBO: revision 1.27
sys/arch/acorn32/conf/EB7500ATX: revision 1.64
sys/arch/pmax/conf/GENERIC: revision 1.196
sys/arch/pmax/conf/GENERIC64: revision 1.28
sys/arch/amiga/conf/GENERIC: revision 1.319
sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.55
sys/arch/macppc/conf/GENERIC: revision 1.339
sys/arch/emips/conf/GENERIC: revision 1.21
sys/arch/sandpoint/conf/GENERIC: revision 1.97
sys/arch/landisk/conf/GENERIC: revision 1.58
sys/arch/bebox/conf/GENERIC: revision 1.157
sys/arch/alpha/conf/GENERIC: revision 1.379
Alternate buffer queue strategies no longer considered experimental, update
description.
Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.65.2.1 28-Aug-2017  skrll Sync with HEAD
 1.69.4.1 10-Jun-2019  christos Sync with HEAD
 1.69.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.20 22-Sep-2018  rin - Determine KERN_AS automatically depending on whether OPT_MODULAR is
set or not, in the same way as libcompat.

- Specify OPT_MODULAR in the port Makefile instead of KERN_AS.

Now, KERN_AS=library is used for kernels without module(7) for all ports.

OK christos
 1.19 06-Sep-2015  uebayasi branches: 1.19.16; 1.19.18;
Declare dependency on fpsp.o via newly introduced ${MD_LIBS} instead of
${MD_OBJS}.

${MD_OBJS} should be used only for objects that must be linked first (i.e.,
start code). Objects have to be compiled following common compile rules,
and have to be generated into common places (i.e., top of kernel build
directory).

${MD_LIBS} defines libraries that are built by separate makefiles, under
separate directories. `Makefile.kern.inc' doesn't know intermediate library
objects.
 1.18 31-Aug-2015  uebayasi Fix build of .s files.
 1.17 23-Jan-2015  chs fix build with gcc48.
 1.16 21-Jan-2011  joerg branches: 1.16.14; 1.16.30; 1.16.32;
Switch remaining platforms to modern CPP for assembler.
 1.15 01-Sep-2006  matt branches: 1.15.82; 1.15.88; 1.15.90;
Reorder AFLAGS to avoid assembler warnings
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.8;
merge ktrace-lwp.
 1.13 31-May-2005  christos branches: 1.13.2;
s/GENASSYM/GENASSYM_CONF/ so we can use "GENASSYM" as the program name.
 1.12 04-Jun-2004  thorpej Add the %MAKEOPTIONSAPPEND token at the end of the file, after the
common Makefile.kern.inc has been included.
 1.11 28-Sep-2003  cl branches: 1.11.4;
always use -traditional-cpp
 1.10 14-Sep-2003  cl make compile: fix GCC3 check and add defflag PANICBUTTON
 1.9 05-Oct-2002  chs branches: 1.9.6;
fix void * math, turn on -Wpointer-arith.
 1.8 04-Jun-2002  thorpej Don't use -traditional-cpp if HAVE_GCC3.
 1.7 09-Dec-2001  atatat branches: 1.7.8;
Roll the rest of the ports over to the new MI kernel build machinery.
Any problems reported by testers have been fixed, and massive
cross-compiling of kernels has shown that any problems that remain
with actually building kernels are not related to this.
 1.6 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.5 26-Oct-2001  jmc branches: 1.5.2;
Change defaults for kernel compiles. Default all to USETOOLS?=no and have
the etc Makefile override that by putting USETOOLS into $.MAKEOVERRIDES
This way the default for kernel compiles is still to use the installed
toolchain instead of depending on $TOOLDIR. $TOOLDIR can be used by
simply adding USETOOLS=yes to the command line as usual.

Adjust each ports template to set the default no setting and also pull in
bsd.own.mk if they weren't already to ensure they'll build correctly
with the new toolchain setup.
 1.4 23-Oct-2001  thorpej branches: 1.4.2;
Set MACHINE_ARCH explicitly in Makefiles for which it is constant.
Also, since config(8) now explcitly sets MACHINE, there is no need
to do it here in the Makefile.
 1.3 25-Aug-2001  chs remove -mwarn-no-reg-prefixes, it doesn't work with new gas.
 1.2 29-May-2001  mrg branches: 1.2.2;
define _KERNEL_OPT as well as _KERNEL. we will use this in the future to
get kernel "opt_foo.h" headers, rather than _KERNEL && !_LKM.
 1.1 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.2.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.5.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.5.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.5.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.2.1 26-Oct-2001  nathanw file Makefile.cesfic was added on branch nathanw_sa on 2002-01-08 00:23:58 +0000
 1.7.8.1 14-Jul-2002  gehenna catch up with -current.
 1.9.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.6.1 03-Aug-2004  skrll Sync with HEAD
 1.11.4.1 06-Feb-2005  jmc Pull up patch (requested by martti in ticket #1086)
Move ipf to sys/dist/ipf and sync w. trunk
 1.13.2.1 30-Dec-2006  yamt sync with head.
 1.14.8.1 03-Sep-2006  yamt sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.15.90.1 08-Feb-2011  bouyer Sync with HEAD
 1.15.88.1 06-Jun-2011  jruoho Sync with HEAD.
 1.15.82.1 05-Mar-2011  rmind sync with head
 1.16.32.2 22-Sep-2015  skrll Sync with HEAD
 1.16.32.1 06-Apr-2015  skrll Sync with HEAD
 1.16.30.1 04-Feb-2015  snj Pull up following revision(s) (requested by chs in ticket #483):
sys/arch/cesfic/conf/Makefile.cesfic: revision 1.17
fix build with gcc48.
 1.16.14.1 03-Dec-2017  jdolecek update from HEAD
 1.19.18.1 10-Jun-2019  christos Sync with HEAD
 1.19.16.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.21 15-Jan-2024  thorpej Switch cesfic over to the common interrupt dispatch code.
 1.20 15-Jan-2024  thorpej Switch cesfic over to the common vector table.
 1.19 09-Jan-2024  thorpej Remove duplicated / slightly-tweaked loadustp() (load user segment table)
routines from all of the m68k ports using the shared pmap. Instead, in
pmap_init(), set up a function pointer to the appropriate mmu_load_urp*()
function in mmu_subr.s.
 1.18 18-Feb-2019  thorpej Refactor the 68040 writeback() from each m68k port's trap handler into a
shared copy: m68040_writeback(). It is essentially a copy of the Atari
version, with some minor cosmetic tweaks and one small performance optimization
from the mvme68k port.

Tested by rjs@ on a Quadra 950. (Thanks!)
 1.17 12-Jun-2011  rmind branches: 1.17.54;
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.16 03-Dec-2007  ad branches: 1.16.40; 1.16.50;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.15 05-Mar-2007  tsutsui branches: 1.15.2; 1.15.18; 1.15.20; 1.15.26;
MI softintr(9)'fy. Untested.

This port needs much more cleanups, it seems...
 1.14 11-Dec-2005  christos branches: 1.14.26;
merge ktrace-lwp.
 1.13 07-Dec-2004  chs branches: 1.13.12;
use the m68k-common procfs_machdep.c on all m68k platforms.
 1.12 14-Sep-2003  cl make compile: fix GCC3 check and add defflag PANICBUTTON
 1.11 05-Nov-2002  chs branches: 1.11.6;
merge pmap.c for all 4k-page motorola-MMU (or compatible) m68k platforms.
 1.10 03-Nov-2002  chs use a merged sys_machdep.c for all the motorola-MMU m68k platforms.
 1.9 03-Nov-2002  chs merge all the m68k copies of kgdb_machdep.c.
 1.8 02-Nov-2002  chs enhance the common m68k db_memrw.c to handle read-only kernel text
and switch all the motorola-MMU m68k platforms to use it.
 1.7 02-Nov-2002  chs finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.
 1.6 26-Oct-2002  jdolecek now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
 1.5 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.4 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.3 20-Nov-2001  lukem branches: 1.3.8;
whitespace cleanup
 1.2 25-Aug-2001  chs branches: 1.2.6;
add COMPAT_AOUT_M68K stuff.
 1.1 14-May-2001  drochner branches: 1.1.2;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.6.4 11-Nov-2002  nathanw Catch up to -current
 1.2.6.3 17-Sep-2002  nathanw Catch up to -current.
 1.2.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.6.1 25-Aug-2001  nathanw file files.cesfic was added on branch nathanw_sa on 2002-01-08 00:23:58 +0000
 1.3.8.2 17-May-2002  gehenna Remove old block majors list.
 1.3.8.1 16-May-2002  gehenna Include the list of block/character major numbers.
 1.11.6.4 18-Dec-2004  skrll Sync with HEAD.
 1.11.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.6.1 03-Aug-2004  skrll Sync with HEAD
 1.13.12.2 07-Dec-2007  yamt sync with head
 1.13.12.1 03-Sep-2007  yamt sync with head.
 1.14.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.15.26.1 08-Dec-2007  mjf Sync with HEAD.
 1.15.20.1 09-Jan-2008  matt sync with HEAD
 1.15.18.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.15.2.1 03-Dec-2007  ad Sync with HEAD.
 1.16.50.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.16.40.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.17.54.1 10-Jun-2019  christos Sync with HEAD
 1.23 04-Apr-2020  jdolecek mark nsmb major obsolete
 1.22 28-Jan-2019  dholland Systematize handling of removed drivers.

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

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

Note that some of the things now explicitly listed as obsolete are
really ancient history. My scan went back as far as when the majors
files were added. (But not before that.)
 1.21 30-Jun-2011  wiz branches: 1.21.54;
dependant -> dependent
 1.20 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.19 31-Dec-2007  ad branches: 1.19.6; 1.19.10; 1.19.16; 1.19.18;
Remove systrace. Ok core@.
 1.18 24-Nov-2006  wiz branches: 1.18.28; 1.18.34; 1.18.42;
s/independant/independent/, from Zafer.
 1.17 11-Dec-2005  christos branches: 1.17.20; 1.17.22;
merge ktrace-lwp.
 1.16 17-Sep-2005  yamt make VMSWAP optional again.
 1.15 31-Jul-2005  yamt revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
 1.14 30-Jul-2005  yamt defflag VMSWAP.
 1.13 10-May-2005  jdolecek branches: 1.13.2;
assign major for nsmb(4)
 1.12 10-Dec-2003  jmc Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
 1.11 24-Oct-2003  jdolecek add necessary majors for miscellaneous devices, such as missing
wscons/scsi/isdn devices
 1.10 15-Oct-2003  jdolecek add majors for ipfilter, lkm, vnd, tun, raid, cgd, ccd, and md
where missing
 1.9 10-Oct-2003  jdolecek reassing majors for crypto and pf to use the newly defined MI major
range
 1.8 10-Oct-2003  jdolecek update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
 1.7 05-Oct-2003  jdolecek Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

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

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

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 16-May-2002  gehenna branches: 1.1.2;
file majors.cesfic was initially added on branch gehenna-devsw.
 1.1.2.3 14-Jul-2002  gehenna catch up with -current.
 1.1.2.2 30-May-2002  gehenna Add $NetBSD$
 1.1.2.1 16-May-2002  gehenna Add the list of block/character majors.
 1.2.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.2.2.1 06-Sep-2002  nathanw file majors.cesfic was added on branch nathanw_sa on 2002-09-17 21:14:04 +0000
 1.3.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.1 04-Oct-2002  jdolecek file majors.cesfic was added on branch kqueue on 2002-10-10 18:32:16 +0000
 1.4.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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.13.2.3 21-Jan-2008  yamt sync with head
 1.13.2.2 30-Dec-2006  yamt sync with head.
 1.13.2.1 21-Jun-2006  yamt sync with head.
 1.17.22.1 10-Dec-2006  yamt sync with head.
 1.17.20.1 12-Jan-2007  ad Sync with head.
 1.18.42.1 02-Jan-2008  bouyer Sync with HEAD
 1.18.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.18.28.1 09-Jan-2008  matt sync with HEAD
 1.19.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.19.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.19.10.1 04-May-2009  yamt sync with head.
 1.19.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.21.54.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.21.54.1 10-Jun-2019  christos Sync with HEAD
 1.6 09-Jan-2024  thorpej Remove duplicated / slightly-tweaked loadustp() (load user segment table)
routines from all of the m68k ports using the shared pmap. Instead, in
pmap_init(), set up a function pointer to the appropriate mmu_load_urp*()
function in mmu_subr.s.
 1.5 19-Sep-2010  tsutsui - add m68k/conf/std.m68k, which includes common standard options for m68k,
options EXEC_ELF32, EXEC_SCRIPTS, and CPU_IN_CKSUM for md cpu_in_cksum.c
- make all m68k ports include common arch/m68k/conf/std.m68k
from MD std.${MACHINE}
 1.4 11-Dec-2005  christos branches: 1.4.78; 1.4.98; 1.4.100;
merge ktrace-lwp.
 1.3 17-Sep-2005  yamt include "conf/std".
 1.2 20-Nov-2001  lukem branches: 1.2.16; 1.2.32;
cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.1 14-May-2001  drochner branches: 1.1.2; 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.8.1 14-May-2001  nathanw file std.cesfic was added on branch nathanw_sa on 2002-01-08 00:23:58 +0000
 1.1.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.32.1 21-Jun-2006  yamt sync with head.
 1.2.16.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.100.1 05-Mar-2011  rmind sync with head
 1.4.98.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.4.78.1 09-Oct-2010  yamt sync with head
 1.7 04-Apr-2008  tsutsui Split device_t/softc for le(4) and variants and misc cosmetic changes.
 1.6 11-Dec-2005  christos branches: 1.6.74;
merge ktrace-lwp.
 1.5 28-Sep-2003  cl Cast to (void *) to appease gcc3.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 02-Oct-2002  thorpej branches: 1.3.6;
Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 14-May-2001  drochner branches: 1.1.2; 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.1 14-May-2001  nathanw file if_le.c was added on branch nathanw_sa on 2002-10-18 02:36:13 +0000
 1.1.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.6.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.24 11-Sep-2021  andvar Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
 1.23 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.22 24-Apr-2021  thorpej branches: 1.22.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.21 18-Nov-2020  thorpej branches: 1.21.2;
malloc(9) -> kmem(9)
 1.20 10-Nov-2019  chs branches: 1.20.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.19 24-Mar-2014  christos branches: 1.19.30;
- use cpu_{g,s}etmodel
- remove unused
 1.18 26-Oct-2009  cegger branches: 1.18.12; 1.18.22; 1.18.26;
kill extra whitespaces
reviewed by tsutsui@
 1.17 18-Mar-2009  cegger bcopy -> memcpy
 1.16 13-Jun-2008  cegger branches: 1.16.4; 1.16.10;
use device_lookup_private to get softc
 1.15 28-Apr-2008  martin branches: 1.15.2; 1.15.4;
Remove clause 3 and 4 from TNF licenses
 1.14 29-Mar-2008  tsutsui branches: 1.14.2; 1.14.4;
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 03-Dec-2007  ad branches: 1.13.14;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.12 09-Nov-2007  ad Call zs_lock_init() to set up the chanstate's lock.
 1.11 05-Mar-2007  tsutsui branches: 1.11.2; 1.11.18; 1.11.20; 1.11.24; 1.11.26;
MI softintr(9)'fy. Untested.

This port needs much more cleanups, it seems...
 1.10 28-Mar-2006  thorpej branches: 1.10.14;
Use device_unit().
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 15-Jul-2003  lukem branches: 1.8.16;
__KERNEL_RCSID()
 1.7 09-Apr-2003  drochner branches: 1.7.2;
catch up with "struct consdev" change
 1.6 28-Jan-2003  pk Provide locking required by the interrupt handlers running at IPL_SERIAL.
 1.5 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.4 05-Oct-2002  chs fix void * math, turn on -Wpointer-arith.
 1.3 24-Sep-2002  ad Zero fill the newly allocated zs_chanstate.
 1.2 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 14-May-2001  drochner branches: 1.1.2; 1.1.8; 1.1.16;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.16.1 19-May-2002  gehenna Remove hard-coded major.
 1.1.8.4 03-Jan-2003  thorpej Sync with HEAD.
 1.1.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.2 17-Sep-2002  nathanw Catch up to -current.
 1.1.8.1 14-May-2001  nathanw file zs.c was added on branch nathanw_sa on 2002-09-17 21:14:05 +0000
 1.1.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.4 07-Dec-2007  yamt sync with head
 1.8.16.3 15-Nov-2007  yamt sync with head.
 1.8.16.2 03-Sep-2007  yamt sync with head.
 1.8.16.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.9.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.9.8.1 01-Apr-2006  yamt sync with head.
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.10.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.11.26.2 08-Dec-2007  mjf Sync with HEAD.
 1.11.26.1 19-Nov-2007  mjf Sync with HEAD.
 1.11.24.1 13-Nov-2007  bouyer Sync with HEAD
 1.11.20.1 09-Jan-2008  matt sync with HEAD
 1.11.18.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.11.18.1 11-Nov-2007  joerg Sync with HEAD.
 1.11.2.1 03-Dec-2007  ad Sync with HEAD.
 1.13.14.3 29-Jun-2008  mjf Sync with HEAD.
 1.13.14.2 02-Jun-2008  mjf Sync with HEAD.
 1.13.14.1 03-Apr-2008  mjf Sync with HEAD.
 1.14.4.3 11-Mar-2010  yamt sync with head
 1.14.4.2 04-May-2009  yamt sync with head.
 1.14.4.1 16-May-2008  yamt sync with head.
 1.14.2.2 17-Jun-2008  yamt sync with head.
 1.14.2.1 18-May-2008  yamt sync with head.
 1.15.4.1 18-Jun-2008  simonb Sync with head.
 1.15.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.16.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.16.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.26.1 18-May-2014  rmind sync with head
 1.18.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.12.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.19.30.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.20.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.21.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.22.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.9 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.8 03-Dec-2007  ad branches: 1.8.14;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.7 05-Mar-2007  tsutsui branches: 1.7.2; 1.7.18; 1.7.20; 1.7.26;
MI softintr(9)'fy. Untested.

This port needs much more cleanups, it seems...
 1.6 11-Dec-2005  christos branches: 1.6.26;
merge ktrace-lwp.
 1.5 28-Sep-2003  cl branches: 1.5.16;
Cast to (void *) to appease gcc3.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 02-Oct-2002  thorpej branches: 1.3.6;
Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 14-May-2001  drochner branches: 1.1.2; 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.1 14-May-2001  nathanw file zs_pcc.c was added on branch nathanw_sa on 2002-10-18 02:36:13 +0000
 1.1.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.5.16.2 07-Dec-2007  yamt sync with head
 1.5.16.1 03-Sep-2007  yamt sync with head.
 1.6.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.7.26.1 08-Dec-2007  mjf Sync with HEAD.
 1.7.20.1 09-Jan-2008  matt sync with HEAD
 1.7.18.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.7.2.1 03-Dec-2007  ad Sync with HEAD.
 1.8.14.1 03-Apr-2008  mjf Sync with HEAD.
 1.2 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.1 14-May-2001  drochner branches: 1.1.8; 1.1.130; 1.1.138; 1.1.144;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.144.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.138.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.130.1 04-May-2009  yamt sync with head.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file zsvar.h was added on branch nathanw_sa on 2001-05-14 18:23:09 +0000
 1.13 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.12 12-Jul-2018  maxv branches: 1.12.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.11 24-Dec-2015  christos branches: 1.11.16; 1.11.18;
fenv for m68k
 1.10 17-Jul-2011  joerg branches: 1.10.12; 1.10.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.9 09-Feb-2007  ad Merge newlock2 to head.
 1.8 11-Dec-2005  christos branches: 1.8.20;
merge ktrace-lwp.
 1.7 08-May-2004  kleink branches: 1.7.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.6 17-Jan-2003  thorpej branches: 1.6.2;
Merge the nathanw_sa branch.
 1.5 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.4 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.3 27-Feb-2002  kleink branches: 1.3.8;
Sort.
 1.2 02-Feb-2002  drochner install intr.h
 1.1 14-May-2001  drochner branches: 1.1.2; 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.5 11-Dec-2002  thorpej Sync with HEAD.
 1.1.8.4 13-Aug-2002  nathanw Catch up to -current.
 1.1.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.8.2 10-Nov-2001  scw Kernel mcontext glue for Scheduler Activations on m68k from
Klaus Klein <kleink@netbsd.org>.
 1.1.8.1 14-May-2001  scw file Makefile was added on branch nathanw_sa on 2001-11-10 21:22:49 +0000
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.8.1 30-Aug-2002  gehenna catch up with -current.
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.12.1 26-Feb-2007  yamt sync with head.
 1.8.20.1 01-Feb-2007  ad Header file cleanup.
 1.10.30.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.10.12.1 03-Dec-2017  jdolecek update from HEAD
 1.11.18.1 10-Jun-2019  christos Sync with HEAD
 1.11.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.12.36.1 02-Aug-2025  perseant Sync with HEAD
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file ansi.h was added on branch nathanw_sa on 2001-05-14 18:23:09 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file aout_machdep.h was added on branch nathanw_sa on 2001-05-14 18:23:10 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file asm.h was added on branch nathanw_sa on 2001-05-14 18:23:10 +0000
 1.2 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.1 14-May-2001  drochner branches: 1.1.8; 1.1.130; 1.1.138; 1.1.144;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.144.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.138.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.130.1 04-May-2009  yamt sync with head.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file autoconf.h was added on branch nathanw_sa on 2001-05-14 18:23:10 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file bswap.h was added on branch nathanw_sa on 2001-05-14 18:23:10 +0000
 1.3 23-Sep-2019  skrll Provide PRIxBUSADDR, PRIxBUSSIZE, PRIuBUSSIZE, and PRIxBSH for all arches
to follow arm and (generic) mips.

Reviewed by christos.
 1.2 07-May-2012  tsutsui branches: 1.2.40;
Add dummy bus_dma(9) typedefs (enabled by __HAVE_NO_BUS_DMA) in <sys/bus.h>
for ports which don't bother to have unnecessary bus_dma(9) implementation
to appease MI driver modules that require bus_dma_tag_t.

For amiga, move <m68k/bus_dma.h> inclusion from <machine/pci_machdep.h>
to <machine/bus.h> since amiga will want actual bus_dma(9) in future
for PCI devices.

Fixes builds on sys/modules/if_axe etc on ancient ports.

"Sounds good" from martin@ on port-m68k@.
 1.1 02-Jan-2011  tsutsui branches: 1.1.6; 1.1.10; 1.1.14;
Add a dummy <machine/bus.h> which nows seems to be mandatory in MI code
including <sys/bus.h> even if a port doesn't use it. Taken from sbmips.
 1.1.14.1 02-Jun-2012  mrg sync to latest -current.
 1.1.10.1 23-May-2012  yamt sync with head.
 1.1.6.2 05-Mar-2011  rmind sync with head
 1.1.6.1 02-Jan-2011  rmind file bus.h was added on branch rmind-uvmplock on 2011-03-05 20:49:47 +0000
 1.2.40.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file cdefs.h was added on branch nathanw_sa on 2001-05-14 18:23:10 +0000
 1.37 20-Jan-2024  thorpej Largely unify the <machine/cpu.h> headers on the m68k platforms.
 1.36 18-Jan-2024  thorpej Make the M68K_MMU_* defines real kernel options, available in opt_m68k_arch.h.
For 68030, 68040, and 68060, infer M68K_MMU_MOTOROLA. For 68010 and 68020, it
must be an explicit option (set in std.${MACHINE} or, in the case of hp300,
inferred from the specific model option).
 1.35 15-Jan-2024  thorpej Switch cesfic over to the common interrupt dispatch code.
 1.34 09-Jan-2024  thorpej Remove duplicated / slightly-tweaked loadustp() (load user segment table)
routines from all of the m68k ports using the shared pmap. Instead, in
pmap_init(), set up a function pointer to the appropriate mmu_load_urp*()
function in mmu_subr.s.
 1.33 23-Nov-2019  ad cpu_need_resched():

- Remove all code that should be MI, leaving the bare minimum under arch/.
- Make the required actions very explicit.
- Pass in LWP pointer for convenience.
- When a trap is required on another CPU, have the IPI set it locally.
- Expunge cpu_did_resched().
 1.32 18-Feb-2019  thorpej Refactor the 68040 writeback() from each m68k port's trap handler into a
shared copy: m68040_writeback(). It is essentially a copy of the Atari
version, with some minor cosmetic tweaks and one small performance optimization
from the mvme68k port.

Tested by rjs@ on a Quadra 950. (Thanks!)
 1.31 22-Aug-2018  msaitoh - Cleanup for dynamic sysctl:
- Remove unused *_NAMES macros for sysctl.
- Remove unused *_MAXID for sysctls.
- Move CTL_MACHDEP sysctl definitions for m68k into m68k/include/cpu.h and
use them on all m68k machines.
 1.30 17-Dec-2016  flxd branches: 1.30.14; 1.30.16;
Fix typo "one the" and architecture where appropriate.
 1.29 19-Oct-2013  christos branches: 1.29.6; 1.29.10;
make cpu_need_resched() macros consistent; __USE flags
 1.28 02-Feb-2012  tsutsui branches: 1.28.6; 1.28.10;
Always include <m68k/cpu.h> (i.e. outside #if defined(_KERNEL))
for crash(8) as amiga and sun3. There are _KERNEL protections in it.

Briefly tested by "build.sh -m news68k -U build".
Further possible botch will be fixed later.
 1.27 16-May-2011  tsutsui branches: 1.27.4; 1.27.8;
- merge and move pasted m68k MD setreg() functions into m68k/m68k_machdep.c
- move m68881_save() and m68881_restore() declarations into <m68k/m68k.h>

Briefly tested and no obvious breakage on atari, sun3, and x68k.
 1.26 08-Feb-2011  rmind Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.25 22-Dec-2010  matt branches: 1.25.2; 1.25.4;
Collect cpu_info and friends and move to m68k/include/cpu.h
Add a define __HAVE_CPU_DATA_FIRST which means that cpu_data is the first
member in struct cpu_info.
 1.24 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.23 21-Oct-2009  rmind branches: 1.23.2; 1.23.4;
Remove uarea swap-out functionality:

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

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

Discussed on <tech-kern>, reviewed by <ad>.
 1.22 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.21 27-Feb-2008  xtraeme branches: 1.21.4; 1.21.12; 1.21.18;
Remove CTL_MACHDEP_NAMES, it's not used anywhere.

Ok by martin@.
 1.20 17-Oct-2007  garbled branches: 1.20.12; 1.20.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.19 04-Aug-2007  ad branches: 1.19.2;
Add ci_cpuid where it's missing.
 1.18 21-May-2007  tsutsui branches: 1.18.2; 1.18.4; 1.18.8;
Move declarations of m68k common functions
from <machine/cpu.h> to <m68k/m68k.h>.
While here, remove some obsolete function decls.
 1.17 21-May-2007  tsutsui Adapt rest of m68k ports to yamt-idlelwp. Compile tested only.
 1.16 20-May-2007  mhitch Add missing call to lwp_startup() in lwp_trampoline() (which was renamed
from proc_trampoline to match the other ports).

A DIAGNOSTIC kernel will now boot and run. LOCKDEBUG still doesn't work yet.
Also, my amiga no longer loses time.
 1.15 05-Mar-2007  tsutsui branches: 1.15.2; 1.15.4; 1.15.10;
MI softintr(9)'fy. Untested.

This port needs much more cleanups, it seems...
 1.14 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13 16-Feb-2007  ad branches: 1.13.2;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
 1.12 09-Feb-2007  ad Merge newlock2 to head.
 1.11 11-Dec-2005  christos branches: 1.11.20;
merge ktrace-lwp.
 1.10 26-Sep-2004  yamt branches: 1.10.12;
don't expose cpu_info to userland.
 1.9 22-Sep-2004  yamt move some per-cpu data definitions to MI place so that they can be modified
without touching all ports. discussed on tech-kern@.
 1.8 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.7 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.6 17-Jan-2003  thorpej branches: 1.6.2;
Merge the nathanw_sa branch.
 1.5 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.4 26-Jul-2001  drochner branches: 1.4.6;
make sure clockframe is __packed
 1.3 14-Jun-2001  thorpej branches: 1.3.2;
Don't need to prototype child_return() here, it's in <sys/proc.h>.
 1.2 30-May-2001  mrg use _KERNEL_OPT
 1.1 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.3.2.1 03-Aug-2001  lukem update to -current
 1.4.6.5 03-Dec-2002  gmcgarry Use cpu_proc_fork().
 1.4.6.4 11-Nov-2002  nathanw Catch up to -current
 1.4.6.3 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.4.6.2 18-Nov-2001  scw MD Scheduler Activation bits for Cesfic.
Compile-tested only.
 1.4.6.1 26-Jul-2001  scw file cpu.h was added on branch nathanw_sa on 2001-11-18 18:08:11 +0000
 1.6.2.5 19-Oct-2004  skrll Sync with HEAD
 1.6.2.4 24-Sep-2004  skrll Sync with HEAD.
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.10.12.3 17-Mar-2008  yamt sync with head.
 1.10.12.2 03-Sep-2007  yamt sync with head.
 1.10.12.1 26-Feb-2007  yamt sync with head.
 1.11.20.1 06-Feb-2007  ad Update m68k pasteware.
 1.13.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.15.10.2 03-Oct-2007  garbled Sync with HEAD
 1.15.10.1 22-May-2007  matt Update to HEAD.
 1.15.4.1 11-Jul-2007  mjf Sync with head.
 1.15.2.2 20-Aug-2007  ad Sync with HEAD.
 1.15.2.1 27-May-2007  ad Sync with head.
 1.18.8.1 04-Aug-2007  jmcneill Sync with HEAD.
 1.18.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.18.2.1 07-Aug-2007  matt Sync with HEAD.
 1.19.2.2 23-Mar-2008  matt sync with HEAD
 1.19.2.1 06-Nov-2007  matt sync with HEAD
 1.20.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.20.12.1 24-Mar-2008  keiichi sync with head.
 1.21.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.21.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.21.4.3 11-Aug-2010  yamt sync with head.
 1.21.4.2 11-Mar-2010  yamt sync with head
 1.21.4.1 04-May-2009  yamt sync with head.
 1.23.4.3 31-May-2011  rmind sync with head
 1.23.4.2 05-Mar-2011  rmind sync with head
 1.23.4.1 03-Jul-2010  rmind sync with head
 1.23.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.25.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.25.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.27.8.1 18-Feb-2012  mrg merge to -current.
 1.27.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.27.4.1 17-Apr-2012  yamt sync with head
 1.28.10.1 18-May-2014  rmind sync with head
 1.28.6.2 03-Dec-2017  jdolecek update from HEAD
 1.28.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.10.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.29.6.1 05-Feb-2017  skrll Sync with HEAD
 1.30.16.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.30.16.1 10-Jun-2019  christos Sync with HEAD
 1.30.14.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file db_machdep.h was added on branch nathanw_sa on 2001-05-14 18:23:11 +0000
 1.2 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.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file disklabel.h was added on branch nathanw_sa on 2001-05-14 18:23:11 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file elf_machdep.h was added on branch nathanw_sa on 2001-05-14 18:23:11 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file endian.h was added on branch nathanw_sa on 2001-05-14 18:23:11 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file endian_machdep.h was added on branch nathanw_sa on 2001-05-14 18:23:11 +0000
 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:35:59 +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:33 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file float.h was added on branch nathanw_sa on 2001-05-14 18:23:12 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file frame.h was added on branch nathanw_sa on 2001-05-14 18:23:12 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file ieee.h was added on branch nathanw_sa on 2001-05-14 18:23:12 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file ieeefp.h was added on branch nathanw_sa on 2001-05-14 18:23:12 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file int_const.h was added on branch nathanw_sa on 2001-05-14 18:23:12 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file int_fmtio.h was added on branch nathanw_sa on 2001-05-14 18:23:12 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file int_limits.h was added on branch nathanw_sa on 2001-05-14 18:23:13 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file int_mwgwtypes.h was added on branch nathanw_sa on 2001-05-14 18:23:13 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file int_types.h was added on branch nathanw_sa on 2001-05-14 18:23:13 +0000
 1.18 19-Jan-2024  thorpej Add _KERNEL guards around most of the definitions in these files.
 1.17 15-Jan-2024  thorpej G/C __HAVE_LEGACY_INTRCNT from cesfic.
 1.16 15-Jan-2024  thorpej Switch cesfic over to the common interrupt dispatch code.
 1.15 11-Jul-2023  riastradh cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.

Probably not necessary but let's be a little more cautious about
this.
 1.14 11-Jul-2023  riastradh cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8).
 1.13 22-Dec-2011  tsutsui branches: 1.13.78;
No need to include <m68k/softintr.h>.
Old softintr(9) was superseded by MI softint(9).
 1.12 08-Feb-2011  rmind branches: 1.12.4; 1.12.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.11 14-Mar-2009  dsl branches: 1.11.4; 1.11.6; 1.11.8;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.10 22-Jun-2008  tsutsui branches: 1.10.4; 1.10.10;
Unify splraiseipl(9) implementation among m68k ports as per
suggestion from isaki@ on port-m68k.

For cesfic (compile test only):
- use static splraise4() for splvm() and remove isrcomputeipl() for IPL_VM
because this port supports only one model
- make makeiplcookie(9) return PSL bits via ipl2psl_table[] rather than
ipl indexes
- make ipl2psl_table[] uint16_t rather than int
 1.9 03-Dec-2007  ad branches: 1.9.14; 1.9.18; 1.9.20; 1.9.22;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.8 11-Mar-2007  thorpej branches: 1.8.16; 1.8.18; 1.8.24;
- Shrink ipl_cookie_t from 32-bits to 16-bits (large enough to hold
an SR value or an IPL_* constant).
- Take advange of the smaller ipl_cookie_t to shrink kmutex_t from
16 bytes to 8 bytes by overlapping storage where possible.
- Implement a RAS-based _lock_cas() for mc68010 systems (Sun2). See
sun68k/sun68k/isr.c.

Tested on various m68k platforms, but NOT Sun2. In any case, at least
Sun2 compiles now.
 1.7 05-Mar-2007  tsutsui branches: 1.7.2;
MI softintr(9)'fy. Untested.

This port needs much more cleanups, it seems...
 1.6 16-Feb-2007  ad branches: 1.6.2;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
 1.5 21-Dec-2006  yamt merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.4 11-Dec-2005  christos branches: 1.4.20; 1.4.22;
merge ktrace-lwp.
 1.3 07-Aug-2003  agc branches: 1.3.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.2 14-Jan-2002  kleink branches: 1.2.16;
Move spl*() interfaces from from param.h to intr.h; for compatibility,
still let them available from param.h as well like all other platforms
currently do.
 1.1 14-May-2001  drochner branches: 1.1.2; 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.8.1 14-May-2001  nathanw file intr.h was added on branch nathanw_sa on 2002-02-28 04:08:44 +0000
 1.1.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.16.1 03-Aug-2004  skrll Sync with HEAD
 1.3.16.4 07-Dec-2007  yamt sync with head
 1.3.16.3 03-Sep-2007  yamt sync with head.
 1.3.16.2 26-Feb-2007  yamt sync with head.
 1.3.16.1 30-Dec-2006  yamt sync with head.
 1.4.22.1 22-Sep-2006  yamt implement splraiseipl for cesfic.
 1.4.20.1 12-Jan-2007  ad Sync with head.
 1.6.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.7.2.2 03-Dec-2007  ad Sync with HEAD.
 1.7.2.1 13-Mar-2007  ad Sync with head.
 1.8.24.1 08-Dec-2007  mjf Sync with HEAD.
 1.8.18.1 09-Jan-2008  matt sync with HEAD
 1.8.16.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.9.22.1 27-Jun-2008  simonb Sync with head.
 1.9.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.9.18.1 04-May-2009  yamt sync with head.
 1.9.14.1 29-Jun-2008  mjf Sync with HEAD.
 1.10.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.11.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.11.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.11.4.1 05-Mar-2011  rmind sync with head
 1.12.8.1 18-Feb-2012  mrg merge to -current.
 1.12.4.1 17-Apr-2012  yamt sync with head
 1.13.78.1 09-Aug-2023  martin Pull up following revision(s) (requested by maya in ticket #316):

sys/arch/m68k/include/mutex.h: revision 1.13
sys/arch/arm/include/cpu.h: revision 1.125
sys/arch/sun68k/include/intr.h: revision 1.21
sys/arch/arm/include/mutex.h: revision 1.28
sys/sys/rwlock.h: revision 1.18
sys/arch/powerpc/include/mutex.h: revision 1.7
sys/arch/arm/include/mutex.h: revision 1.29
sys/arch/powerpc/include/mutex.h: revision 1.8
sys/uvm/uvm_param.h: revision 1.42
sys/sys/ksem.h: revision 1.16
sys/arch/x86/include/mutex.h: revision 1.10
sys/sys/proc.h: revision 1.372
sys/sys/ksem.h: revision 1.17
sys/arch/ia64/include/mutex.h: revision 1.8
sys/arch/evbarm/include/intr.h: revision 1.29
sys/sys/lua.h: revision 1.9
sys/arch/next68k/include/intr.h: revision 1.23
sys/arch/ia64/include/mutex.h: revision 1.9
sys/arch/hp300/include/intr.h: revision 1.35
sys/arch/hp300/include/intr.h: revision 1.36
sys/arch/sparc/include/cpu.h: revision 1.111
sys/arch/hppa/include/mutex.h: revision 1.16
sys/arch/vax/include/intr.h: revision 1.31
sys/arch/hppa/include/mutex.h: revision 1.17
sys/arch/news68k/include/intr.h: revision 1.28
sys/arch/hppa/include/mutex.h: revision 1.18
sys/arch/hppa/include/intr.h: revision 1.3
sys/arch/hppa/include/mutex.h: revision 1.19
sys/arch/hppa/include/intr.h: revision 1.4
sys/sys/sched.h: revision 1.92
sys/opencrypto/cryptodev.h: revision 1.51
sys/arch/vax/include/mutex.h: revision 1.20
sys/arch/sparc64/include/mutex.h: revision 1.10
sys/arch/ia64/include/sapicvar.h: revision 1.2
sys/arch/riscv/include/mutex.h: revision 1.5
sys/arch/amiga/dev/grfabs_cc.c: revision 1.39
sys/external/bsd/drm2/include/linux/idr.h: revision 1.11
sys/arch/riscv/include/mutex.h: revision 1.6
sys/ddb/files.ddb: revision 1.16
sys/arch/mac68k/include/intr.h: revision 1.32
share/man/man4/ddb.4: revision 1.203
sys/ddb/db_command.c: revision 1.183
sys/arch/mips/include/mutex.h: revision 1.10
sys/ddb/db_command.c: revision 1.184
sys/arch/x68k/include/intr.h: revision 1.22
sys/arch/sparc/include/psl.h: revision 1.51
sys/arch/or1k/include/mutex.h: revision 1.4
sys/arch/mips/include/mutex.h: revision 1.11
sys/arch/arm/xscale/pxa2x0_intr.h: revision 1.16
sys/arch/sparc64/include/cpu.h: revision 1.134
sys/arch/sparc/include/psl.h: revision 1.52
sys/arch/or1k/include/mutex.h: revision 1.5
sys/arch/mvme68k/include/intr.h: revision 1.22
sys/arch/luna68k/include/intr.h: revision 1.16
external/cddl/osnet/sys/sys/kcondvar.h: revision 1.6
sys/arch/sparc/include/mutex.h: revision 1.12
sys/arch/sparc/include/mutex.h: revision 1.13
sys/arch/usermode/include/mutex.h: revision 1.5
sys/arch/usermode/include/mutex.h: revision 1.6
sys/kern/kern_core.c: revision 1.38
usr.sbin/crash/Makefile: revision 1.49
sys/arch/amiga/include/intr.h: revision 1.23
sys/arch/alpha/include/mutex.h: revision 1.12
sys/arch/alpha/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.16
sys/ddb/ddb.h: revision 1.6
sys/arch/sparc64/include/mutex.h: revision 1.8
sys/arch/sh3/include/mutex.h: revision 1.12
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.17
sys/ddb/db_syncobj.c: revision 1.1
sys/arch/vax/include/mutex.h: revision 1.18
sys/arch/sparc64/include/psl.h: revision 1.63
sys/arch/sparc64/include/mutex.h: revision 1.9
sys/arch/sh3/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/obio.c: revision 1.13
sys/arch/atari/include/intr.h: revision 1.23
sys/ddb/db_syncobj.c: revision 1.2
sys/arch/vax/include/mutex.h: revision 1.19
sys/arch/evbarm/g42xxeb/obio.c: revision 1.14
sys/arch/evbarm/g42xxeb/obio.c: revision 1.15
sys/arch/cesfic/include/intr.h: revision 1.14
sys/ddb/db_syncobj.h: revision 1.1
sys/arch/x86/include/cpu.h: revision 1.134
sys/arch/evbarm/g42xxeb/obio.c: revision 1.16
sys/arch/cesfic/include/intr.h: revision 1.15
sys/arch/arm/xscale/pxa2x0_intr.c: revision 1.26
sys/sys/cpu_data.h: revision 1.54
sys/arch/m68k/include/mutex.h: revision 1.12
sys/arch/ia64/acpi/madt.c: revision 1.6

sys/rwlock.h: Make this more self-contained for bool.

machine/mutex.h: Sprinkle includes so this can be used by crash(8).

ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.

And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.

arm/mutex.h: Need machine/intr.h, machine/lock.h.

For ipl_cookie_t and __cpu_simple_lock_t.
evbarm/intr.h: Define ipl_cookie_t before including ARM_INTR_IMPL.

Otherwise arm/mutex.h doesn't work, due to a cyclic dependency which
should really be fixed.
opencrypto/cryptodev.h: Fix includes.
- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.

hp300/intr.h: Fix missing includes.
linux/idr.h: Need <sys/mutex.h> for kmutex_t.
amiga/intr.h: Don't define spl*() functions if !_KERNEL.

This is used by crash(8) now, and what's important is ipl_cookie_t.
cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8).
cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.

Probably not necessary but let's be a little more cautious about
this.

atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).

arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.

Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.

Move the definition of ipl_cookie_t out of the kernel-only sections,
some _KMEMUSER applications need it.

ddb: Cast pointer to uintptr_t first before db_expr_t.

hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

news68k/intr.h: Fix includes. Put some definitions under _KERNEL.

next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

sys/ksem.h: Hack around fstat(8) abuse of _KERNEL.

sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

x68k/intr.h: Put functions under _KERNEL so crash(8) can use this.

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

Explicitly include <sys/mutex.h> for kmutex_t.

Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.

hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).

mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
Make inclusion of sys/intr.h explicit for spl*.

fix hppa and vax builds.

machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h. avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h. And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.

ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.

re-fix hppa builds.

this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.

Break cycle by using `struct kmutex *' instead of `kmutex_t *'.
sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex. Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT. Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.

ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.

explicitly include no longer implicitly included sys/mutex.h.

arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.
Sidesteps namespace collision with `#define bits ...' in net/zlib.c.

complete the previous - there were two calls to find_first_bit() to fix.

arm/xscale: Missed a spot with previous find_first_bit commit.

evbarm/g42xxeb: Fix off-by-one in previous.

The original find_first_bit(x) was 31 - __builtin_clz((uint32_t)x),
which is equivalent to fls32(x) - 1, not to fls32(x).

Note that fls32 is 1-based and returns 0 for x=0.
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file limits.h was added on branch nathanw_sa on 2001-05-14 18:23:13 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file lock.h was added on branch nathanw_sa on 2001-05-14 18:23:13 +0000
 1.1 30-Nov-2024  christos branches: 1.1.4;
Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 30-Nov-2024  perseant file lwp_private.h was added on branch perseant-exfatfs on 2025-08-02 05:55:32 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file math.h was added on branch nathanw_sa on 2001-05-14 18:23:13 +0000
 1.2 17-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.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file mutex.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file mutex.h was added on branch yamt-lazymbuf on 2007-02-26 09:06:13 +0000
 1.13 14-Jan-2017  christos protect against multiple inclusion.
 1.12 10-Feb-2012  para branches: 1.12.6; 1.12.24; 1.12.28;
proper sizing of kmem_arena on different ports

PR port-i386/45946: Kernel locks up in VMEM system
 1.11 08-Feb-2011  rmind branches: 1.11.4; 1.11.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.10 11-Dec-2009  tsutsui branches: 1.10.4; 1.10.6; 1.10.8;
Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSEG, and SEGOFSET from <machine/param.h>
to <m68k/pmap_motorola.h> where they should belong
- also simplify NBSEG macro for both 020/030 and 040/060 cases
- also move m68k_trunc_seg(), m68k_round_seg(), and m68k_seg_offset()
(that use SEGOFSET) from <m68k/param.h> to <m68k/pmap_motorola.h>
- add comments about each segment size value used on pmap_motorola
implementation
- add TIA_SIZE, TIA_SHIFT, TIB_SIZE, and TIB_SHIFT macro which can be
used for ste/pte index sizes
- use proper vaddr_t cast instead of unsigned for SEGOFSET/PGOFSET macro

Tested on atari, hp300, and news68k.
 1.9 09-Dec-2009  tsutsui Fix wrong NBSEG values for all hp300 pmap derived m68k ports.
They were incorrect since 1997 on amiga and atari, and since 2002
on other ports, but fortunately they don't look so fatal.

Anyway, these values will be moved into <m68k/pmap_motorola.h> soon
since they are quite pmap implementation dependent.
 1.8 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.7 11-Dec-2005  christos branches: 1.7.78; 1.7.86; 1.7.92;
merge ktrace-lwp.
 1.6 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.5 03-Nov-2002  chs branches: 1.5.6;
merge pmap.h for all 4k-page motorola-MMU (or compatible) m68k platforms.
 1.4 26-Feb-2002  simonb Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
 1.3 14-Jan-2002  kleink Move spl*() interfaces from from param.h to intr.h; for compatibility,
still let them available from param.h as well like all other platforms
currently do.
 1.2 16-May-2001  drochner branches: 1.2.2; 1.2.8;
get up-to-date (cleanup, splimp->splvm)
 1.1 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.2.8.3 11-Nov-2002  nathanw Catch up to -current
 1.2.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.8.1 16-May-2001  nathanw file param.h was added on branch nathanw_sa on 2002-02-28 04:08:44 +0000
 1.2.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.7.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.7.78.2 11-Mar-2010  yamt sync with head
 1.7.78.1 04-May-2009  yamt sync with head.
 1.10.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.10.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.4.1 05-Mar-2011  rmind sync with head
 1.11.8.1 18-Feb-2012  mrg merge to -current.
 1.11.4.1 17-Apr-2012  yamt sync with head
 1.12.28.1 20-Mar-2017  pgoyette Sync with HEAD
 1.12.24.1 05-Feb-2017  skrll Sync with HEAD
 1.12.6.1 03-Dec-2017  jdolecek update from HEAD
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file pcb.h was added on branch nathanw_sa on 2001-05-14 18:23:14 +0000
 1.7 03-Nov-2002  chs merge pmap.h for all 4k-page motorola-MMU (or compatible) m68k platforms.
 1.6 22-Sep-2002  chs it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not. doh.
 1.5 22-Sep-2002  chs add pmap_remove_all() hook (empty on most platforms so far).
 1.4 10-Sep-2001  chris branches: 1.4.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.3 15-Jun-2001  drochner branches: 1.3.2; 1.3.4;
vm_map_t -> struct vm_map *
vm_page_t -> struct vm_page *
simple_lock_data_t -> struct simplelock
 1.2 16-May-2001  drochner get up-to-date (cleanup, get rid of vm_offset_t)
 1.1 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.3.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.4.5 11-Nov-2002  nathanw Catch up to -current
 1.4.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.4.4.3 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.4.4.2 18-Nov-2001  scw MD Scheduler Activation bits for Cesfic.
Compile-tested only.
 1.4.4.1 10-Sep-2001  scw file pmap.h was added on branch nathanw_sa on 2001-11-18 18:08:11 +0000
 1.2 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

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

* Removes the PMC code of ARM XSCALE.

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

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

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

* Removes the pmc_evid_t and pmc_ctr_t types.

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

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.1.204.1 10-Jun-2019  christos Sync with HEAD
 1.1.202.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 07-Aug-2002  jdolecek file pmc.h was added on branch kqueue on 2002-09-06 08:33:46 +0000
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 07-Aug-2002  gehenna file pmc.h was added on branch gehenna-devsw on 2002-08-30 00:19:28 +0000
 1.1.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 07-Aug-2002  nathanw file pmc.h was added on branch nathanw_sa on 2002-08-13 02:18:05 +0000
 1.2 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.1 14-May-2001  drochner branches: 1.1.2; 1.1.8; 1.1.16;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.16.1 16-Jul-2002  gehenna catch up with -current.
 1.1.8.3 01-Aug-2002  nathanw Catch up to -current.
 1.1.8.2 18-Nov-2001  scw MD Scheduler Activation bits for Cesfic.
Compile-tested only.
 1.1.8.1 14-May-2001  scw file proc.h was added on branch nathanw_sa on 2001-11-18 18:08:11 +0000
 1.1.2.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file profile.h was added on branch nathanw_sa on 2001-05-14 18:23:14 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file psl.h was added on branch nathanw_sa on 2001-05-14 18:23:14 +0000
 1.2 14-Oct-2002  chs merge pte.h for m68k w/ motorola or compatible MMU
(only 4k-page platforms so far).
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.1 14-May-2001  nathanw file pte.h was added on branch nathanw_sa on 2002-10-18 02:36:14 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file ptrace.h was added on branch nathanw_sa on 2001-05-14 18:23:15 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file reg.h was added on branch nathanw_sa on 2001-05-14 18:23:15 +0000
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file rwlock.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file rwlock.h was added on branch yamt-lazymbuf on 2007-02-26 09:06:13 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file setjmp.h was added on branch nathanw_sa on 2001-05-14 18:23:15 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file signal.h was added on branch nathanw_sa on 2001-05-14 18:23:15 +0000
 1.2 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file stdarg.h was added on branch nathanw_sa on 2001-05-14 18:23:16 +0000
 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:55:47 +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:50:07 +0000
 1.2 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.1 14-May-2001  drochner branches: 1.1.8; 1.1.36; 1.1.214;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.214.1 10-Jun-2019  christos Sync with HEAD
 1.1.36.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file svr4_machdep.h was added on branch nathanw_sa on 2001-05-14 18:23:16 +0000
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file trap.h was added on branch nathanw_sa on 2001-05-14 18:23:16 +0000
 1.8 15-Jan-2024  thorpej G/C __HAVE_LEGACY_INTRCNT from cesfic.
 1.7 01-Apr-2021  simonb Define __HAVE_LEGACY_INTRCNT to indicate this port uses legacy intrcnt
interrupt accounting.
 1.6 20-Jan-2008  joerg branches: 1.6.110; 1.6.112;
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.5 17-Oct-2007  garbled branches: 1.5.2; 1.5.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.4 14-Jul-2007  ad branches: 1.4.10;
Generic soft interrupts are mandatory.
 1.3 05-Mar-2007  tsutsui branches: 1.3.2; 1.3.10;
MI softintr(9)'fy. Untested.

This port needs much more cleanups, it seems...
 1.2 06-Sep-2006  gdamore branches: 1.2.8;
Cesfic converted to timecounters (clockinterrupt only ) and generic-todr
(which is meaningless, since it lacks any kind of RTC.)
 1.1 14-May-2001  drochner branches: 1.1.8; 1.1.40; 1.1.54; 1.1.58;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.58.1 14-Sep-2006  yamt sync with head.
 1.1.54.1 09-Sep-2006  rpaulo sync with head
 1.1.40.2 21-Jan-2008  yamt sync with head
 1.1.40.1 30-Dec-2006  yamt sync with head.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file types.h was added on branch nathanw_sa on 2001-05-14 18:23:16 +0000
 1.2.8.1 12-Mar-2007  rmind Sync with HEAD.
 1.3.10.1 03-Oct-2007  garbled Sync with HEAD
 1.3.2.1 15-Jul-2007  ad Sync with head.
 1.4.10.2 23-Mar-2008  matt sync with HEAD
 1.4.10.1 06-Nov-2007  matt sync with HEAD
 1.5.8.1 23-Jan-2008  bouyer Sync with HEAD.
 1.5.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.6.112.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6.110.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.1 14-May-2001  drochner branches: 1.1.8;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file varargs.h was added on branch nathanw_sa on 2001-05-14 18:23:16 +0000
 1.3 15-Jan-2024  thorpej No need for our own spurious interrupt handler now that m68k_intr.c
handles them for us.
 1.2 15-Jan-2024  thorpej Switch cesfic over to the common interrupt dispatch code.
 1.1 15-Jan-2024  thorpej Switch cesfic over to the common vector table.
 1.20 08-Feb-2025  tsutsui Bump DFLSSIZ from 512KB to 2MB on all hp300 pmap m68k ports.

Some modern applications could require 512KB buffer on stack and
no particular comment on port-m68k@:
https://mail-index.netbsd.org/port-m68k/2025/02/02/msg000893.html
 1.19 01-Feb-2020  tsutsui branches: 1.19.30;
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.18 28-Jun-2019  tsutsui branches: 1.18.2; 1.18.4;
Fix lingering page size comments.

Pointed out by christos@ on port-m68k@:
http://mail-index.netbsd.org/port-m68k/2019/06/06/msg000726.html

XXX: we also need MAX_PAGE_SIZE in somewhere for newer jemalloc?
 1.17 02-Feb-2017  rin branches: 1.17.14;
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.16 02-Feb-2017  rin PR port-mac68k/51923
Remove unused SYSPTSIZE and USRPTSIZE from m68k ports.
Ok jklos
 1.15 08-Feb-2011  rmind branches: 1.15.14; 1.15.32; 1.15.36; 1.15.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.14 14-Jan-2011  rmind branches: 1.14.2; 1.14.4;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.13 06-Nov-2010  uebayasi Remove incomplete, never worked dynamic run-time memory registration
(uvm_page_physload(9)). This functionality will be re-added later.
 1.12 08-Dec-2009  tsutsui branches: 1.12.2; 1.12.4;
Use PGSHIFT from <machine/param.h> for PAGE_SHIFT.
We can assume PGSHIFT is always constant on current
m68k pmap_motorola implementation.
Also fix some leftover HP300 comments on some ports.
 1.11 26-Aug-2009  thorpej Minor tweak to the pv_table management in the Hibler-derived m68k pmaps:
The head of the list is now a pv_header, which contains the first pv_entry
as well as a 16-bit attributes field (replaces the pmap_attributes array
plus the pv_entry::pv_flags field) as a 16-bit count of caller-specified
cache-inhibited mappings.

Tested on hp300 (shared pmap_motorola.c), changes to atari and amiga copies
are purely mechanical.
 1.10 06-Mar-2009  joerg Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
 1.9 11-Dec-2005  christos branches: 1.9.78; 1.9.86; 1.9.92;
merge ktrace-lwp.
 1.8 01-Apr-2005  yamt merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.7 07-Aug-2003  agc branches: 1.7.8; 1.7.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.6 02-Apr-2003  thorpej branches: 1.6.2;
Use PAGE_SIZE rather than NBPG.
 1.5 10-Dec-2002  thorpej 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.4 26-Feb-2002  simonb Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
 1.3 15-Nov-2001  soren MAXSLP is defined to be a machine-independent scheduling parameter,
so move it into sys/param.h.
 1.2 16-May-2001  drochner branches: 1.2.2; 1.2.8;
get up-to-date (cleanup, get rid of vm_offset_t)
 1.1 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.2.8.4 11-Dec-2002  thorpej Sync with HEAD.
 1.2.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.8.1 16-May-2001  nathanw file vmparam.h was added on branch nathanw_sa on 2002-01-08 00:23:58 +0000
 1.2.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.2.4 01-Apr-2005  skrll Sync with HEAD.
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.10.1 24-Feb-2005  yamt change kernel va layout, following mac68k.
 1.7.8.1 29-Apr-2005  kent sync with -current
 1.9.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.9.78.3 11-Mar-2010  yamt sync with head
 1.9.78.2 16-Sep-2009  yamt sync with head
 1.9.78.1 04-May-2009  yamt sync with head.
 1.12.4.1 05-Mar-2011  rmind sync with head
 1.12.2.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.14.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.14.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.15.40.1 21-Apr-2017  bouyer Sync with HEAD
 1.15.36.1 20-Mar-2017  pgoyette Sync with HEAD
 1.15.32.1 05-Feb-2017  skrll Sync with HEAD
 1.15.14.1 03-Dec-2017  jdolecek update from HEAD
 1.17.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.18.4.1 29-Feb-2020  ad Sync with head.
 1.18.2.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.19.30.1 02-Aug-2025  perseant Sync 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:33:45 +0000
 1.4 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.3 07-Nov-2007  ad branches: 1.3.14;
Merge tty changes from the vmlocking branch.
 1.2 05-Mar-2007  tsutsui branches: 1.2.2; 1.2.18; 1.2.20; 1.2.24; 1.2.26;
MI softintr(9)'fy. Untested.

This port needs much more cleanups, it seems...
 1.1 14-May-2001  drochner branches: 1.1.8; 1.1.40; 1.1.78;
Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.78.1 12-Mar-2007  rmind Sync with HEAD.
 1.1.40.2 15-Nov-2007  yamt sync with head.
 1.1.40.1 03-Sep-2007  yamt sync with head.
 1.1.8.2 14-May-2001  drochner Initial import of the known working kernel bits for the NetBSD/cesfic
port. cesfic is a VME board with one or two mc68040 processors. See
the README file for details.
The port is working well with a.out userland, there are some problems
with ELF still, like applications running out of memory where it is not
expected. Some parts, in particular the pmap (which was taken from hp300
four years ago), need updating, but this is easier done within the NetBSD
CVS tree.
 1.1.8.1 14-May-2001  drochner file z8530var.h was added on branch nathanw_sa on 2001-05-14 18:23:17 +0000
 1.2.26.1 19-Nov-2007  mjf Sync with HEAD.
 1.2.24.1 13-Nov-2007  bouyer Sync with HEAD
 1.2.20.1 08-Nov-2007  matt sync with -HEAD
 1.2.18.1 11-Nov-2007  joerg Sync with HEAD.
 1.2.2.2 03-Dec-2007  ad Sync with HEAD.
 1.2.2.1 03-Dec-2007  ad Sync with HEAD.
 1.3.14.1 03-Apr-2008  mjf Sync with HEAD.

RSS XML Feed