Home | History | Annotate | only in /src/sys/arch/usermode/include
History log of /src/sys/arch/usermode/include
RevisionDateAuthorComments
 1.1 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.6 07-May-2019  kamil Switch all users (except ia64) of custom machine/ansi.h to common_ansi.h

Deduplicate the code among ports and poll definitions of types
directly from a compiler.

This fixes miscompilation of certain programs that instruct compilers
to generate code for different types. This bug has been detected with
-fshort-wchar in EFI firmware.

Proposed and discussed on a mailing list (twice).

Itanium uses custom !ELF fallback switch, temporarily leave it as it is.
 1.5 17-Jun-2015  martin branches: 1.5.18;
Make clock_t unsigned int everywhere.
Ok: matt@, mrg@
 1.4 10-Nov-2013  jmcneill branches: 1.4.4; 1.4.6;
support building on arm
 1.3 22-Aug-2011  jmcneill branches: 1.3.2; 1.3.12; 1.3.16;
build fixes for netbsd-5 and i386
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file ansi.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file ansi.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:45 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file ansi.h was added on branch matt-armv6 on 2008-01-09 01:49:21 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file ansi.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:45 +0000
 1.3.16.1 18-May-2014  rmind sync with head
 1.3.12.2 03-Dec-2017  jdolecek update from HEAD
 1.3.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.6.1 22-Sep-2015  skrll Sync with HEAD
 1.4.4.1 16-Jul-2015  riz Pull up following revision(s) (requested by martin in ticket #846):
sys/arch/mips/include/ansi.h: revision 1.29
sys/arch/sh3/include/ansi.h: revision 1.16
sys/arch/sparc64/include/ansi.h: revision 1.18
sys/arch/m68k/include/ansi.h: revision 1.24
sys/arch/powerpc/include/ansi.h: revision 1.30
sys/arch/hppa/include/ansi.h: revision 1.14
sys/arch/i386/include/ansi.h: revision 1.27
sys/arch/alpha/include/ansi.h: revision 1.25
sys/arch/usermode/include/ansi.h: revision 1.5
sys/arch/sparc/include/ansi.h: revision 1.24
Make _BSD_CLOCK_T_ unsigned int so it's the same for IPL32 and LP64
environments. We don't really have a powerpc64 native userland
and the mips64 native userland is IPL32 so this shouldn't affect anything.
Make clock_t unsigned
Make clock_t unsigned int everywhere.
Ok: matt@, mrg@
 1.5.18.1 10-Jun-2019  christos Sync with HEAD
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file aout_machdep.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file aout_machdep.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:46 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file aout_machdep.h was added on branch matt-armv6 on 2008-01-09 01:49:21 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file aout_machdep.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:45 +0000
 1.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file asm.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file asm.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:46 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file asm.h was added on branch matt-armv6 on 2008-01-09 01:49:21 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file asm.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:46 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD
 1.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file bswap.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file bswap.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:46 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file bswap.h was added on branch matt-armv6 on 2008-01-09 01:49:21 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file bswap.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:46 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD
 1.5 23-Sep-2019  skrll Provide PRIxBUSADDR, PRIxBUSSIZE, PRIuBUSSIZE, and PRIxBSH for all arches
to follow arm and (generic) mips.

Reviewed by christos.
 1.4 25-Aug-2011  jmcneill branches: 1.4.54;
add bus_addr_t typedef
 1.3 18-Aug-2011  reinoud Fix compilation after bus space changes. They are weak linked to the defaults.
 1.2 10-Aug-2011  jmcneill fix build
 1.1 18-Jan-2011  haad branches: 1.1.4; 1.1.8;
bus.h is required for build so add some empty file for now.
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 18-Jan-2011  jruoho file bus.h was added on branch jruoho-x86intr on 2011-06-06 09:06:58 +0000
 1.1.4.2 05-Mar-2011  rmind sync with head
 1.1.4.1 18-Jan-2011  rmind file bus.h was added on branch rmind-uvmplock on 2011-03-05 20:52:14 +0000
 1.4.54.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file byte_swap.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file byte_swap.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:46 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file byte_swap.h was added on branch matt-armv6 on 2008-01-09 01:49:21 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file byte_swap.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:47 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD
 1.7 16-May-2018  reinoud Regen usermode headers
 1.6 10-Nov-2013  jmcneill branches: 1.6.28;
support building on arm
 1.5 05-Feb-2012  reinoud branches: 1.5.6; 1.5.10;
regen
 1.4 05-Feb-2012  reinoud regen
 1.3 02-Feb-2012  reinoud Regen
 1.2 21-Oct-2009  snj branches: 1.2.12; 1.2.16;
Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file cdefs.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file cdefs.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:47 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file cdefs.h was added on branch matt-armv6 on 2008-01-09 01:49:22 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file cdefs.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:47 +0000
 1.2.16.1 18-Feb-2012  mrg merge to -current.
 1.2.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.12.1 17-Apr-2012  yamt sync with head
 1.5.10.1 18-May-2014  rmind sync with head
 1.5.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.28.1 21-May-2018  pgoyette Sync with HEAD
 1.13 01-Dec-2019  ad Fix false sharing problems with cpu_info. Identified with tprof(8).
This was a very nice win in my tests on a 48 CPU box.

- Reorganise cpu_data slightly according to usage.
- Put cpu_onproc into struct cpu_info alongside ci_curlwp (now is ci_onproc).
- On x86, put some items in their own cache lines according to usage, like
the IPI bitmask and ci_want_resched.
 1.12 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.11 01-Aug-2018  reinoud Add preliminary KGDB support for NetBSD/usermode, currently only under amd64
 1.10 08-Feb-2012  reinoud branches: 1.10.46; 1.10.48;
Fix /dev/kmem access and make vmstat(1) `work'. Not sure all the results are
indeed valid or correct but at least it shows them without coredumping or
coredumping the kernel.
 1.9 19-Jan-2012  reinoud My fault, forgot that cpu_need_resched() is indeed already declared as a function
 1.8 19-Jan-2012  reinoud Add macro cpu_need_resched
 1.7 14-Jan-2012  reinoud Define astpending flag and the aston() setter
 1.6 13-Aug-2011  jmcneill branches: 1.6.2; 1.6.6;
- initialize cpu_info_primary early, before cpu0 attaches
- track idepth in cpu_info struct and use it in cpu_intr_p
- for debug and diagnostic kernels, abort when rebooting
- fill in __cpu_simple_lock_* stubs
- splraise(IPL_HIGH) before calling kernmain
- pmap_extract: only return phys addr if pap is not NULL
 1.5 12-Aug-2011  jmcneill Clean up extern mess by adding an API for kernel components to call libc
functions. thunk.c is built with special cflags that makes it compile
against standard system headers instead of kernel ones.
 1.4 11-Aug-2011  jmcneill initialize lwp0 l_addr so we can switch back to it
 1.3 21-Oct-2009  rmind Remove uarea swap-out functionality:

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

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

Discussed on <tech-kern>, reviewed by <ad>.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file cpu.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file cpu.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:47 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file cpu.h was added on branch matt-armv6 on 2008-01-09 01:49:22 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file cpu.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:48 +0000
 1.6.6.1 18-Feb-2012  mrg merge to -current.
 1.6.2.1 17-Apr-2012  yamt sync with head
 1.10.48.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.10.48.1 10-Jun-2019  christos Sync with HEAD
 1.10.46.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1 01-Aug-2018  reinoud branches: 1.1.2; 1.1.6;
Forgot the two header files
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 01-Aug-2018  christos file cpufunc.h was added on branch phil-wifi on 2019-06-10 22:06:50 +0000
 1.1.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.1 01-Aug-2018  pgoyette file cpufunc.h was added on branch pgoyette-compat on 2018-09-06 06:55:43 +0000
 1.4 05-Aug-2018  reinoud Add KGDB definitions for i386
 1.3 01-Aug-2018  reinoud Add preliminary KGDB support for NetBSD/usermode, currently only under amd64
 1.2 21-Oct-2009  snj branches: 1.2.62; 1.2.64;
Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file db_machdep.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file db_machdep.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:47 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file db_machdep.h was added on branch matt-armv6 on 2008-01-09 01:49:22 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file db_machdep.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:48 +0000
 1.2.64.1 10-Jun-2019  christos Sync with HEAD
 1.2.62.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.14 16-May-2018  reinoud Regen usermode headers
 1.13 10-Nov-2013  jmcneill branches: 1.13.28;
support building on arm
 1.12 05-Feb-2012  reinoud branches: 1.12.6; 1.12.10;
regen
 1.11 05-Feb-2012  reinoud regen
 1.10 02-Feb-2012  reinoud Regen
 1.9 14-Jan-2012  reinoud Regen
 1.8 14-Jan-2012  reinoud Update automatically generated headers
 1.7 08-Jan-2012  jmcneill regen
 1.6 08-Sep-2011  jmcneill branches: 1.6.2; 1.6.6;
regen
 1.5 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.4 31-Aug-2011  jmcneill If the host doesn't define LABELUSESMBR, set it to 1
 1.3 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.2 29-Dec-2007  reinoud branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.18;
Fix enough to get i386 more-or-less compiling. The i386 needs u_long to be
an unsigned long too or uvm will complain.
 1.1 29-Dec-2007  jmcneill Import work-in-progress NetBSD/usermode port.
 1.2.18.1 11-Mar-2010  yamt sync with head
 1.2.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.2.8.1 29-Dec-2007  mjf file disklabel.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.2.6.2 21-Jan-2008  yamt sync with head
 1.2.6.1 29-Dec-2007  yamt file disklabel.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:47 +0000
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 29-Dec-2007  matt file disklabel.h was added on branch matt-armv6 on 2008-01-09 01:49:22 +0000
 1.2.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.2.2.1 29-Dec-2007  bouyer file disklabel.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:49 +0000
 1.6.6.1 18-Feb-2012  mrg merge to -current.
 1.6.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.2.1 17-Apr-2012  yamt sync with head
 1.12.10.1 18-May-2014  rmind sync with head
 1.12.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.28.1 21-May-2018  pgoyette Sync with HEAD
 1.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file elf_machdep.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file elf_machdep.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:48 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file elf_machdep.h was added on branch matt-armv6 on 2008-01-09 01:49:22 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file elf_machdep.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:49 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD
 1.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file endian.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file endian.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:48 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file endian.h was added on branch matt-armv6 on 2008-01-09 01:49:23 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file endian.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:50 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD
 1.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file endian_machdep.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file endian_machdep.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:48 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file endian_machdep.h was added on branch matt-armv6 on 2008-01-09 01:49:23 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file endian_machdep.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:50 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD
 1.1 16-May-2018  reinoud branches: 1.1.2;
Regen usermode headers
 1.1.2.2 21-May-2018  pgoyette Sync with HEAD
 1.1.2.1 16-May-2018  pgoyette file frame_regs.h was added on branch pgoyette-compat on 2018-05-21 04:36:02 +0000
 1.11 01-Aug-2018  reinoud Add preliminary KGDB support for NetBSD/usermode, currently only under amd64
 1.10 16-May-2018  reinoud branches: 1.10.2;
Add new mcontext and depends to the usermode generated headerfiles
 1.9 10-Nov-2013  jmcneill branches: 1.9.28;
support building on arm
 1.8 05-Feb-2012  reinoud branches: 1.8.6; 1.8.10;
With the recent kmem changes, remove the `unlimited' maximum setting of
NKMEMPAGES from amd64 since it gets us into trouble.
 1.7 04-Feb-2012  reinoud Bump UPAGES effectively bumping per-process (system) stack i.e. the stack on
which traps are taken. When it was 8 it could run out of space on big NFS
stack traces in combination with timer and memory paging.
 1.6 02-Feb-2012  reinoud Add cdefs.h to usermode's genheaders.sh
 1.5 14-Jan-2012  reinoud Bump UPAGES with one more to allow for AST processing. Somehow the space was a
bit tight OR i am checking too regorously on stack space needed.
 1.4 14-Jan-2012  reinoud Update automatically generated headers
 1.3 08-Jan-2012  jmcneill disklabel.h: handle __HAVE_OLD_DISKLABEL. while here, I noticed someone changed param.h without updating genheaders.h, so catch up.
 1.2 08-Sep-2011  jmcneill branches: 1.2.2; 1.2.6;
make sure USPACE is large enough to hold our struct pcb
 1.1 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2.6.1 18-Feb-2012  mrg merge to -current.
 1.2.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.2.1 17-Apr-2012  yamt sync with head
 1.8.10.1 18-May-2014  rmind sync with head
 1.8.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.28.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.9.28.1 21-May-2018  pgoyette Sync with HEAD
 1.10.2.1 10-Jun-2019  christos Sync with HEAD
 1.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file int_const.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file int_const.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:48 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file int_const.h was added on branch matt-armv6 on 2008-01-09 01:49:23 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file int_const.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:50 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD
 1.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file int_fmtio.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file int_fmtio.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:49 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file int_fmtio.h was added on branch matt-armv6 on 2008-01-09 01:49:23 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file int_fmtio.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:51 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD
 1.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file int_limits.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file int_limits.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:49 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file int_limits.h was added on branch matt-armv6 on 2008-01-09 01:49:24 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file int_limits.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:51 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD
 1.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file int_mwgwtypes.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file int_mwgwtypes.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:49 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file int_mwgwtypes.h was added on branch matt-armv6 on 2008-01-09 01:49:24 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file int_mwgwtypes.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:52 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD
 1.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file int_types.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file int_types.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:49 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file int_types.h was added on branch matt-armv6 on 2008-01-09 01:49:24 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file int_types.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:52 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD
 1.9 03-Mar-2012  reinoud Implement signal forwarding to userland for usermode kernels. Especially
SIGFPE is important since the urkel shouldn't stop when a userland program
devides by zero!
 1.8 02-Feb-2012  reinoud branches: 1.8.2;
spl_intr() is not defined anymore so remove from the header file
 1.7 21-Jan-2012  reinoud Complete rewrite of the signal and spl framework for NetBSD/usermode

Signals are now moved from the sigaltstack ASAP and stacked on a replacement
stack for each processes.

Preemption now works though could be enhanced a bit more
 1.6 26-Dec-2011  jmcneill make sure the sigio signal handler runs on the alternate signal stack,
fixes random SIGILLs seen recently
 1.5 26-Dec-2011  jmcneill add sigio_intr_establish so more than one driver can register a SIGIO handler
 1.4 12-Sep-2011  reinoud branches: 1.4.2; 1.4.6;
Implement spl level based priority interrupt controller in software
 1.3 04-Sep-2011  jmcneill implement splraise/spllower
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file intr.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file intr.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:50 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file intr.h was added on branch matt-armv6 on 2008-01-09 01:49:24 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file intr.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:53 +0000
 1.4.6.4 06-Mar-2012  mrg sync to -current
 1.4.6.3 06-Mar-2012  mrg sync to -current
 1.4.6.2 04-Mar-2012  mrg sync to latest -current.
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.8.2.1 07-Mar-2012  riz Pull up following revision(s) (requested by reinoud in ticket #89):
sys/arch/usermode/usermode/thunk.c: revision 1.81
sys/arch/usermode/target/i386/cpu_i386.c: revision 1.4
sys/arch/usermode/include/thunk.h: revision 1.61
sys/arch/usermode/include/intr.h: revision 1.9
sys/arch/usermode/dev/cpu.c: revision 1.70
sys/arch/usermode/dev/ttycons.c: revision 1.19
sys/arch/usermode/usermode/trap.c: revision 1.64
Implement signal forwarding to userland for usermode kernels. Especially
SIGFPE is important since the urkel shouldn't stop when a userland program
devides by zero!
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file intrdefs.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file intrdefs.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:50 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file intrdefs.h was added on branch matt-armv6 on 2008-01-09 01:49:24 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file intrdefs.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:53 +0000
 1.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file limits.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file limits.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:50 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file limits.h was added on branch matt-armv6 on 2008-01-09 01:49:25 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file limits.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:53 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD
 1.5 23-Oct-2017  msaitoh Fix compile error. Use const correctly.
 1.4 17-Sep-2017  christos more const.
 1.3 13-Aug-2011  jmcneill branches: 1.3.12;
- initialize cpu_info_primary early, before cpu0 attaches
- track idepth in cpu_info struct and use it in cpu_intr_p
- for debug and diagnostic kernels, abort when rebooting
- fill in __cpu_simple_lock_* stubs
- splraise(IPL_HIGH) before calling kernmain
- pmap_extract: only return phys addr if pap is not NULL
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file lock.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file lock.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:51 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file lock.h was added on branch matt-armv6 on 2008-01-09 01:49:25 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file lock.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:54 +0000
 1.3.12.1 03-Dec-2017  jdolecek update from HEAD
 1.1 30-Nov-2024  christos branches: 1.1.4;
Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 30-Nov-2024  perseant file lwp_private.h was added on branch perseant-exfatfs on 2025-08-02 05:56:12 +0000
 1.8 14-Jan-2012  reinoud Add md_get_sp() for MI stack frame manipulation. Note that NetBSD/usermode
only works on decending stacks for now!
 1.7 03-Jan-2012  reinoud Fix logic that checks if its the kernel or a userland process that causes the
trap. Signal sending still needs to be addressed.
 1.6 14-Dec-2011  reinoud Remove the need for a siginfo structure in illegal instruction handling.
 1.5 14-Dec-2011  jmcneill need to sigaltstack for each lwp
 1.4 27-Nov-2011  reinoud branches: 1.4.2;
Big patch that changes the signal stack usage of urkel significantly.

Formerly, all signals came on the signal stack and the two important ones were
then forwared to either the system call or the pagefault handler. This worked
fine but the signal stack remains that, a stack. When we go multi-process this
stack gets corrupted and out-of-order with all kind of nastyness since a
userland process switch can occure when a system call is called or when a
process gets a page fault.

The new scheme only uses the signal stack as a jumpboard. It swaps states and
then returns from the signal, clearing the stack but instead of returning to
the code it now jumpt to the handler and that handler then returns to the code
when its finished.
 1.3 09-Sep-2011  reinoud branches: 1.3.2;
machdep.c: Cleanup the machine dependent code and set the carry flag on error
out. While here also clean up register printing.

syscall.c: Add debug syscall printing code to track basic syscalls being
taken.
 1.2 08-Sep-2011  reinoud Implement a working(!) syscall! well, it can call a number of syscalls without
dying ;)
 1.1 08-Sep-2011  reinoud Add a machdep protoype header file to coder all prototypes in machdep.c
 1.3.2.1 17-Apr-2012  yamt sync with head
 1.4.2.1 18-Feb-2012  mrg merge to -current.
 1.8 05-Jun-2018  reinoud Add ATAPI passtrough support giving the NetBSD/usermode kernel full control of
an ATAPI device. All ATAPI/SCSI commands are passed trough.

Note that ATAPI/SCSI calls are made in the foreground still. Lengthy calls
will still hug the CPU until completion. Making it asynchronous is in the
pipeline
 1.7 29-Dec-2011  jmcneill branches: 1.7.46;
Replace the SDL based genfb driver with a wsdisplay and wskbd driver that
implements the VNC (RFB) protocol.

To enable the VNC server, add 'vnc=640x480,5900' to the kernel command line
(where 640x480 is the desired fb resolution and 5900 is the TCP port).

Screenshot of it here: http://www.netbsd.org/~jmcneill/usermode.tiff
 1.6 26-Dec-2011  jmcneill add vaudio(4) audio device driver
 1.5 26-Dec-2011  jmcneill first cut at networking support for usermode, doesn't fully work yet but
enough to get an address with dhcp and answer arps
 1.4 25-Aug-2011  jmcneill branches: 1.4.2; 1.4.6;
- build thunk code with warnings
- add option SDL which pulls in thunk_sdl code and links the kernel to libSDL
- add an experimental framebuffer driver based on thunk_sdl, enable with:
options SDL
genfb* at mainbus?
wsdisplay* at genfb?
options WS_KERNEL_FG=WSCOL_GREEN
options WSEMUL_VT100
- reserve a major # for wsdisplay
- add thunk_getenv()
 1.3 12-Aug-2011  jmcneill add a simple disk driver, pass the path to the disk image on the kernel command line:

soundwave$ ./netbsd /tmp/test.fs
NetBSD/usermode startup
[...]
ld0 at mainbus0: /tmp/test.fs (33554432)
ld0: 32768 KB, 8322 cyl, 64 head, 63 sec, 1 bytes/sect x 33554432 sectors
boot device: ld0
root on ld0a dumps on ld0b
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file mainbus.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file mainbus.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:51 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file mainbus.h was added on branch matt-armv6 on 2008-01-09 01:49:25 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file mainbus.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:54 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.7.46.1 25-Jun-2018  pgoyette Sync with HEAD
 1.4 16-May-2018  reinoud Regen usermode headers
 1.3 13-Aug-2011  jmcneill branches: 1.3.52;
make sure mcontext is large enough to store the host mcontext; fixes
strange crashes seen in pool_init
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file mcontext.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file mcontext.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:51 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file mcontext.h was added on branch matt-armv6 on 2008-01-09 01:49:25 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file mcontext.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:55 +0000
 1.3.52.1 21-May-2018  pgoyette Sync with HEAD
 1.6 12-Jul-2023  riastradh 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.
 1.5 09-Jul-2023  riastradh machine/mutex.h: Sprinkle includes so this can be used by crash(8).

XXX pullup-10
 1.4 29-Nov-2019  riastradh branches: 1.4.26;
Nix now-unused definitions of MUTEX_GIVE/MUTEX_RECEIVE.
 1.3 28-Apr-2008  martin branches: 1.3.88;
Remove clause 3 and 4 from TNF licenses
 1.2 29-Dec-2007  jmcneill branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.14; 1.2.16; 1.2.18;
#ifdef _X86_foo_H -> _ARCH_USERMODE_INCLUDE_foo_H, to match the rest of
the sources.
 1.1 29-Dec-2007  jmcneill Import work-in-progress NetBSD/usermode port.
 1.2.18.1 16-May-2008  yamt sync with head.
 1.2.16.1 18-May-2008  yamt sync with head.
 1.2.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.2.8.1 29-Dec-2007  mjf file mutex.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.2.6.2 21-Jan-2008  yamt sync with head
 1.2.6.1 29-Dec-2007  yamt file mutex.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:51 +0000
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 29-Dec-2007  matt file mutex.h was added on branch matt-armv6 on 2008-01-09 01:49:26 +0000
 1.2.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.2.2.1 29-Dec-2007  bouyer file mutex.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:55 +0000
 1.3.88.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.4.26.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.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file netbsd32_machdep.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file netbsd32_machdep.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:52 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file netbsd32_machdep.h was added on branch matt-armv6 on 2008-01-09 01:49:26 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file netbsd32_machdep.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:55 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD
 1.13 16-May-2018  reinoud Regen usermode headers
 1.12 10-Nov-2013  jmcneill branches: 1.12.28;
support building on arm
 1.11 05-Feb-2012  reinoud branches: 1.11.6; 1.11.10;
regen
 1.10 05-Feb-2012  reinoud regen
 1.9 02-Feb-2012  reinoud Regen
 1.8 14-Jan-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Update automatically generated headers
 1.6 08-Jan-2012  jmcneill regen
 1.5 27-Nov-2011  reinoud branches: 1.5.2;
Big patch that changes the signal stack usage of urkel significantly.

Formerly, all signals came on the signal stack and the two important ones were
then forwared to either the system call or the pagefault handler. This worked
fine but the signal stack remains that, a stack. When we go multi-process this
stack gets corrupted and out-of-order with all kind of nastyness since a
userland process switch can occure when a system call is called or when a
process gets a page fault.

The new scheme only uses the signal stack as a jumpboard. It swaps states and
then returns from the signal, clearing the stack but instead of returning to
the code it now jumpt to the handler and that handler then returns to the code
when its finished.
 1.4 08-Sep-2011  jmcneill branches: 1.4.2;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file param.h was added on branch mjf-devfs on 2008-02-18 21:05:12 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file param.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:52 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file param.h was added on branch matt-armv6 on 2008-01-09 01:49:26 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file param.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:56 +0000
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.5.2.1 18-Feb-2012  mrg merge to -current.
 1.11.10.1 18-May-2014  rmind sync with head
 1.11.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.28.1 21-May-2018  pgoyette Sync with HEAD
 1.17 14-Jan-2012  reinoud Revamp the NetBSD/usermode pagefault and illegal instruction handing. It now
can handle recursive entry and is a lot more memory tight compared to the old
implementation. Performance wise:

* slightly less number of syscalls/sec possible though could be optimized
* a lot faster context creation / destruction making overall operation faster.
 1.16 06-Jan-2012  reinoud Cleanup stack allocation and freeing. This means the memory leak on lwp
destruction ought to be solved.
 1.15 03-Jan-2012  reinoud Fix logic that checks if its the kernel or a userland process that causes the
trap. Signal sending still needs to be addressed.
 1.14 12-Dec-2011  reinoud Fix typo
 1.13 27-Nov-2011  reinoud branches: 1.13.2;
Big patch that changes the signal stack usage of urkel significantly.

Formerly, all signals came on the signal stack and the two important ones were
then forwared to either the system call or the pagefault handler. This worked
fine but the signal stack remains that, a stack. When we go multi-process this
stack gets corrupted and out-of-order with all kind of nastyness since a
userland process switch can occure when a system call is called or when a
process gets a page fault.

The new scheme only uses the signal stack as a jumpboard. It swaps states and
then returns from the signal, clearing the stack but instead of returning to
the code it now jumpt to the handler and that handler then returns to the code
when its finished.
 1.12 08-Sep-2011  reinoud branches: 1.12.2;
Remove not used variable from the pcb.h
 1.11 08-Sep-2011  reinoud Create a ucontext for the system call to work in; its cloned from the new
pcb's call `userland' ucontext.
 1.10 04-Sep-2011  reinoud pcb->errno to pcb->pcb_errno
 1.9 04-Sep-2011  reinoud Try to preserve errno over traps and on context switches
 1.8 02-Sep-2011  reinoud Revert
 1.7 02-Sep-2011  reinoud Update trapframe and add system call switchframe
 1.6 29-Aug-2011  reinoud Update pcb and trapframe
 1.5 28-Aug-2011  reinoud Update trapframe and pcb
 1.4 25-Aug-2011  reinoud Add trapframe and extent pcb for NetBSD/usermode; both mere dummies since
there are no traps delivered nor a process has ever been started...
 1.3 12-Aug-2011  jmcneill Clean up extern mess by adding an API for kernel components to call libc
functions. thunk.c is built with special cflags that makes it compile
against standard system headers instead of kernel ones.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file pcb.h was added on branch mjf-devfs on 2008-02-18 21:05:13 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file pcb.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:52 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file pcb.h was added on branch matt-armv6 on 2008-01-09 01:49:26 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file pcb.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:56 +0000
 1.12.2.1 17-Apr-2012  yamt sync with head
 1.13.2.1 18-Feb-2012  mrg merge to -current.
 1.6 01-Aug-2018  reinoud Add preliminary KGDB support for NetBSD/usermode, currently only under amd64
 1.5 24-Aug-2011  reinoud branches: 1.5.52; 1.5.54;
Remove two commented out and unused defines
 1.4 22-Aug-2011  reinoud Start NetBSD/usermode's pmap. Its using a temp file as a physical memory
backup and that should be documented in the code. A physical address is thus a
file offset(!) and a virtual address is a `normal' accesible address.

Still to do: various misc functions and pmap_extract() in special.

Credits also go to Ben Harris for his work on the Acorn26 pmap that followed
the Daemon Book recommendation for systems without real page tables on wich
this implementation is modelled after.
 1.3 18-Jan-2011  haad Bring pmap.h to new world order.
 1.2 21-Oct-2009  snj branches: 1.2.4; 1.2.6;
Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file pmap.h was added on branch mjf-devfs on 2008-02-18 21:05:13 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file pmap.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:53 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file pmap.h was added on branch matt-armv6 on 2008-01-09 01:49:27 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file pmap.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:57 +0000
 1.2.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.4.1 05-Mar-2011  rmind sync with head
 1.5.54.1 10-Jun-2019  christos Sync with HEAD
 1.5.52.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file proc.h was added on branch mjf-devfs on 2008-02-18 21:05:13 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file proc.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:53 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file proc.h was added on branch matt-armv6 on 2008-01-09 01:49:27 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file proc.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:58 +0000
 1.2 10-Nov-2013  jmcneill support building on arm
 1.1 13-Sep-2011  reinoud branches: 1.1.2; 1.1.12; 1.1.16;
Add missing processor status flag file i forgot to add
 1.1.16.1 18-May-2014  rmind sync with head
 1.1.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14 16-May-2018  reinoud Regen usermode headers
 1.13 10-Nov-2013  jmcneill branches: 1.13.28;
support building on arm
 1.12 05-Feb-2012  reinoud branches: 1.12.6; 1.12.10;
regen
 1.11 05-Feb-2012  reinoud regen
 1.10 02-Feb-2012  reinoud Regen
 1.9 14-Jan-2012  reinoud Regen
 1.8 14-Jan-2012  reinoud Update automatically generated headers
 1.7 08-Jan-2012  jmcneill regen
 1.6 08-Sep-2011  jmcneill branches: 1.6.2; 1.6.6;
regen
 1.5 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.4 24-Aug-2011  jmcneill add procfs support
 1.3 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.2 29-Dec-2007  reinoud branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.18;
To make NetBSD/userland to boot on i386 choose some defaults in vmparam.h
since for i386 they are defined in page size constants wich NetBSD/userland
doesn't know yet. Also undefine ptrace's __HAVE_PTRACE_MACHDEP since i386
has that but NetBSD/userland not.
 1.1 29-Dec-2007  jmcneill Import work-in-progress NetBSD/usermode port.
 1.2.18.1 11-Mar-2010  yamt sync with head
 1.2.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.2.8.1 29-Dec-2007  mjf file ptrace.h was added on branch mjf-devfs on 2008-02-18 21:05:13 +0000
 1.2.6.2 21-Jan-2008  yamt sync with head
 1.2.6.1 29-Dec-2007  yamt file ptrace.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:53 +0000
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 29-Dec-2007  matt file ptrace.h was added on branch matt-armv6 on 2008-01-09 01:49:27 +0000
 1.2.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.2.2.1 29-Dec-2007  bouyer file ptrace.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:58 +0000
 1.6.6.1 18-Feb-2012  mrg merge to -current.
 1.6.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.2.1 17-Apr-2012  yamt sync with head
 1.12.10.1 18-May-2014  rmind sync with head
 1.12.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.28.1 21-May-2018  pgoyette Sync with HEAD
 1.4 18-May-2018  reinoud Implement own process register capture from userland.

NetBSD/usermode now creates readable and sensible coredumps
 1.3 13-Jan-2018  reinoud branches: 1.3.2;
Add dbreg structure prototype needed for x86_64
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file reg.h was added on branch mjf-devfs on 2008-02-18 21:05:13 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file reg.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:53 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file reg.h was added on branch matt-armv6 on 2008-01-09 01:49:27 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file reg.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:59 +0000
 1.3.2.1 21-May-2018  pgoyette Sync with HEAD
 1.4 29-Nov-2019  riastradh Largely eliminate the MD rwlock.h header file.

This was full of definitions that have been obsolete for over a
decade. The file still remains for __HAVE_RW_STUBS but that's all.
Used only internally in kern_rwlock.c now, not by <sys/rwlock.h>.
 1.3 28-Apr-2008  martin branches: 1.3.88;
Remove clause 3 and 4 from TNF licenses
 1.2 29-Dec-2007  jmcneill branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.14; 1.2.16; 1.2.18;
#ifdef _X86_foo_H -> _ARCH_USERMODE_INCLUDE_foo_H, to match the rest of
the sources.
 1.1 29-Dec-2007  jmcneill Import work-in-progress NetBSD/usermode port.
 1.2.18.1 16-May-2008  yamt sync with head.
 1.2.16.1 18-May-2008  yamt sync with head.
 1.2.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.2.8.1 29-Dec-2007  mjf file rwlock.h was added on branch mjf-devfs on 2008-02-18 21:05:13 +0000
 1.2.6.2 21-Jan-2008  yamt sync with head
 1.2.6.1 29-Dec-2007  yamt file rwlock.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:54 +0000
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 29-Dec-2007  matt file rwlock.h was added on branch matt-armv6 on 2008-01-09 01:49:27 +0000
 1.2.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.2.2.1 29-Dec-2007  bouyer file rwlock.h was added on branch bouyer-xeni386 on 2008-01-02 21:50:59 +0000
 1.3.88.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file signal.h was added on branch mjf-devfs on 2008-02-18 21:05:13 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file signal.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:54 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file signal.h was added on branch matt-armv6 on 2008-01-09 01:49:28 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file signal.h was added on branch bouyer-xeni386 on 2008-01-02 21:51:00 +0000
 1.3 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.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file stdarg.h was added on branch mjf-devfs on 2008-02-18 21:05:13 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file stdarg.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:54 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file stdarg.h was added on branch matt-armv6 on 2008-01-09 01:49:28 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file stdarg.h was added on branch bouyer-xeni386 on 2008-01-02 21:51:01 +0000
 1.67 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.66 01-Aug-2018  reinoud branches: 1.66.2;
Add headers for support functions for kgdb
 1.65 04-Jun-2018  reinoud branches: 1.65.2;
Enhance the NetBSD/usermode thunk interface
 1.64 01-Jun-2018  reinoud Pretend we already included the <types.h>
 1.63 18-May-2018  reinoud Include OUR types.h and not the machine's. A small step to allow for
crosscompilation.
 1.62 06-Feb-2015  prlw1 branches: 1.62.16;
Take procfs_machdep.c rev 1.4 one step further and adjust signature of
thunk_getcpuinfo().
 1.61 03-Mar-2012  reinoud branches: 1.61.2; 1.61.16;
Implement signal forwarding to userland for usermode kernels. Especially
SIGFPE is important since the urkel shouldn't stop when a userland program
devides by zero!
 1.60 21-Jan-2012  reinoud branches: 1.60.2;
Add the complement to sigemptyset(), sigfillset()!
 1.59 11-Jan-2012  reinoud Add thunk_close()
 1.58 10-Jan-2012  reinoud Add thunk_madvise() for memory access hints to the host kernel.
 1.57 06-Jan-2012  jmcneill support disk images >= 2GB
 1.56 05-Jan-2012  jmcneill Get rid of MAP_NOSYSCALLS usage; now this relies on a separate kmod that
you can get here: http://www.netbsd.org/~jmcneill/syscallemu.tar
 1.55 03-Jan-2012  reinoud Rename the debug printf's to use a thunk_ prefix to avoid confusion.
 1.54 31-Dec-2011  christos Adjust prototypes.
 1.53 30-Dec-2011  jmcneill report rfb pointer events
 1.52 30-Dec-2011  jmcneill add a barrier before copyrows(), and add an RRE based fillrect functino,
use it for eraserows and erasecols
 1.51 30-Dec-2011  jmcneill support wskbd bell
 1.50 30-Dec-2011  reinoud Use the encoding values of the VNC spec and add a copyrect (not used yet)
 1.49 30-Dec-2011  reinoud Add RFB type flag to indicate what kind of request is waiting
 1.48 30-Dec-2011  jmcneill optimize rfb updates by allowing queueing of multiple update messages,
dropping duplicates, and transmitting them in batches
 1.47 29-Dec-2011  jmcneill Replace the SDL based genfb driver with a wsdisplay and wskbd driver that
implements the VNC (RFB) protocol.

To enable the VNC server, add 'vnc=640x480,5900' to the kernel command line
(where 640x480 is the desired fb resolution and 5900 is the TCP port).

Screenshot of it here: http://www.netbsd.org/~jmcneill/usermode.tiff
 1.46 26-Dec-2011  jmcneill add vaudio(4) audio device driver
 1.45 26-Dec-2011  jmcneill first cut at networking support for usermode, doesn't fully work yet but
enough to get an address with dhcp and answer arps
 1.44 20-Dec-2011  jmcneill on second thought, set machine and machine_arch both from the host and
override module_machine
 1.43 20-Dec-2011  jmcneill set machine_arch to that of the host
 1.42 20-Dec-2011  reinoud Use to the MAP_NOSYSCALLS argument to mmap() to allow for NetBSD/usermode to
execute bog-standard native programs.
 1.41 15-Dec-2011  jmcneill Improve usermode timecounter. It's unreasonable to assume that we'll get
100 "SIGALRM" per second with an ITIMER_REAL at 100Hz on a HZ=100 host as
the timer may expire before a pending signal has been delivered.

Instead of setitimer, use timer_create + timer_settime and from our
intr handler use timer_getoverrun to determine how many ticks we have
missed.
 1.40 15-Dec-2011  jmcneill implement /proc/cpuinfo
 1.39 15-Dec-2011  jmcneill use write instead of putchar putchar putchar putchar putchar ... for console output
 1.38 15-Dec-2011  jmcneill implement cpu idle via sigsuspend
 1.37 12-Dec-2011  jmcneill make sure to set O_ASYNC on stdin to enable ttycons "interrupts"
 1.36 11-Dec-2011  jmcneill add thunk_pollchar
 1.35 27-Nov-2011  reinoud branches: 1.35.2;
Add thunk_sigprocmask()
 1.34 15-Sep-2011  reinoud branches: 1.34.2;
Implement a dprintf_debug() analog to aprint_debug() but printing it to stderr
using vdprintf() to bypass the kernel buffer. It is currently printing only on
the -x boot flag but might get a more specific one since its quite verbose!
 1.33 14-Sep-2011  reinoud Provide thunk fuction to return the host machine's VM_MIN_ADDRESS
 1.32 09-Sep-2011  reinoud Sanitise thunk_makecontext() allowing upto 3 random arguments
 1.31 09-Sep-2011  reinoud Streamline makecontext() calls to really only specify the number of arguments
to prevent side-effects
 1.30 05-Sep-2011  reinoud Implement thunk_sigemptyset()
 1.29 05-Sep-2011  reinoud Add thunk_sigaddset()
 1.28 04-Sep-2011  jmcneill implement splraise/spllower
 1.27 04-Sep-2011  reinoud Implement thunk_seterrno()
 1.26 04-Sep-2011  reinoud -thunk_makecontext_trapframe2go(ucontext_t *ucp, void *func, void *trapframe)
+thunk_makecontext_1(ucontext_t *ucp, void *func, void *arg)
 1.25 03-Sep-2011  jmcneill Let NetBSD/usermode build & link on a Linux host:
- Need to add options CPU_HOST=i386 or CPU_HOST=amd64 for membar & atomic_ops
- Don't use MAP_* and PROT_* with thunk API since the kernel and host
might not be the same; add THUNK_MAP_* and THUNK_PROT_* and translate them
- Add thunk_posix_memalign
- allocate mem_uvm with thunk_posix_memalign instead of thunk_malloc
- Fix thunk_mmap callers to always pass either THUNK_MAP_PRIVATE or
THUNK_MAP_SHARED
- mkstemp on Linux requires exactly 6 "X" characters at the end of the
template string, so add an X
 1.24 03-Sep-2011  jmcneill Get this compiling (but not quite linking yet) on Linux
 1.23 02-Sep-2011  reinoud Revert
 1.22 02-Sep-2011  reinoud -thunk_makecontext_trapframe2go(ucontext_t *ucp, void *func, void *trapframe)
+thunk_makecontext_1(ucontext_t *ucp, void (*func)(void), void *arg)

Create a more general prototype for makecontext() with one variable.
 1.21 01-Sep-2011  reinoud Implement thunk_sigaltstack() so an alternative signal stack can be used
 1.20 28-Aug-2011  jmcneill add thunk_tcgetattr and thunk_tcsetattr
 1.19 28-Aug-2011  reinoud Add thunk_makecontext_trapframe2go()
 1.18 27-Aug-2011  reinoud Add a thunk_atexit() so ucontext() ends can be dealt with as they should
 1.17 25-Aug-2011  jmcneill - build thunk code with warnings
- add option SDL which pulls in thunk_sdl code and links the kernel to libSDL
- add an experimental framebuffer driver based on thunk_sdl, enable with:
options SDL
genfb* at mainbus?
wsdisplay* at genfb?
options WS_KERNEL_FG=WSCOL_GREEN
options WSEMUL_VT100
- reserve a major # for wsdisplay
- add thunk_getenv()
 1.16 24-Aug-2011  reinoud Implement thunk_malloc() and think_free()
 1.15 23-Aug-2011  jmcneill add a wrapper for signal(3)
 1.14 23-Aug-2011  jmcneill struct stat also has time_t in it, so we can't use that in the thunk api either
 1.13 23-Aug-2011  jmcneill more time_t fixes
 1.12 23-Aug-2011  jmcneill unlink pmap backing file immediately after opening it, so we don't leave
a bunch of 128MB turds sitting around in /tmp
 1.11 23-Aug-2011  jmcneill more host vs. userkernel time_t fixes
 1.10 23-Aug-2011  jmcneill host and userkernel timespec might differ in size (because of time_t) so
instead of thunk_clock_getres() filling in a timespec, use instead
thunk_clock_getres_monotonic() that returns the resolution as a long
 1.9 22-Aug-2011  reinoud Add thunk_munmap() to NetBSD/usermode's thunk
 1.8 21-Aug-2011  reinoud Fix thunk_mkstemp() prototype and add thunk_mprotect()
 1.7 21-Aug-2011  reinoud Add mmap() reachover call in thunk for NetBSD/usermode
 1.6 20-Aug-2011  reinoud Create mkstemp() and sbrk() prototypes to NetBSD/usermode's thunk
 1.5 13-Aug-2011  jmcneill - replace the gettimeofday timecounter with one based on CLOCK_MONOTONIC
- use gettimeofday for TODR clock
 1.4 13-Aug-2011  jmcneill try to use aio_read/aio_write instead of pread/pwrite
 1.3 12-Aug-2011  jmcneill add a simple disk driver, pass the path to the disk image on the kernel command line:

soundwave$ ./netbsd /tmp/test.fs
NetBSD/usermode startup
[...]
ld0 at mainbus0: /tmp/test.fs (33554432)
ld0: 32768 KB, 8322 cyl, 64 head, 63 sec, 1 bytes/sect x 33554432 sectors
boot device: ld0
root on ld0a dumps on ld0b
 1.2 12-Aug-2011  jmcneill implement reboot using execv
 1.1 12-Aug-2011  jmcneill Clean up extern mess by adding an API for kernel components to call libc
functions. thunk.c is built with special cflags that makes it compile
against standard system headers instead of kernel ones.
 1.34.2.1 17-Apr-2012  yamt sync with head
 1.35.2.4 06-Mar-2012  mrg sync to -current
 1.35.2.3 06-Mar-2012  mrg sync to -current
 1.35.2.2 04-Mar-2012  mrg sync to latest -current.
 1.35.2.1 18-Feb-2012  mrg merge to -current.
 1.60.2.1 07-Mar-2012  riz Pull up following revision(s) (requested by reinoud in ticket #89):
sys/arch/usermode/usermode/thunk.c: revision 1.81
sys/arch/usermode/target/i386/cpu_i386.c: revision 1.4
sys/arch/usermode/include/thunk.h: revision 1.61
sys/arch/usermode/include/intr.h: revision 1.9
sys/arch/usermode/dev/cpu.c: revision 1.70
sys/arch/usermode/dev/ttycons.c: revision 1.19
sys/arch/usermode/usermode/trap.c: revision 1.64
Implement signal forwarding to userland for usermode kernels. Especially
SIGFPE is important since the urkel shouldn't stop when a userland program
devides by zero!
 1.61.16.1 06-Apr-2015  skrll Sync with HEAD
 1.61.2.1 03-Dec-2017  jdolecek update from HEAD
 1.62.16.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.62.16.2 25-Jun-2018  pgoyette Sync with HEAD
 1.62.16.1 21-May-2018  pgoyette Sync with HEAD
 1.65.2.1 10-Jun-2019  christos Sync with HEAD
 1.66.2.1 27-Apr-2019  isaki Adapt to audio2.
 1.1 28-Jul-2018  reinoud branches: 1.1.2; 1.1.6;
Provide hand-doctored redirection of trap.h in preparation for ddb/kgdb
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 28-Jul-2018  christos file trap.h was added on branch phil-wifi on 2019-06-10 22:06:50 +0000
 1.1.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.1 28-Jul-2018  pgoyette file trap.h was added on branch pgoyette-compat on 2018-09-06 06:55:43 +0000
 1.17 01-Apr-2021  simonb Whitespace: #define<tab>
 1.16 10-Apr-2019  thorpej branches: 1.16.12; 1.16.14;
Make the usermode kernel compile again.
 1.15 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.14 01-Jun-2018  reinoud branches: 1.14.2;
Fix compilation errors so NetBSD/usermode compiles under ./build.sh
 1.13 29-May-2018  reinoud Implement cpu_lwp_setprivate(). This removes the need for the cpu_switch()
hack.

Programs with TLS work fine now, including gdb!
 1.12 26-Jan-2017  christos branches: 1.12.12;
provide __HAVE_COMPAT_NETBSD32 and fix multiple include protection consistently.
 1.11 23-Jan-2016  christos branches: 1.11.2; 1.11.4;
expose the kernel types for standalone code.
 1.10 23-Jan-2016  christos Hide {p,v}{addr,size}_t and register_t (and a couple more types that
are machine-specific) from userland unless _KERNEL/_KMEMUSER and a
new _KERNTYPES variables is defined. The _KERNTYPES should be fixed
for many subsystems that should not be using it (rump)...
 1.9 27-Aug-2015  pooka Fix PTHREAD_FOO_INITIALIZER for C++ by not using volatile in the relevant
pthread types in C++ builds, attempt 2.

The problem with attempt 1 was making assumptions of what the MD
__cpu_simple_lock_t (declared volatile) looks like. To get a same type
except non-volatile, we change the MD type to __cpu_simple_lock_nv_t
and typedef __cpu_simple_lock_t as a volatile __cpu_simple_lock_nv_t.
IMO, __cpu_simple_lock_t should not be volatile at all, but changing it
now is too risky.

Fixes at least Rumprun w/ gcc 5.1/5.2. Furthermore, the mpd application
(and possibly others) will no longer require NetBSD-specific patches.

Tested: build.sh for i386, Rumprun for x86_64 w/ gcc 5.2.

Based on the patch from Christos in lib/49989.
 1.8 08-Feb-2012  reinoud branches: 1.8.6; 1.8.24;
Fix /dev/kmem access and make vmstat(1) `work'. Not sure all the results are
indeed valid or correct but at least it shows them without coredumping or
coredumping the kernel.
 1.7 08-Jan-2012  jmcneill define __HAVE_OLD_DISKLABEL on i386
 1.6 11-Dec-2009  matt branches: 1.6.12; 1.6.16;
Add PRIx{P,V}{ADDR,SIZE}, PRIu{P,V}SIZE, and PRIxREGISTER{,32,64} for all
(except where they will be added via merge). These should be used to print
{p,v}{addr,size}_t and register*_t as appropriate.
 1.5 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.4 20-Jan-2008  joerg branches: 1.4.2; 1.4.4; 1.4.14;
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.3 07-Jan-2008  joerg branches: 1.3.2;
Use gettimeofday as timecounter.
 1.2 29-Dec-2007  reinoud branches: 1.2.2;
Fix enough to get i386 more-or-less compiling. The i386 needs u_long to be
an unsigned long too or uvm will complain.
 1.1 29-Dec-2007  jmcneill Import work-in-progress NetBSD/usermode port.
 1.2.2.4 23-Jan-2008  bouyer Sync with HEAD.
 1.2.2.3 08-Jan-2008  bouyer Sync with HEAD
 1.2.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.2.2.1 29-Dec-2007  bouyer file types.h was added on branch bouyer-xeni386 on 2008-01-02 21:51:01 +0000
 1.3.2.3 23-Mar-2008  matt sync with HEAD
 1.3.2.2 09-Jan-2008  matt sync with HEAD
 1.3.2.1 07-Jan-2008  matt file types.h was added on branch matt-armv6 on 2008-01-09 01:49:28 +0000
 1.4.14.1 11-Mar-2010  yamt sync with head
 1.4.4.2 18-Feb-2008  mjf Sync with HEAD.
 1.4.4.1 20-Jan-2008  mjf file types.h was added on branch mjf-devfs on 2008-02-18 21:05:13 +0000
 1.4.2.2 21-Jan-2008  yamt sync with head
 1.4.2.1 20-Jan-2008  yamt file types.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:54 +0000
 1.6.16.1 18-Feb-2012  mrg merge to -current.
 1.6.12.1 17-Apr-2012  yamt sync with head
 1.8.24.3 05-Feb-2017  skrll Sync with HEAD
 1.8.24.2 19-Mar-2016  skrll Sync with HEAD
 1.8.24.1 22-Sep-2015  skrll Sync with HEAD
 1.8.6.1 03-Dec-2017  jdolecek update from HEAD
 1.11.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.11.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.12.12.1 25-Jun-2018  pgoyette Sync with HEAD
 1.14.2.1 10-Jun-2019  christos Sync with HEAD
 1.16.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.16.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 05-Aug-2018  reinoud branches: 1.2.2; 1.2.6;
Add KGDB definitions for i386
 1.1 01-Aug-2018  reinoud Forgot the two header files
 1.2.6.2 10-Jun-2019  christos Sync with HEAD
 1.2.6.1 05-Aug-2018  christos file ucontext.h was added on branch phil-wifi on 2019-06-10 22:06:50 +0000
 1.2.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2.2.1 05-Aug-2018  pgoyette file ucontext.h was added on branch pgoyette-compat on 2018-09-06 06:55:43 +0000
 1.2 20-Dec-2011  jmcneill get rid of urkelvisor, and use same MD majors as the host
 1.1 03-Sep-2011  jmcneill branches: 1.1.2; 1.1.6;
Add usermode kernel supervisor, can be disabled with 'no options URKELVISOR'
 1.1.6.1 18-Feb-2012  mrg merge to -current.
 1.1.2.1 17-Apr-2012  yamt sync with head
 1.20 03-Aug-2018  reinoud Allow for setting kernel breakpoints in our remote kgdb
 1.19 01-Aug-2018  reinoud Revert to working state
 1.18 01-Aug-2018  reinoud Max kernel address is end of kernel
 1.17 10-Nov-2013  jmcneill branches: 1.17.28; 1.17.30;
support building on arm
 1.16 08-Feb-2012  reinoud branches: 1.16.6; 1.16.10;
Fix /dev/kmem access and make vmstat(1) `work'. Not sure all the results are
indeed valid or correct but at least it shows them without coredumping or
coredumping the kernel.
 1.15 10-Jan-2012  reinoud Clarify comment about PAGER_MAP_DEFAULT_SIZE
 1.14 06-Jan-2012  reinoud Bump pager map default size since KVM is not that tight anymore
 1.13 03-Jan-2012  reinoud Rework NetBSD/usermode pmap fixing some oddities that were left over from
earlier times when we were forced to run PIE executables and were forced to
use a KVM above the kernel.
 1.12 25-Dec-2011  reinoud Fix VM_MAX_ADDRESS that is NOT the max address BUT the max userland address
Fix VM_MAX_KERNEL_ADDRESS that is the absolute max address accesable by the
kernel...
 1.11 26-Aug-2011  jmcneill branches: 1.11.2; 1.11.6;
define __USE_TOPDOWN_VM
 1.10 26-Aug-2011  reinoud Revert.
 1.9 26-Aug-2011  reinoud Add checks for architectures that need a check for VM_MIN_ADDRESS
 1.8 24-Aug-2011  reinoud Swap userland code and kvm spaces so that userland lives from VM_MIN_ADDRESS
to VM_MAXUSER_ADDRESS and KVM is above that.

Note that the userspace is surrounded by a configurable amount of
non-accessible barrier space to prevent accidental out-of-boundaries access
even when reading.
 1.7 24-Aug-2011  reinoud Fix vmparam's definitions to the new style
 1.6 24-Aug-2011  reinoud kmem_data_start is no longer needed
 1.5 22-Aug-2011  jmcneill build fixes for netbsd-5 and i386
 1.4 22-Aug-2011  reinoud Start NetBSD/usermode's pmap. Its using a temp file as a physical memory
backup and that should be documented in the code. A physical address is thus a
file offset(!) and a virtual address is a `normal' accesible address.

Still to do: various misc functions and pmap_extract() in special.

Credits also go to Ben Harris for his work on the Acorn26 pmap that followed
the Daemon Book recommendation for systems without real page tables on wich
this implementation is modelled after.
 1.3 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.2 29-Dec-2007  reinoud branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.18;
To make NetBSD/userland to boot on i386 choose some defaults in vmparam.h
since for i386 they are defined in page size constants wich NetBSD/userland
doesn't know yet. Also undefine ptrace's __HAVE_PTRACE_MACHDEP since i386
has that but NetBSD/userland not.
 1.1 29-Dec-2007  jmcneill Import work-in-progress NetBSD/usermode port.
 1.2.18.1 11-Mar-2010  yamt sync with head
 1.2.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.2.8.1 29-Dec-2007  mjf file vmparam.h was added on branch mjf-devfs on 2008-02-18 21:05:13 +0000
 1.2.6.2 21-Jan-2008  yamt sync with head
 1.2.6.1 29-Dec-2007  yamt file vmparam.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:55 +0000
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 29-Dec-2007  matt file vmparam.h was added on branch matt-armv6 on 2008-01-09 01:49:28 +0000
 1.2.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.2.2.1 29-Dec-2007  bouyer file vmparam.h was added on branch bouyer-xeni386 on 2008-01-02 21:51:02 +0000
 1.11.6.1 18-Feb-2012  mrg merge to -current.
 1.11.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.11.2.1 17-Apr-2012  yamt sync with head
 1.16.10.1 18-May-2014  rmind sync with head
 1.16.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.30.1 10-Jun-2019  christos Sync with HEAD
 1.17.28.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.12 16-May-2018  reinoud Regen usermode headers
 1.11 10-Nov-2013  jmcneill branches: 1.11.28;
support building on arm
 1.10 05-Feb-2012  reinoud branches: 1.10.6; 1.10.10;
regen
 1.9 05-Feb-2012  reinoud regen
 1.8 02-Feb-2012  reinoud Regen
 1.7 14-Jan-2012  reinoud Regen
 1.6 14-Jan-2012  reinoud Update automatically generated headers
 1.5 08-Jan-2012  jmcneill regen
 1.4 08-Sep-2011  jmcneill branches: 1.4.2; 1.4.6;
regen
 1.3 03-Sep-2011  jmcneill Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.
 1.2 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.1 29-Dec-2007  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.18;
Import work-in-progress NetBSD/usermode port.
 1.1.18.1 11-Mar-2010  yamt sync with head
 1.1.8.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.8.1 29-Dec-2007  mjf file wchar_limits.h was added on branch mjf-devfs on 2008-02-18 21:05:13 +0000
 1.1.6.2 21-Jan-2008  yamt sync with head
 1.1.6.1 29-Dec-2007  yamt file wchar_limits.h was added on branch yamt-lazymbuf on 2008-01-21 09:39:55 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 29-Dec-2007  matt file wchar_limits.h was added on branch matt-armv6 on 2008-01-09 01:49:29 +0000
 1.1.2.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 29-Dec-2007  bouyer file wchar_limits.h was added on branch bouyer-xeni386 on 2008-01-02 21:51:02 +0000
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.10.10.1 18-May-2014  rmind sync with head
 1.10.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.28.1 21-May-2018  pgoyette Sync with HEAD

RSS XML Feed