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

This change:

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

* Removes the PMC code of ARM XSCALE.

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

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

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

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.26 24-Dec-2015  christos branches: 1.26.16; 1.26.18;
fenv for m68k
 1.25 17-Jul-2011  joerg branches: 1.25.12; 1.25.30;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.24 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.23 09-Feb-2007  ad branches: 1.23.48;
Merge newlock2 to head.
 1.22 26-Jul-2006  drochner branches: 1.22.4;
don't install <machine/db_machdep.h>, this is kernel only
 1.21 11-Dec-2005  christos branches: 1.21.4; 1.21.8;
merge ktrace-lwp.
 1.20 08-May-2004  kleink branches: 1.20.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.19 17-Jan-2003  thorpej branches: 1.19.2;
Merge the nathanw_sa branch.
 1.18 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.17 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

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

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

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.7 17-Mar-2000  tron Install "machineendian_machdep.h".
 1.6 23-Dec-1999  kleink C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
 1.5 19-Apr-1999  kleink branches: 1.5.2;
Add COMPAT_SVR4 for m68k.
 1.4 15-Mar-1999  minoura branches: 1.4.4;
Pullin m68k/ieee.h.
 1.3 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.2 12-Jul-1998  veego Add elf_machdep.h to the INCS list.
 1.1 12-Jun-1998  cgd Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
 1.4.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.5.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.5.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.9.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.13.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.13.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.13.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.13.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.4.6 11-Dec-2002  thorpej Sync with HEAD.
 1.14.4.5 17-Sep-2002  nathanw Catch up to -current.
 1.14.4.4 13-Aug-2002  nathanw Catch up to -current.
 1.14.4.3 08-Jan-2002  nathanw Catch up to -current.
 1.14.4.2 10-Nov-2001  scw Kernel mcontext glue for Scheduler Activations on m68k from
Klaus Klein <kleink@netbsd.org>.
 1.14.4.1 19-Sep-2001  scw file Makefile was added on branch nathanw_sa on 2001-11-10 21:22:48 +0000
 1.15.8.2 30-Aug-2002  gehenna catch up with -current.
 1.15.8.1 16-May-2002  gehenna Remove unnecessary file.
 1.19.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.19.2.1 03-Aug-2004  skrll Sync with HEAD
 1.20.12.2 26-Feb-2007  yamt sync with head.
 1.20.12.1 30-Dec-2006  yamt sync with head.
 1.21.8.1 11-Aug-2006  yamt sync with head
 1.21.4.1 09-Sep-2006  rpaulo sync with head
 1.22.4.1 01-Feb-2007  ad Header file cleanup.
 1.23.48.1 20-Jun-2009  yamt sync with head
 1.25.30.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.25.12.1 03-Dec-2017  jdolecek update from HEAD
 1.26.18.1 10-Jun-2019  christos Sync with HEAD
 1.26.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.27.36.1 02-Aug-2025  perseant Sync with HEAD
 1.9 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.8 26-Oct-1994  cgd branches: 1.8.256;
new RCS ID format.
 1.7 10-Apr-1994  chopps also conform to standard style
 1.6 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.5 07-Feb-1994  chopps remove redef of SIZE_T, logically same, lexically different.
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.8.256.1 10-Jun-2019  christos Sync with HEAD
 1.10 08-Oct-1996  cgd repoint at shared aout_machdep.h, not exec.h
 1.9 08-Sep-1996  thorpej Use <m68k/exec.h>.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 10-Apr-1994  chopps also conform to standard style
 1.6 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.5 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 18-Oct-1993  pk Put definition of __LDPGSZ and `struct relocation_info' where they belong:
in <machine/exec.h>.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 10-Apr-1994  chopps also conform to standard style
 1.2 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.1 01-Feb-1994  chopps fetch m68k asm macros.
 1.2 21-Aug-1999  simonb Include <sys/bswap.h> for function prototypes. i386, pc532 and vax
still include <machine/byte_swap.h> and define macros for some of
the bswap*() functions.
 1.1 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.30 23-Sep-2019  skrll Provide PRIxBUSADDR, PRIxBUSSIZE, PRIuBUSSIZE, and PRIxBSH for all arches
to follow arm and (generic) mips.

Reviewed by christos.
 1.29 03-Jan-2014  rkujawa branches: 1.29.30;
Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce
proper bus_space accesses and some abstraction layer. All drivers that utilised
Gayle also had to be refactored.

I tried not to break anything more, but this clearly needs more testing...
 1.28 22-Dec-2013  rkujawa Add preliminary support for the Individual Computers ACA500 in the form of acahf
driver. If ACA500 is equipped with supported accelerator with MMU, it allows
running NetBSD on an Amiga 500.

Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the
driver is activated with the ACA500_SUPPORT kernel option. The acahf driver
is commented out in the GENERIC kernel for now (at least until it stops being
very experimental and hackish).

When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming...
 1.27 01-Jun-2012  rkujawa branches: 1.27.2; 1.27.4;
More work on PCI memory accesses on empb(4).
 1.26 07-May-2012  tsutsui Add dummy bus_dma(9) typedefs (enabled by __HAVE_NO_BUS_DMA) in <sys/bus.h>
for ports which don't bother to have unnecessary bus_dma(9) implementation
to appease MI driver modules that require bus_dma_tag_t.

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

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

"Sounds good" from martin@ on port-m68k@.
 1.25 21-Sep-2011  rkujawa branches: 1.25.2; 1.25.6;
Remove zbusmap prototype from bus.h (now in zbusvar.h)
 1.24 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.23 03-Feb-2010  phx Ensure reorder protection for amigappc in all bus space functions.
The ne(4) driver (XSurf2), which is the only bus_space device I got,
works now.
 1.22 20-Oct-2009  snj Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@.
 1.21 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.20 11-Dec-2005  christos branches: 1.20.78; 1.20.86; 1.20.92;
merge ktrace-lwp.
 1.19 16-Aug-2004  aymeric add fake bus_space_read_region_stream_4() and bus_space_write_region_stream_4()
macros to cope with the recent wdc_pcmcia changes
 1.18 27-Sep-2002  jdolecek branches: 1.18.6;
add stubs for bus_space_read_stream_4()/bus_space_write_stream_4(),
defined similarily to other bus_space_*_4() as panic()
 1.17 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.16 23-Mar-2000  is branches: 1.16.8; 1.16.12;
Initial IOBlix support. Only lpt and com; lpt untested; com assumes 24 MHz
clock (needs autoprobe of clock speed).
 1.15 04-Mar-2000  aymeric do as if bus_space_read_4() returned an int, although it just calls panic.
 1.14 31-Jan-2000  mhitch Semicolons in the 32-bit macros aren't nice.
Add a stride-4 with swapping bus_space_method for use by MI wdc.
 1.13 23-Jan-2000  aymeric code factorisation and added stride 1 functions
 1.12 30-Dec-1999  is Rewrite of the Amiga bus_space machinery to prepare for the support of
the generic IDE driver and the PCMCIA slots.
 1.11 20-Apr-1999  is branches: 1.11.2;
Add dummy bus_space_barrier method, like mac68k
 1.10 23-Mar-1999  drochner branches: 1.10.2;
Add a macro to check for sufficient pointer alignment in bus.h context,
"BUS_SPACE_ALIGNED_POINTER()".
Equal to the param.h "ALIGNED_POINTER()" normally, but obeys additional
requirements of the bus_space_xxx_n() macros. (BUS_SPACE_DEBUG)
 1.9 08-Nov-1998  is - declare method arrays in bus.h
- add interleaved_wordaccess method array
 1.8 07-Nov-1998  is Fix typo.
 1.7 07-Nov-1998  is We didn't really implement bus_space_{read,write}_stream_N, but
bus_space_{read,write}_region_stream_N. Correct the names.
 1.6 12-Oct-1998  is Make the data pointer of the write_multi, write_region and write_stream
methods const *.
 1.5 12-Oct-1998  is - add bus_space_{copy,set}_region_{1,2} support and implementation for
_1 and for _2 in the contiguous and interleaved case.

- while we're here, reorganize bus.h into sections, and use the defined
convenience functions everywhere.
 1.4 08-Oct-1998  is - define framework for >8bit transfers
- implement 16 bit contiguous and 16 bit interleaved, both big-endian
 1.3 02-Sep-1998  is Add bus_space_read_region_1/bus_space_write_region_1 to the Amiga bus.h.
 1.2 22-Mar-1998  is Add bus_space_subregion().
 1.1 27-Aug-1997  is branches: 1.1.2;
Amiga port bus.h. Currenlty, only the _1 functions are implemented.
 1.1.2.2 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 27-Aug-1997  thorpej file bus.h was added on branch marc-pcmcia on 1997-09-01 20:06:44 +0000
 1.10.2.1 20-Apr-1999  perry branches: 1.10.2.1.2;
pullup 1.10->1.11 (is)
 1.10.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.11.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.16.12.2 18-Oct-2002  nathanw Catch up to -current.
 1.16.12.1 20-Jun-2002  nathanw Catch up to -current.
 1.16.8.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.16.8.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.18.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.18.6.1 25-Aug-2004  skrll Sync with HEAD.
 1.20.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.20.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.20.78.2 11-Mar-2010  yamt sync with head
 1.20.78.1 04-May-2009  yamt sync with head.
 1.25.6.1 02-Jun-2012  mrg sync to latest -current.
 1.25.2.3 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25.2.2 30-Oct-2012  yamt sync with head
 1.25.2.1 23-May-2012  yamt sync with head.
 1.27.4.1 18-May-2014  rmind sync with head
 1.27.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.30.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1 19-Jan-1995  jtc This file, which will be included by <sys/cdefs.h>, will contain macros
such as __warn_references() and __weak_reference() which are actually
machine dependant. This will make it easier for ports that are being
bootstraped with ELF and ECOFF based toolchains.

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

For most ports, _C_LABEL(x) will expand to "_x", for ELF based ports
_C_LABEL(x) will expand to "x".
 1.12 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.11 28-Feb-2002  simonb branches: 1.11.8;
Use "#define<tab>".
 1.10 27-Feb-2002  christos - define other DEV_ constants that the local port uses.
- delete cdev_decl(mm) since <sys/conf.h> does it.
 1.9 26-Mar-2001  lukem branches: 1.9.2; 1.9.8;
- add dev_noimpl(xxx,yyy) macro to replace "(dev_type_xxx((*))) yyy",
and use appropriately

- create more helper macros:
. cdev__xyz_init(c,n), such as cdev__ocri_init() for
/* open, close, read, ioctl */, etc.
. cdev__xRy_init(c,n), where nullop is used instead of enodev to dummy out
method `R' and the comments now read /* xxx (read) yyy */ instead
. cdev__xyz_t_init(c,n,t) - as per cdev__xyz_init, but sets d_type = t
as well

- use seltrue instead of dev_noimpl(poll,*), as (IIRC) cdevsw.d_poll should
always DTRT WRT returning a valid result. (a few devices previously
incorrectly returned ENODEV)

- use dev_noimpl(stop,enodev) instead of dev_noimpl(stop,nullop) if tty
== 0, because it doesn't matter if dev_type_stop isn't implemented in that
case, and it allows the use of the cdev__xyz_init macros. certain ports
(sparc,sparc64,x68k) used the nullop method for dev_type_stop in a few
drivers, whereas everything else uses enodev

- ensure that the comments are accurate WRT the behaviour of a given entry
 1.8 21-Mar-2001  lukem now that duplicated stuff has been moved to sys/conf.h, remove unnecessary
defs for: lpt, joy, pc
 1.7 10-Oct-1998  thorpej branches: 1.7.12; 1.7.24;
Add scsibus entry points to the cdevsw[].
 1.6 27-Sep-1997  is First part of splitting lpt.c, and the NetBSD/Amiga "supio" frontend. Needs
a bit more work to allow an ISA frontend.
 1.5 27-Sep-1997  is conf.h: declare com instead of drcom.
conf.c: remove com declarations.
 1.4 30-Nov-1996  is branches: 1.4.10;
Forgotten changes needed for the drcom driver.
 1.3 07-Sep-1996  mycroft Implement poll(2).
 1.2 05-May-1996  veego removed the define for cdev_ss_init
 1.1 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
 1.4.10.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7.24.1 09-Apr-2001  nathanw Catch up with -current.
 1.7.12.1 27-Mar-2001  bouyer Sync with HEAD.
 1.9.8.4 17-Sep-2002  nathanw Catch up to -current.
 1.9.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.9.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.9.8.1 26-Mar-2001  nathanw file conf.h was added on branch nathanw_sa on 2002-02-28 04:07:04 +0000
 1.9.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.11.8.1 16-May-2002  gehenna Remove unnecessary file.
 1.88 20-Jan-2024  thorpej Largely unify the <machine/cpu.h> headers on the m68k platforms.
 1.87 19-Jan-2024  thorpej Consistently use "intr_depth" as the name of the interrupt depth counter
on m68k platforms.
 1.86 19-Jan-2024  thorpej Switch the amiga port to use the same clockframe layout as the other
m68k ports.
 1.85 18-Jan-2024  thorpej Make the M68K_MMU_* defines real kernel options, available in opt_m68k_arch.h.
For 68030, 68040, and 68060, infer M68K_MMU_MOTOROLA. For 68010 and 68020, it
must be an explicit option (set in std.${MACHINE} or, in the case of hp300,
inferred from the specific model option).
 1.84 09-Jan-2024  thorpej Remove duplicated / slightly-tweaked loadustp() (load user segment table)
routines from all of the m68k ports using the shared pmap. Instead, in
pmap_init(), set up a function pointer to the appropriate mmu_load_urp*()
function in mmu_subr.s.
 1.83 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.82 22-Aug-2018  msaitoh - Cleanup for dynamic sysctl:
- Remove unused *_NAMES macros for sysctl.
- Remove unused *_MAXID for sysctls.
- Move CTL_MACHDEP sysctl definitions for m68k into m68k/include/cpu.h and
use them on all m68k machines.
 1.81 17-Dec-2016  flxd branches: 1.81.14; 1.81.16;
Fix typo "one the" and architecture where appropriate.
 1.80 19-Oct-2013  christos branches: 1.80.6; 1.80.10;
make cpu_need_resched() macros consistent; __USE flags
 1.79 16-May-2011  tsutsui branches: 1.79.4; 1.79.14; 1.79.18;
- merge and move pasted m68k MD setreg() functions into m68k/m68k_machdep.c
- move m68881_save() and m68881_restore() declarations into <m68k/m68k.h>

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

Extra verification by snj@.
 1.77 13-Jan-2011  phx branches: 1.77.2; 1.77.4;
Recognize Amiga 600 model.
Patch submited by Radoslaw Kujawa.
 1.76 22-Dec-2010  matt Collect cpu_info and friends and move to m68k/include/cpu.h
Add a define __HAVE_CPU_DATA_FIRST which means that cpu_data is the first
member in struct cpu_info.
 1.75 09-Feb-2010  phx branches: 1.75.2;
Moved the macros amiga_cpu_sync() and amiga_membarrier() from amiga/device.h
to the MD include/cpu.h.
Also make sure that grf_cvreg.h includes cpu.h as it is needed by Xamiga
in xsrc/xfree/xc/programs/Xserver/hw/netbsd/amiga/s3/amigaCV.h.
 1.74 23-Nov-2009  rmind branches: 1.74.2;
Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.73 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.72 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.71 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.70 27-Feb-2008  xtraeme branches: 1.70.4; 1.70.12; 1.70.18;
Remove CTL_MACHDEP_NAMES, it's not used anywhere.

Ok by martin@.
 1.69 06-Jan-2008  mhitch branches: 1.69.2; 1.69.6;
Add timecounter support and borrow counter-based delay from i386.
From joerg; testing and final tweaks by me.
 1.68 17-Oct-2007  garbled branches: 1.68.2; 1.68.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.67 04-Aug-2007  ad branches: 1.67.2;
Add ci_cpuid where it's missing.
 1.66 21-May-2007  tsutsui branches: 1.66.2; 1.66.4; 1.66.8;
Move declarations of m68k common functions
from <machine/cpu.h> to <m68k/m68k.h>.
While here, remove some obsolete function decls.
 1.65 20-May-2007  mhitch Forgot cpu.h for amiga - rename proc_trampoline()->lwp_trampoline().
 1.64 18-May-2007  mhitch Amiga changes for idlelwp.
 1.63 04-Mar-2007  christos branches: 1.63.2; 1.63.4; 1.63.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.62 16-Feb-2007  ad branches: 1.62.2;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
 1.61 09-Feb-2007  ad Merge newlock2 to head.
 1.60 11-Dec-2005  christos branches: 1.60.20;
merge ktrace-lwp.
 1.59 26-Sep-2004  yamt branches: 1.59.12;
don't expose cpu_info to userland.
 1.58 22-Sep-2004  yamt move some per-cpu data definitions to MI place so that they can be modified
without touching all ports. discussed on tech-kern@.
 1.57 04-Jan-2004  jdolecek Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

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

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

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

g/c now unneeded routines and variables, including the reaper kernel thread
 1.56 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.55 17-Jan-2003  thorpej branches: 1.55.2;
Merge the nathanw_sa branch.
 1.54 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.53 07-Nov-2001  aymeric branches: 1.53.2;
introduce an interrupt_depth variable which counts how nested we are into
interrupts.
This allows hardclock() to account for the time spent in interrrupts, and
as a side-effect, top(1), systat(1) and others will no more report 0% of
interrupt activity.

mvme68k does that already.
 1.52 30-May-2001  mrg branches: 1.52.2; 1.52.6;
use _KERNEL_OPT
 1.51 19-Dec-2000  scw branches: 1.51.2;
Unification of the m68k syscall() function.
 1.50 25-Aug-2000  thorpej Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity. Its use in
roundrobin() still needs some work.
 1.49 26-May-2000  thorpej First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

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

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

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

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

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.48 14-Oct-1999  is branches: 1.48.2;
Remove now superfluous prototype definitions (of the m68k cache operations).
 1.47 10-Aug-1999  thorpej branches: 1.47.2;
Define cpu_number() as discussed on tech-smp.
 1.46 26-Feb-1999  is synchronize types, and s/curproc/p/ in one forgotten place
 1.45 25-Feb-1999  is mac68k part of pr 6152 fix, and missing bits for the others
 1.44 11-Nov-1998  thorpej Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.43 07-Oct-1998  thorpej Oops, back out a buglet I didn't intend to commit in the last change.
 1.42 06-Oct-1998  thorpej configure() prototype is in <sys/device.h>
 1.41 05-Sep-1998  is Define is_draco() inlined.
Corresponds to removal of this function in autoconf.c 1.61.
 1.40 13-Feb-1998  scottr Avoid declaring the "astpending" and "want_resched" globals in cpu.h,
as this breaks C++ code that happens to indirectly include this header.
Both Matthias Scheler and I noticed this, independently.

This problem notably does not affect the atari and sun3/sun3x ports,
which have already implemented a similar solution.
 1.39 26-Oct-1997  is Make these compile after m68k/m68k.h 1.4->1.5.
 1.38 09-Apr-1997  thorpej regdump() is prototyped in <m68k/cpu.h> now.
 1.37 31-Jan-1997  mhitch "options GENERIC" is obsolete, don't need the prototype for setconf() anymore.
 1.36 11-Sep-1996  thorpej Use <m68k/cpu.h>.
 1.35 19-May-1996  is Some more Prototypes needed for DraCo support.
 1.34 16-May-1996  is Only declare setconf() #ifdef GENERIC.
 1.33 16-May-1996  is add DCIA prototype.
 1.32 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.31 27-Apr-1996  veego Add a __noreturn__ attribute for doboot
 1.30 23-Apr-1996  veego The prototyp for cpu_set_kpc is now in sys/systm.h
 1.29 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
 1.28 30-Mar-1996  is Typo squished.
 1.27 26-Mar-1996  is Yet more MC68060 bits.
 1.26 15-Mar-1996  is AMIGA_68060 flag in cpu.h and genassym.c.
 1.25 21-Dec-1995  mycroft Remove deprecated cpu_setstack().
 1.24 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.23 28-Jun-1995  cgd remove unused cpu_exec() definitions. moved "broken swap" markers, for
ports that still need it, to types.h.
 1.22 16-May-1995  chopps PS_STRINGS in A2. Add fputype, remove cpuspeed. switch to new coredump
 1.21 12-May-1995  chopps enable swapping of process
 1.20 11-May-1995  chopps remove double mapping of kernel stack. created cpu_set_kpc()
 1.19 05-May-1995  cgd define BROKEN_SWAP and/or cpu_swapout as appropriate.
 1.18 22-Apr-1995  christos - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
 1.17 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.16 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.15 26-Oct-1994  cgd new RCS ID format.
 1.14 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.13 25-May-1994  chopps update to work with new m68k frame and recent vm changes.
 1.12 09-May-1994  chopps update for recent sig changes and fix clock.c and ite.c
 1.11 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.10 04-May-1994  chopps update to match current proc flags.
 1.9 10-Apr-1994  chopps also conform to standard style
 1.8 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.7 11-Feb-1994  chopps Add missing Id's
 1.6 03-Feb-1994  chopps swap ps and pc to match m68k:struct frame.
 1.5 26-Jan-1994  mw Updated headers from current amiga branch.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.47.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.48.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.48.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.51.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.52.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.52.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.52.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.53.2.6 03-Dec-2002  gmcgarry Use cpu_proc_fork().
 1.53.2.5 20-Jun-2002  nathanw Catch up to -current.
 1.53.2.4 08-Jan-2002  nathanw Catch up to -current.
 1.53.2.3 08-Dec-2001  thorpej Add a cpu_proc_fork(), called from uvm_proc_fork(), which takes care
of machine-dependent handling a fork() time (this is different from
forking the actual context in an LWP world). #define it away on
platforms which do not need it.

Problem noted by Gregory McGarry.
 1.53.2.2 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.53.2.1 07-Nov-2001  scw file cpu.h was added on branch nathanw_sa on 2001-11-17 21:59:09 +0000
 1.55.2.5 19-Oct-2004  skrll Sync with HEAD
 1.55.2.4 24-Sep-2004  skrll Sync with HEAD.
 1.55.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.55.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.55.2.1 03-Aug-2004  skrll Sync with HEAD
 1.59.12.4 17-Mar-2008  yamt sync with head.
 1.59.12.3 21-Jan-2008  yamt sync with head
 1.59.12.2 03-Sep-2007  yamt sync with head.
 1.59.12.1 26-Feb-2007  yamt sync with head.
 1.60.20.1 06-Feb-2007  ad Make amiga & mac68k compile.
 1.62.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.63.10.2 03-Oct-2007  garbled Sync with HEAD
 1.63.10.1 22-May-2007  matt Update to HEAD.
 1.63.4.1 11-Jul-2007  mjf Sync with head.
 1.63.2.2 20-Aug-2007  ad Sync with HEAD.
 1.63.2.1 27-May-2007  ad Sync with head.
 1.66.8.1 04-Aug-2007  jmcneill Sync with HEAD.
 1.66.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.66.2.1 07-Aug-2007  matt Sync with HEAD.
 1.67.2.3 23-Mar-2008  matt sync with HEAD
 1.67.2.2 09-Jan-2008  matt sync with HEAD
 1.67.2.1 06-Nov-2007  matt sync with HEAD
 1.68.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.68.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.69.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.69.2.1 24-Mar-2008  keiichi sync with head.
 1.70.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.70.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.70.4.3 11-Mar-2010  yamt sync with head
 1.70.4.2 20-Jun-2009  yamt sync with head
 1.70.4.1 04-May-2009  yamt sync with head.
 1.74.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.75.2.2 31-May-2011  rmind sync with head
 1.75.2.1 05-Mar-2011  rmind sync with head
 1.77.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.77.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.79.18.1 18-May-2014  rmind sync with head
 1.79.14.2 03-Dec-2017  jdolecek update from HEAD
 1.79.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.79.4.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.80.10.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.80.6.1 05-Feb-2017  skrll Sync with HEAD
 1.81.16.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.81.16.1 10-Jun-2019  christos Sync with HEAD
 1.81.14.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 02-Aug-1993  mycroft Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.6 06-Nov-2017  christos Cleanup and clarify the ELFSIZE mess:

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

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

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

In sys/exec_elf.h, if ELFSIZE is not set, it is set to KERN_ELFSIZE
for the kernel and ARCH_ELFSIZE for userland. These defaults should
eliminate the need for most manual ELFSIZE setting.
 1.5 15-Aug-2001  mhitch branches: 1.5.6; 1.5.172;
ELF symbol support for DDB.
 1.4 26-Oct-1994  cgd branches: 1.4.46;
new RCS ID format.
 1.3 10-Apr-1994  chopps also conform to standard style
 1.2 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.1 26-Jan-1994  mw Updated headers from current amiga branch.
 1.4.46.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.5.172.1 03-Dec-2017  jdolecek update from HEAD
 1.5.6.2 15-Aug-2001  mhitch ELF symbol support for DDB.
 1.5.6.1 15-Aug-2001  mhitch file db_machdep.h was added on branch nathanw_sa on 2001-08-15 01:29:30 +0000
 1.8 30-Aug-2011  bouyer Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
 1.7 12-Sep-2009  phx Make disklabel.h from amiga and amigappc include the MI sys/disklabel_rdb.h.
amiga/amiga/adosglue.h was deleted and moved into sys_disklabel_rdb.h, as both
are always needed together (disksubr.c and ofppc/stand/ofwboot/rdb.c).
 1.6 21-Apr-1996  veego branches: 1.6.170;
- Cleanup for -Wall and -Wstrict-prototypes
 1.5 04-Jul-1995  chopps misc cleanup, better tty alloc for mfc. from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 14-Oct-1994  cgd move arch dependence to archs. clean up a bit. deal with weird MAXPARTITONS.
 1.2 04-Jul-1994  chopps move to new disk minor encoding (parts have lowest 4 bits instead of 3)
remove multiple inclusions protection from varargs.h
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.6.170.1 16-Sep-2009  yamt sync with head
 1.1 12-Jul-1998  thorpej Basic elf_machdep.h for m68k; doesn't include relocations, yet.
 1.9 17-Mar-2000  mycroft In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
 1.8 24-Jan-1999  mycroft branches: 1.8.8;
Format consistency.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.8.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1 17-Mar-2000  mycroft branches: 1.1.6;
In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.6.1 17-Mar-2000  bouyer file endian_machdep.h was added on branch thorpej_scsipi on 2000-11-20 19:58:47 +0000
 1.10 08-Oct-1996  cgd moved to aout_machdep.h (via repository copy)
 1.9 08-Sep-1996  thorpej Use <m68k/exec.h>.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 10-Apr-1994  chopps also conform to standard style
 1.6 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.5 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 18-Oct-1993  pk Put definition of __LDPGSZ and `struct relocation_info' where they belong:
in <machine/exec.h>.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.4 19-Sep-2001  thorpej Amiga don't need its own fbio.h anymore; screenblank(8) uses <dev/sun/fbio.h>,
and the ioctl that this file defines is compatible.
 1.3 16-Feb-1999  is branches: 1.3.20; 1.3.22;
Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 19-May-1996  is Screenblank support:
- new fbio.h in arch/amiga/include, defining only FBIOSVIDEO
- add an IOCTL translation to arch/amiga/dev/grf.c
- add screenblank to the list of specials to build on amiga.
 1.3.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.20.1 01-Oct-2001  fvdl Catch up with -current.
 1.1 27-Dec-2023  thorpej Re-factor the 680x0 Function Code definitions into their own
separate file (as was done on the sun2/sun3 ports ages ago)
and switch everyone to the common header.
 1.1 24-Dec-2015  christos branches: 1.1.2; 1.1.18;
fenv for m68k
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 24-Dec-2015  jdolecek file fenv.h was added on branch tls-maxphys on 2017-12-03 11:35:48 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 24-Dec-2015  skrll file fenv.h was added on branch nick-nhusb on 2015-12-27 12:09:29 +0000
 1.9 03-Feb-1998  mycroft Prototype __flt_rounds() consistently.
 1.8 26-Oct-1994  cgd branches: 1.8.18;
new RCS ID format.
 1.7 10-Apr-1994  chopps also conform to standard style
 1.6 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.5 26-Jan-1994  mw Updated headers from current amiga branch.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.8.18.1 08-May-1998  mycroft Sync with trunk, per request of mycroft.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.2 30-Aug-1999  mycroft A foolish consistency.
 1.1 15-Mar-1999  minoura Pullin m68k/ieee.h.
 1.2 16-Apr-1995  jtc Fix typo: ieefp.h -> ieeefp.h.
 1.1 09-Apr-1995  mycroft Move fp_except and fp_rnd definitions to machine/include.
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer constant macros.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
 1.1.12.1 14-Apr-2001  kleink file int_const.h was added on branch nathanw_sa on 2001-04-14 22:38:35 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_const.h was added on branch thorpej_scsipi on 2001-04-21 17:53:06 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_fmtio.h was added on branch nathanw_sa on 2001-04-15 17:13:06 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_fmtio.h was added on branch thorpej_scsipi on 2001-04-21 17:53:06 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_limits.h was added on branch nathanw_sa on 2001-04-15 15:29:04 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_limits.h was added on branch thorpej_scsipi on 2001-04-21 17:53:06 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 14-Apr-2001  kleink file int_mwgwtypes.h was added on branch nathanw_sa on 2001-04-14 12:19:51 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_mwgwtypes.h was added on branch thorpej_scsipi on 2001-04-21 17:53:07 +0000
 1.1 26-Jun-2000  kleink branches: 1.1.2;
Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.1.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.2.1 26-Jun-2000  bouyer file int_types.h was added on branch thorpej_scsipi on 2000-11-20 19:58:48 +0000
 1.23 11-Jul-2023  riastradh 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.
 1.22 10-Aug-2020  rin branches: 1.22.20;
Clean up _LKM --> _MODULE leftovers.

Note that _KERNEL is always defined for modules.
 1.21 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.20 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.19 03-Dec-2007  ad branches: 1.19.14; 1.19.16; 1.19.18;
Interrupt handling changes, in discussion since February:

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

Tested on various m68k platforms, but NOT Sun2. In any case, at least
Sun2 compiles now.
 1.17 16-Feb-2007  ad branches: 1.17.2; 1.17.6;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
 1.16 21-Dec-2006  yamt merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.15 06-Oct-2006  tsutsui Use #ifdef _AMIGA_INTR_H_ rather than _MACHINE_INTR_H_
to protect multiple inclusion.
 1.14 11-Dec-2005  christos branches: 1.14.20; 1.14.22;
merge ktrace-lwp.
 1.13 23-Jan-2005  chs branches: 1.13.8;
move spl*() and IPL_* definitions from psl.h to intr.h.
 1.12 17-Jan-2001  is branches: 1.12.24; 1.12.32;
Add IPL_SOFTCLOCK, which was missing.
 1.11 14-Jan-2001  thorpej Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.
 1.10 23-Jan-2000  aymeric add IPL_SERIAL to enable PCMCIA com* compilation
 1.9 15-Jan-2000  aymeric defined IPL_BIO, IPL_NET and IPL_TTY for soon to be integrated PCMCIA code
 1.8 16-Feb-1999  is branches: 1.8.8;
Fix Copyright dates
 1.7 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.6 02-Sep-1998  is Split SMC chipset ARCnet driver into
- machine independent chip driver, in dev/ic/smc90cx6.c/...reg.h,...var.h,
using bus_space methods
- ZBUS frontend in arch/amiga/dev/if_bah_zbus.c
- added IPL_SOFTNET to arch/amiga/include/intr.h, for this
Implementing the ISA bus frontend is left as an exercise to the reader.
 1.5 18-Jul-1998  is Switching dev/ic/lpt.c to use spllpt() instead of spltty(). It doesn't use
tty structures, and on some machines (namely the DraCo internal lpt, and some
multi-i/o boards for Amigas and DraCos), tying spltty to the pretty high printer
interupt level would hurt serial performance.

On all affected ports but Amiga, spllpt() has been defined in machine/intr.h
to be spltty(), thus preserving old behaviour. Portmasters are encouraged to
change is, if they feel something else is better (e.g., one of its own were
possible).
 1.4 16-Apr-1998  is Dont define splserial here... its now different from spltty.
 1.3 27-Oct-1997  is Make splserial == spltty, for now. This should be revisited after the
release.
 1.2 17-Oct-1997  is branches: 1.2.2;
Stopgap for splaudio(), needed by the Melody driver.
This will be replaced soon by something similar to the spltty stuff.
 1.1 27-Aug-1997  is branches: 1.1.2;
machine/intr.h for the Amiga port. Mostly a wrapper around other includes.
 1.1.2.2 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 27-Aug-1997  thorpej file intr.h was added on branch marc-pcmcia on 1997-09-01 20:06:45 +0000
 1.2.2.1 28-Oct-1997  mellon Pull rev 1.3 up from trunk
 1.8.8.3 11-Feb-2001  bouyer Sync with HEAD.
 1.8.8.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.8.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.12.32.1 29-Apr-2005  kent sync with -current
 1.12.24.1 24-Jan-2005  skrll Sync with HEAD.
 1.13.8.4 07-Dec-2007  yamt sync with head
 1.13.8.3 03-Sep-2007  yamt sync with head.
 1.13.8.2 26-Feb-2007  yamt sync with head.
 1.13.8.1 30-Dec-2006  yamt sync with head.
 1.14.22.3 23-Oct-2006  yamt add splsoftserial.
 1.14.22.2 06-Oct-2006  tsutsui Make GENERIC compile:
- protect whole definitions from multiple inclusion
- define splaudio even if it isn't defined
- move declarations before reference
- fix splserial macro to use _splraise() directly
(makeiplcookie is not an array anyway)

(yamt-san: do_func.s errors could be caused by bad toolchain or lack of nbsed)
 1.14.22.1 29-Sep-2006  yamt implement splraiseipl/makeiplcookie for amiga.
 1.14.20.2 12-Jan-2007  ad Sync with head.
 1.14.20.1 18-Nov-2006  ad Sync with head.
 1.17.6.2 03-Dec-2007  ad Sync with HEAD.
 1.17.6.1 13-Mar-2007  ad Sync with head.
 1.17.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.18.24.1 08-Dec-2007  mjf Sync with HEAD.
 1.18.18.1 09-Jan-2008  matt sync with HEAD
 1.18.16.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.19.18.2 20-Jun-2009  yamt sync with head
 1.19.18.1 16-May-2008  yamt sync with head.
 1.19.16.1 18-May-2008  yamt sync with head.
 1.19.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.22.20.1 09-Aug-2023  martin Pull up following revision(s) (requested by maya in ticket #316):

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

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

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

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

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

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

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

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

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

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

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

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

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

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

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

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

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

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

ddb: Cast pointer to uintptr_t first before db_expr_t.

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

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

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

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

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

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

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

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

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

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

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

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

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

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

fix hppa and vax builds.

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

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

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

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

re-fix hppa builds.

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

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

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

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

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

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

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

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

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

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

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

Note that fls32 is 1-based and returns 0 for x=0.
 1.1 12-May-1996  mhitch Used by the new libkvm and kernel coredump.
 1.9 28-Mar-2012  christos - Normalize inclusion protection (remove)
- Move CHAR_{MIN,MAX} to a common file.
- Fix broken comments
 1.8 26-Oct-1994  cgd branches: 1.8.206; 1.8.210;
new RCS ID format.
 1.7 10-Apr-1994  chopps also conform to standard style
 1.6 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.5 26-Jan-1994  mw Updated headers from current amiga branch.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 18-Aug-1993  jtc Removed CLK_TCK, it's value is not machine dependant.
It's supposed to be defined in <time.h>, not <limits.h> anyway.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.8.210.1 05-Apr-2012  mrg sync to latest -current.
 1.8.206.1 17-Apr-2012  yamt sync with head
 1.6 06-Aug-2014  joerg Consistently define WARN in a way that passes format string checks, i.e.
always uses the same number of arguments as given in the format string.
 1.5 14-Mar-2009  dsl branches: 1.5.22; 1.5.36;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.4 28-Apr-2008  martin branches: 1.4.8; 1.4.14;
Remove clause 3 and 4 from TNF licenses
 1.3 25-Jan-2006  christos branches: 1.3.72; 1.3.74; 1.3.76;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.2 31-Oct-2001  thorpej branches: 1.2.2; 1.2.34; 1.2.46;
Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.1 15-Aug-2001  mhitch branches: 1.1.2; 1.1.6;
loadfile() support for new amiga boot loader.
 1.1.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.1.2.1 15-Aug-2001  thorpej file loadfile_machdep.h was added on branch kqueue on 2001-08-25 06:15:06 +0000
 1.2.46.1 01-Feb-2006  yamt sync with head.
 1.2.34.1 21-Jun-2006  yamt sync with head.
 1.2.2.2 31-Oct-2001  thorpej Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.2.2.1 31-Oct-2001  thorpej file loadfile_machdep.h was added on branch nathanw_sa on 2001-10-31 17:20:46 +0000
 1.3.76.2 04-May-2009  yamt sync with head.
 1.3.76.1 16-May-2008  yamt sync with head.
 1.3.74.1 18-May-2008  yamt sync with head.
 1.3.72.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.5.36.1 10-Aug-2014  tls Rebase.
 1.5.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1 29-Apr-2000  thorpej branches: 1.1.6;
Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.6.1 29-Apr-2000  bouyer file lock.h was added on branch thorpej_scsipi on 2000-11-20 19:58:48 +0000
 1.1 30-Nov-2024  christos branches: 1.1.4;
Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 30-Nov-2024  perseant file lwp_private.h was added on branch perseant-exfatfs on 2025-08-02 05:55:25 +0000
 1.1 23-Dec-1999  kleink branches: 1.1.6;
C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.6.1 23-Dec-1999  bouyer file math.h was added on branch thorpej_scsipi on 2000-11-20 19:58:48 +0000
 1.2 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 10-Nov-2001  scw branches: 1.1.2;
file mcontext.h was initially added on branch nathanw_sa.
 1.1.2.1 10-Nov-2001  scw Kernel mcontext glue for Scheduler Activations on m68k from
Klaus Klein <kleink@netbsd.org>.
 1.20 30-May-2009  phx No longer used since migrating from sicallback-softints to MI-softints.
 1.19 03-Dec-2007  ad branches: 1.19.18; 1.19.32;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.18 07-Oct-2006  mhitch branches: 1.18.8; 1.18.26; 1.18.28; 1.18.34;
Use atomic operations for setting ssir. Fixes problem when compiled without
optimization of losing a scheduled software interrupt and stalling the
softclock processing.
 1.17 11-Dec-2005  christos branches: 1.17.20; 1.17.22;
merge ktrace-lwp.
 1.16 07-Aug-2003  agc branches: 1.16.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.15 15-Jan-2001  thorpej branches: 1.15.24;
Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
 1.14 28-Nov-1998  is branches: 1.14.10;
Implement softintr_disestablish().
 1.13 25-Jul-1998  is Use atomic operations for DraCo interupt registers
 1.12 25-Jul-1998  is This has been in amiga/amiga/mtpr.h for a long, long time.
 1.11 27-Aug-1997  is Add __GENERIC_SOFT_INTERRUPTS implementation.
Currently, this is only kind of a wrapper around the *_sicallback() function
family. This way, we'll only break the new driver if it doesn't work.
After more drivers are converted, we'll change it to be the other way round.
 1.10 09-May-1996  is branches: 1.10.12;
First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.9 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.8 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.10.12.1 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.10.1 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.15.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.24.1 03-Aug-2004  skrll Sync with HEAD
 1.16.16.2 07-Dec-2007  yamt sync with head
 1.16.16.1 30-Dec-2006  yamt sync with head.
 1.17.22.1 22-Oct-2006  yamt sync with head
 1.17.20.1 18-Nov-2006  ad Sync with head.
 1.18.34.1 08-Dec-2007  mjf Sync with HEAD.
 1.18.28.1 09-Jan-2008  matt sync with HEAD
 1.18.26.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.18.8.1 03-Dec-2007  ad Sync with HEAD.
 1.19.32.1 24-Oct-2010  jym Sync with HEAD
 1.19.18.1 20-Jun-2009  yamt sync with head
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file mutex.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file mutex.h was added on branch yamt-lazymbuf on 2007-02-26 09:05:48 +0000
 1.50 12-Nov-2015  phx Xorg for amiga via wsfb. Currently available on CV64 and CV64/3D. More
graphics cards will follow, when adding wscons support to them.

I didn't manage to make the "wskbd" protocol the default in the X server,
so you have to provide a small xorg.conf with Option "Protocol" "wskbd".
The standard protocol will not work as the Amiga wskbd cannot be switched
into raw mode and has no AT-scancode translation in the kernel.

On the positive side, wskbd also works with national keymaps under X.

The graphics modes can still be defined via grfconfig(8). Xorg's wsfb
driver uses the current grf video mode, which is usually mode #1.
All resolutions and depths seem to work (tested on CV64).
 1.49 10-Feb-2012  para branches: 1.49.6; 1.49.24;
proper sizing of kmem_arena on different ports

PR port-i386/45946: Kernel locks up in VMEM system
 1.48 08-Feb-2011  rmind branches: 1.48.4; 1.48.8;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.47 11-Dec-2009  tsutsui branches: 1.47.4; 1.47.6; 1.47.8;
Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSEG, and SEGOFSET from <machine/param.h>
to <m68k/pmap_motorola.h> where they should belong
- also simplify NBSEG macro for both 020/030 and 040/060 cases
- also move m68k_trunc_seg(), m68k_round_seg(), and m68k_seg_offset()
(that use SEGOFSET) from <m68k/param.h> to <m68k/pmap_motorola.h>
- add comments about each segment size value used on pmap_motorola
implementation
- add TIA_SIZE, TIA_SHIFT, TIB_SIZE, and TIB_SHIFT macro which can be
used for ste/pte index sizes
- use proper vaddr_t cast instead of unsigned for SEGOFSET/PGOFSET macro

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

Anyway, these values will be moved into <m68k/pmap_motorola.h> soon
since they are quite pmap implementation dependent.
 1.45 06-Jan-2008  mhitch branches: 1.45.10;
Add timecounter support and borrow counter-based delay from i386.
From joerg; testing and final tweaks by me.
 1.44 11-Dec-2005  christos branches: 1.44.50; 1.44.56; 1.44.64;
merge ktrace-lwp.
 1.43 28-Jan-2005  is branches: 1.43.6;
Don't expose spl functions to non-kernel.
 1.42 23-Jan-2005  chs branches: 1.42.2;
move spl*() and IPL_* definitions from psl.h to intr.h.
 1.41 07-Aug-2003  agc branches: 1.41.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.40 18-May-2002  jklos branches: 1.40.8;
Updated NKMEMPAGES_MAX_DEFAULT so that large memory systems won't crash
when allocating/deallocating lots of memory at once.
 1.39 11-Feb-2000  thorpej branches: 1.39.8; 1.39.12; 1.39.20;
Update for the NKMEMPAGES changes.
 1.38 04-Dec-1999  ragge CL* discarding.
 1.37 20-Sep-1997  leo branches: 1.37.16; 1.37.22;
Move the definition of MSGBUFSIZE up to the machine-arch level if
possible. Pointed out by Bernd Ernesti.
 1.36 19-Sep-1997  leo Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.35 10-Jul-1997  veego branches: 1.35.2;
Restore the defines of UPAGES and NPTEPG.
 1.34 10-Jun-1997  veego The 'Mach derived conversion macros' are now in <m68k/param.h>
 1.33 10-Jun-1997  veego Use the MI <m68k/param.h> include.
 1.32 27-Feb-1997  veego Protect MCLSHIFT definition so users can customize MCLBYTES.
patch from jonathan.
 1.31 24-Feb-1997  fvdl Define ALIGNED_POINTER
 1.30 28-Sep-1996  mhitch branches: 1.30.6;
The declarations for the interrupt enable address should only be done if
_KERNEL is defined. The bash install process was including the extern
statements into its generated Makefile.
 1.29 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
 1.28 04-Mar-1996  cgd add _MACHINE and _MACHINE_ARCH, which are like MACHINE and MACHINE_ARCH,
execpt without quotes. meant to be __CONCAT()ted for easy #includes
of machine-dependent headers for MI code (e.g. for the MI ISA/EISA/PCI/TC
bus code).
 1.27 01-Mar-1996  cgd Clean up tabbing/spacing in defns of MACHINE, MACHINE_ARCH, and MID_MACHINE.
 1.26 28-Jan-1996  chopps remove MAXPARTITIONS, closes #1923
 1.25 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.24 13-Aug-1995  mycroft Replace splnet() with splsoftnet(). Add splnet().
 1.23 28-Jun-1995  cgd kill user-land DELAY macro, as suggested by gwr.
 1.22 26-Jun-1995  cgd clean up definitions of ctod(), dtoc(), ctob(), btoc(), btodb(), and
dbtob(). remove unused definitions of ctos(), stoc(), and dtob().
 1.21 16-May-1995  chopps PS_STRINGS in A2. Add fputype, remove cpuspeed. switch to new coredump
 1.20 02-Apr-1995  chopps cleanup SG4_, fix magnum interrupts, gvp hack for ziii, new gvp configs, 4066
4066 interrupt fix, add baudrate gen and don't clear other port lines for mfc
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.19 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.18 18-Mar-1995  cgd don't be so quick to cast macro arguments to unsigned; if the
arguments are really off_t's (e.g. to btodb), then you can lose
information. This was the "> 4G file systems don't work" bug; physio
uses btodb, which was broken.
 1.17 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.16 28-Dec-1994  chopps support for recent changes (non-contig mem..)
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.15 26-Oct-1994  cgd new RCS ID format.
 1.14 16-Sep-1994  jtc branches: 1.14.2;
asm -> __asm (PR #463).
 1.13 24-Aug-1994  chopps add USPACE
 1.12 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.11 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.10 10-Apr-1994  chopps also conform to standard style
 1.9 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.8 23-Feb-1994  chopps add some very usefull debug stuff to spl inline macros.
 1.7 23-Feb-1994  hpeyerl Move some arch dependant stuff in here.
 1.6 11-Feb-1994  chopps Add missing Id's
 1.5 26-Jan-1994  mw Updated headers from current amiga branch.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.14.2.2 16-Sep-1994  jtc asm -> __asm (PR #463).
 1.14.2.1 16-Sep-1994  jtc file param.h was added on branch netbsd-1-0 on 1994-09-16 02:39:37 +0000
 1.30.6.1 11-Mar-1997  is merge in changes from Trunk.
 1.35.2.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.37.22.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.37.16.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.39.20.1 30-May-2002  gehenna Catch up with -current.
 1.39.12.1 20-Jun-2002  nathanw Catch up to -current.
 1.39.8.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.40.8.5 04-Feb-2005  skrll Sync with HEAD.
 1.40.8.4 24-Jan-2005  skrll Sync with HEAD.
 1.40.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.40.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.40.8.1 03-Aug-2004  skrll Sync with HEAD
 1.41.8.1 29-Apr-2005  kent sync with -current
 1.42.2.1 12-Feb-2005  yamt sync with head.
 1.43.6.1 21-Jan-2008  yamt sync with head
 1.44.64.1 08-Jan-2008  bouyer Sync with HEAD
 1.44.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.44.50.1 09-Jan-2008  matt sync with HEAD
 1.45.10.1 11-Mar-2010  yamt sync with head
 1.47.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.47.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.47.4.1 05-Mar-2011  rmind sync with head
 1.48.8.1 18-Feb-2012  mrg merge to -current.
 1.48.4.1 17-Apr-2012  yamt sync with head
 1.49.24.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.49.6.1 03-Dec-2017  jdolecek update from HEAD
 1.17 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.16 05-Jun-2007  mhitch branches: 1.16.10;
Switch amiga to common m68k include files, pcb.h, pmap_motorola.h, and
pte_motrola.h.
 1.15 22-May-2007  mhitch Get rid of pcb_cmap2 - it hasn't been used for a long, long time.
 1.14 04-Mar-2007  christos branches: 1.14.2; 1.14.4; 1.14.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13 11-Dec-2005  christos branches: 1.13.24; 1.13.26; 1.13.30;
merge ktrace-lwp.
 1.12 07-Aug-2003  agc branches: 1.12.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.11 27-Sep-2000  aymeric branches: 1.11.24;
define PCB_REGS_* so that kdb compiles again
 1.10 06-Jan-1998  thorpej branches: 1.10.14;
The user segment table pointer is no longer kept here. Change it to
a spare field.

XXX Should be changed to use generic m68k PCB!
 1.9 11-May-1995  chopps remove double mapping of kernel stack. created cpu_set_kpc()
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 21-May-1994  chopps add md_coredump
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.10.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.11.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.24.1 03-Aug-2004  skrll Sync with HEAD
 1.12.16.1 03-Sep-2007  yamt sync with head.
 1.13.30.1 04-Jun-2007  wrstuden Update to today's netbsd-4.
 1.13.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.13.24.1 30-May-2007  riz Pull up following revision(s) (requested by mhitch in ticket #683):
sys/arch/m68k/m68k/switch_subr.s: revision 1.19
sys/arch/amiga/include/pcb.h: revision 1.15
sys/arch/amiga/amiga/genassym.cf: revision 1.24
Get rid of pcb_cmap2 - it hasn't been used for a long, long time.
 1.14.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.14.4.1 11-Jul-2007  mjf Sync with head.
 1.14.2.2 09-Jun-2007  ad Sync with head.
 1.14.2.1 27-May-2007  ad Sync with head.
 1.16.10.1 06-Nov-2007  matt sync with HEAD
 1.8 29-Mar-2014  christos make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.7 11-Jul-2012  rkujawa branches: 1.7.2; 1.7.4;
Add support for all 4 slots of G-REX 4000D and G-REX 1200. Also add
(untested yet) DMA support for G-REX bridges.
 1.6 01-Jun-2012  rkujawa More work on PCI memory accesses on empb(4).
 1.5 07-May-2012  tsutsui Add dummy bus_dma(9) typedefs (enabled by __HAVE_NO_BUS_DMA) in <sys/bus.h>
for ports which don't bother to have unnecessary bus_dma(9) implementation
to appease MI driver modules that require bus_dma_tag_t.

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

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

"Sounds good" from martin@ on port-m68k@.
 1.4 19-Jan-2012  rkujawa Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.3 19-Sep-2011  rkujawa branches: 1.3.2; 1.3.6;
Minor changes to Amiga PCI MD code:
- Add bus enumeration and resource assignment (PCI_NETBSD_CONFIGURE) to mppb(4) - no more need to run AmigaOS to configure the bus.
- Add PCI configuration address register to p5pb(4).
- Add PCI I/O space support to p5pb(4).
- Move common code from p5pb(4) and mppb(4) to new pci_machdep.c file.
- Fix style.
 1.2 17-Sep-2011  rkujawa Add driver for Prometheus PCI bridge.
Change approved by phx.
 1.1 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.3.6.2 02-Jun-2012  mrg sync to latest -current.
 1.3.6.1 18-Feb-2012  mrg merge to -current.
 1.3.2.4 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.2.3 30-Oct-2012  yamt sync with head
 1.3.2.2 23-May-2012  yamt sync with head.
 1.3.2.1 17-Apr-2012  yamt sync with head
 1.7.4.1 18-May-2014  rmind sync with head
 1.7.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.45 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.44 05-Jun-2007  mhitch branches: 1.44.10;
Switch amiga to common m68k include files, pcb.h, pmap_motorola.h, and
pte_motrola.h.
 1.43 04-Mar-2007  christos branches: 1.43.2; 1.43.4; 1.43.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.42 16-Feb-2006  perry branches: 1.42.20;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.41 24-Dec-2005  perry branches: 1.41.2; 1.41.4; 1.41.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.40 11-Dec-2005  christos merge ktrace-lwp.
 1.39 07-Aug-2003  agc branches: 1.39.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.38 02-Apr-2003  thorpej branches: 1.38.2;
Use PAGE_SIZE rather than NBPG.
 1.37 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.36 22-Sep-2002  chs it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not. doh.
 1.35 22-Sep-2002  chs add pmap_remove_all() hook (empty on most platforms so far).
 1.34 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.33 10-Sep-2001  chris branches: 1.33.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.32 26-May-2001  chs branches: 1.32.2; 1.32.4;
replace vm_page_t with struct vm_page *.
 1.31 26-May-2001  chs replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}.
 1.30 22-Apr-2001  thorpej Undo a misguided previous change to the pmap_update() API.
 1.29 22-Apr-2001  thorpej Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
 1.28 21-Apr-2001  thorpej #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
 1.27 19-Jun-1999  is branches: 1.27.2; 1.27.14;
Sync with Atari pmap: support for the UVM changes
 1.26 25-Feb-1999  is branches: 1.26.4;
Machine independent part of fix for PR 6152 (gdb doesn't work on machines
with UVM and seperate I&D-Cache). Mostly by Michael Hitch, but pass struct
proc * instead of the pmap. Reason: said machine will need a method to do
the syncing operation for "curproc", too; this way more code can be shared.
 1.25 25-Feb-1999  is prepare for gdb fix
 1.24 22-Mar-1998  is MACHINE_NEW_NONCONTIG for NetBSD/Amiga. The older contiguous and
MACHINE_NONCONTIG stuff isn't supported anymore.
 1.23 18-Feb-1998  cgd Move pmap_map() function definition to MD headers, as appropriate. It's
an internal function, and the VM system shouldn't try to prototype it.
(Note that some ports _don't_ prototype it.)
 1.22 06-Jan-1998  thorpej Garbage-collect pm_stchanged; it's not used by anything.
 1.21 06-Jan-1998  thorpej Garbage-collect use of the PCB's copy of the user segment table pointer.
 1.20 03-Jan-1998  thorpej Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
 1.19 01-Jan-1998  thorpej Change an argument name to PMAP_ACTIVATE() to more accurately describe the
semantics of the argument.
 1.18 01-Jan-1998  thorpej - Make pmap_activate() and pmap_deactivate() take a struct proc *.
- Define active_user_pmap() and use it in the appropriate places (from hp300
port).
 1.17 10-Jun-1997  veego s/amiga_btop/m68k_btop/
 1.16 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.15 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.14 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.13 11-May-1995  jtc KERNEL -> _KERNEL
 1.12 10-Apr-1995  mycroft Bring back pmap_kernel(), for now always inlined as a pointer to
kernel_pmap_store.
 1.11 28-Dec-1994  chopps support for recent changes (non-contig mem..)
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.8 25-May-1994  chopps update to work with new m68k frame and recent vm changes.
 1.7 10-Apr-1994  chopps also conform to standard style
 1.6 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.5 11-Feb-1994  chopps Add missing Id's
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.26.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.27.14.1 21-Jun-2001  nathanw Catch up to -current.
 1.27.2.1 23-Apr-2001  bouyer Sync with HEAD.
 1.32.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.32.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.32.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.32.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.33.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.33.4.4 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.33.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.33.4.2 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.33.4.1 10-Sep-2001  scw file pmap.h was added on branch nathanw_sa on 2001-11-17 21:59:09 +0000
 1.38.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.38.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.38.2.1 03-Aug-2004  skrll Sync with HEAD
 1.39.16.1 03-Sep-2007  yamt sync with head.
 1.41.6.1 22-Apr-2006  simonb Sync with head.
 1.41.4.1 09-Sep-2006  rpaulo sync with head
 1.41.2.1 18-Feb-2006  yamt sync with head.
 1.42.20.1 12-Mar-2007  rmind Sync with HEAD.
 1.43.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.43.4.1 11-Jul-2007  mjf Sync with head.
 1.43.2.1 09-Jun-2007  ad Sync with head.
 1.44.10.1 06-Nov-2007  matt sync with HEAD
 1.2 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

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

* Removes the PMC code of ARM XSCALE.

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

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

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

* Removes the pmc_evid_t and pmc_ctr_t types.

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

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

- Switch all m68k-based ports over to __HAVE_SYSCALL_INTERN.
- Add systrace glue.
- Define struct mdproc in <m68k/proc.h> instead of <machine/proc.h>.
(They were all defined exactly the same anyway, other than a couple
of the MDP_* flags.)
 1.12 08-Jun-1997  veego branches: 1.12.36; 1.12.40; 1.12.48;
Use 0x0001 for MDP_STACKADJ. Thanks Klaus.
 1.11 07-Jun-1997  veego GC unused MDP_AST, noticed by Klaus Klein.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.8 10-Apr-1994  chopps also conform to standard style
 1.7 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.6 11-Feb-1994  chopps Add missing Id's
 1.5 26-Jan-1994  mw Updated headers from current amiga branch.
 1.4 31-Oct-1993  mw Define new flag MDP_STACKADJ to back out of a stack adjustment in
syscall() in case of ERESTART.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.12.48.1 16-Jul-2002  gehenna catch up with -current.
 1.12.40.2 01-Aug-2002  nathanw Catch up to -current.
 1.12.40.1 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.12.36.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 16-May-1994  chopps just include common m68k version
 1.21 11-Dec-2005  christos merge ktrace-lwp.
 1.20 23-Jan-2005  chs move spl*() and IPL_* definitions from psl.h to intr.h.
 1.19 27-May-2001  is branches: 1.19.8; 1.19.24; 1.19.32;
make the defopted "LEV6_DEFER" work for LKMs, too.
 1.18 08-May-2001  is defopt LEV6_DEFER.
 1.17 13-Apr-2001  thorpej Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
 1.16 14-Jan-2001  thorpej branches: 1.16.2;
Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
 1.15 22-Aug-2000  thorpej Add spllock(). See spl(9) for details.
 1.14 05-Aug-1999  thorpej branches: 1.14.2;
Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

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

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.
 1.13 14-Jun-1998  kleink `interupt' -> `interrupt'
 1.12 11-Apr-1998  is amiga_ttyspl -> amiga_serialspl (and keep ttyspl constant at 4 again).
(Part of this change slipped in with my last machdep commit; thanks to
Matthias Scheler for pointing this out).
 1.11 30-Nov-1996  is Variable spltty a la Jason Thorpe. Needed for the DraCo variant of com.c.
 1.10 13-Oct-1996  christos backout previous kprintf change
 1.9 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.8 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.14.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.14.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.14.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.16.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.19.32.1 29-Apr-2005  kent sync with -current
 1.19.24.1 24-Jan-2005  skrll Sync with HEAD.
 1.19.8.2 27-May-2001  is make the defopted "LEV6_DEFER" work for LKMs, too.
 1.19.8.1 27-May-2001  is file psl.h was added on branch nathanw_sa on 2001-05-27 20:22:58 +0000
 1.20 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.19 05-Jun-2007  mhitch branches: 1.19.10;
Switch amiga to common m68k include files, pcb.h, pmap_motorola.h, and
pte_motrola.h.
 1.18 11-Dec-2005  christos branches: 1.18.30; 1.18.32; 1.18.38;
merge ktrace-lwp.
 1.17 07-Aug-2003  agc branches: 1.17.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.16 02-Apr-2003  thorpej branches: 1.16.2;
Use PAGE_SIZE rather than NBPG.
 1.15 12-Aug-1998  is Get rid of AMIGA_UPTBASE.
Replace it by a variable, which is initialized in amiga_init.c.
This will make the kernel actually work even if we have lots of Zorro-III
(or DraCo direct bus) i/o space.
 1.14 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.13 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.12 02-Apr-1995  chopps cleanup SG4_, fix magnum interrupts, gvp hack for ziii, new gvp configs, 4066
4066 interrupt fix, add baudrate gen and don't clear other port lines for mfc
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.11 03-Dec-1994  chopps add typedefs for pte's and ste's.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 08-Jun-1994  chopps put back simple replacement for pte and ste structs to make code work for now.
 1.8 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.7 04-Jun-1994  chopps fix long standing "bug" with pmap. Basically logic/misunderstanding
error commited when it was ported from hp300 (mach?). All
8M + amigas now gain ~1M of physical ram (4M hack removed).
Some minor cleanup. HAVEVAC code removed as it is for the hp300.
 1.6 01-Jun-1994  chopps bring some good ideas over from hp300 port.
 1.5 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.4 10-Apr-1994  chopps also conform to standard style
 1.3 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 26-Jan-1994  mw Updated headers from current amiga branch.
 1.16.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.16.1 03-Sep-2007  yamt sync with head.
 1.18.38.1 26-Jun-2007  garbled Sync with HEAD.
 1.18.32.1 11-Jul-2007  mjf Sync with head.
 1.18.30.1 09-Jun-2007  ad Sync with head.
 1.19.10.1 06-Nov-2007  matt sync with HEAD
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 10-Apr-1994  chopps also conform to standard style
 1.2 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.1 26-Jan-1994  mw Updated headers from current amiga branch.
 1.11 26-Oct-1994  cgd new RCS ID format.
 1.10 10-Apr-1994  chopps also conform to standard style
 1.9 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.8 27-Jan-1994  cgd HP300 -> MACHINE
 1.7 08-Jan-1994  cgd stubs which pint to m68k include
 1.6 06-Jan-1994  mycroft Still need old #defines for now.
 1.5 06-Jan-1994  mycroft Implement `struct reg'.
 1.4 08-Dec-1993  mycroft Move #define of NIPCREG outside #fidef.
 1.3 02-Sep-1993  mycroft Ditto.
 1.2 22-May-1993  cgd add rcsids to everything and clean up headers
 1.1 13-May-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 13-May-1993  cgd add hp300 kernel files. generic kernel files might need some help...
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file rwlock.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file rwlock.h was added on branch yamt-lazymbuf on 2007-02-26 09:05:48 +0000
 1.1 20-Dec-1994  cgd make the definition of _JBLEN mach. dep. header-dependent.
 1.6 13-Sep-1998  mycroft Minor change.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 10-Apr-1994  chopps also conform to standard style
 1.3 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.2 26-Jan-1994  mw Updated headers from current amiga branch.
 1.1 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.10 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.9 22-Jan-1999  mycroft Standardize format.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 15-Oct-1994  cgd make <stdarg.h> a symlink, and clean up ports' stdarg.h and varargs.h files.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.2 11-Dec-2005  christos branches: 1.2.18;
merge ktrace-lwp.
 1.1 11-Jul-2005  christos branches: 1.1.6;
Add m68k sunos_machdep.h
 1.1.6.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.6.1 11-Jul-2005  skrll file sunos_machdep.h was added on branch ktrace-lwp on 2005-11-10 13:55:00 +0000
 1.2.18.2 21-Jun-2006  yamt sync with head.
 1.2.18.1 11-Dec-2005  yamt file sunos_machdep.h was added on branch yamt-lazymbuf on 2006-06-21 14:48:53 +0000
 1.4 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.3 09-Nov-1999  kleink branches: 1.3.40; 1.3.218;
Rip protection against multiple inclusion from wrapper headers.
 1.2 29-Apr-1999  kleink branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10;
Pull in the right generic m68k header. (Where was my mind?)
 1.1 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.2.10.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.6.1 15-Nov-1999  fvdl Sync with -current
 1.2.4.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3.218.1 10-Jun-2019  christos Sync with HEAD
 1.3.40.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.8 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.24 01-Apr-2021  simonb Define __HAVE_LEGACY_INTRCNT to indicate this port uses legacy intrcnt
interrupt accounting.
 1.23 12-Jun-2011  rmind branches: 1.23.66; 1.23.68;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

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

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

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

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

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

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.22 20-Jan-2008  joerg branches: 1.22.32; 1.22.42;
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.21 06-Jan-2008  mhitch Add timecounter support and borrow counter-based delay from i386.
From joerg; testing and final tweaks by me.
 1.20 17-Oct-2007  garbled branches: 1.20.2; 1.20.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.19 14-Jul-2007  ad branches: 1.19.10;
Generic soft interrupts are mandatory.
 1.18 05-Sep-2006  mhitch branches: 1.18.12; 1.18.20;
Switch amiga to MI todr.
 1.17 11-Dec-2005  christos branches: 1.17.4; 1.17.8;
merge ktrace-lwp.
 1.16 19-Jan-2005  chs branches: 1.16.8;
amiga no longer abuses cf_unit.
 1.15 06-Aug-2003  bsh branches: 1.15.8;
add __GENERIC_SOFT_INTERRUPTS_ALL_LEVELS to machine/types.h for
following ports:

acorn26, amiga, hpcarm, sparc, sparc64

This was proposed by Martin Husemann at teck-kern@ in May to properly
test whether softintr can be established for all IPL, or only for
IPL_SOFT*. OKed by acorn26, hpcarm and sparc port masters.
 1.14 28-Feb-2002  simonb branches: 1.14.16;
Use "#define<tab>".
 1.13 14-Jan-2001  thorpej branches: 1.13.4; 1.13.8;
Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.
 1.12 05-Feb-2000  cgd add __BROKEN_CONFIG_UNIT_USAGE #define, becuase these ports do very
wrong things with device configuration data "cf_unit" information.
 1.11 23-Dec-1996  veego branches: 1.11.28;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.10 05-Dec-1996  cgd First step inn removing config_scan() and the hacks that gave devices
on indirect-config busses a (permanent) softc that they could share
between 'match' and 'attach' routines:

Define __BROKEN_INDIRECT_CONFIG so that old autoconfiguration
interfaces are used, until drivers are converted to use the new
interfaces (actually, converted back to use the _older_ interfaces)
which prohibit indirect configuration devices from receiving a softc
in their match routine that they can share with their attach routine.
 1.9 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 26-Jun-1995  cgd define __BDEVSW_DUMP_OLD_TYPE for ports where it's true. clean up
some m68k ports inclusion of common header.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.11.28.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.11.28.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.13.8.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.13.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.14.16.4 24-Jan-2005  skrll Sync with HEAD.
 1.14.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.16.1 03-Aug-2004  skrll Sync with HEAD
 1.15.8.1 29-Apr-2005  kent sync with -current
 1.16.8.3 21-Jan-2008  yamt sync with head
 1.16.8.2 03-Sep-2007  yamt sync with head.
 1.16.8.1 30-Dec-2006  yamt sync with head.
 1.17.8.1 14-Sep-2006  yamt sync with head.
 1.17.4.1 09-Sep-2006  rpaulo sync with head
 1.18.20.1 03-Oct-2007  garbled Sync with HEAD
 1.18.12.1 15-Jul-2007  ad Sync with head.
 1.19.10.3 23-Mar-2008  matt sync with HEAD
 1.19.10.2 09-Jan-2008  matt sync with HEAD
 1.19.10.1 06-Nov-2007  matt sync with HEAD
 1.20.8.2 23-Jan-2008  bouyer Sync with HEAD.
 1.20.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.20.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.22.42.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.22.32.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.23.68.1 03-Apr-2021  thorpej Sync with HEAD.
 1.23.66.1 03-Apr-2021  thorpej Sync with HEAD.
 1.7 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.6 26-Oct-1994  cgd new RCS ID format.
 1.5 15-Oct-1994  cgd make <stdarg.h> a symlink, and clean up ports' stdarg.h and varargs.h files.
 1.4 04-Jul-1994  chopps move to new disk minor encoding (parts have lowest 4 bits instead of 3)
remove multiple inclusions protection from varargs.h
 1.3 10-Apr-1994  chopps also conform to standard style
 1.2 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.1 27-Jan-1994  mycroft Pointer to common version.
 1.48 01-Feb-2020  tsutsui Add MAX/MIN PAGE_SIZE and PAGE_SHIFT definitions of m68k for jemalloc(3).

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

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

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

Should be pulled up to netbsd-9.
 1.47 27-Mar-2019  christos branches: 1.47.4; 1.47.6;
- expose vmparams to userland on arm, like other archs do.
- remove unneeded includes
 1.46 30-Sep-2015  phx branches: 1.46.18;
Reduce MAXDSIZ from 416MB back to 224MB.
Due to limitations by the current pmap implementation our virtual address
space is limited to 512MB. A MAXDSIZ of 416MB would leave only a little bit
more than 30MB for shared objects and heap allocations, so 224MB seems like
a good compromise.
 1.45 19-Jun-2015  mlelstv remove obsolete comments
 1.44 13-Jun-2015  phx Use all the changes from
http://ftp.netbsd.org/pub/NetBSD/misc/mlelstv/vmparam.diff
after a discussion on port-m68k. I tested them on several Amiga models
and they seem to work fine.
This gives us the maximum virtual memory space for a process under the
current 512MB pmap limitation.
Also bump VM_KERNEL_PT_PAGES to allow up to 2 GB RAM.
 1.43 01-Jun-2015  phx Remove unused KUSER_AREA, SYSPTSIZE, USRPTSIZE.
Bump MAXTSIZ and MAXDSIZ to the same values atari is using.
This makes gcc 4.8 (/usr/libexec/cc1) load and execute.
 1.42 08-Feb-2011  rmind branches: 1.42.14; 1.42.30; 1.42.32;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.41 28-Dec-2010  mhitch branches: 1.41.2; 1.41.4;
Raise address of user stack to the highest safe (for 68040 mmu) address,
which increases available user address space by 256MB. One file in
pkgsrc/lang/php53 was too large for the amiga. Also remove an old
presumably outdated comment.
 1.40 06-Nov-2010  uebayasi Remove incomplete, never worked dynamic run-time memory registration
(uvm_page_physload(9)). This functionality will be re-added later.
 1.39 08-Dec-2009  tsutsui branches: 1.39.2; 1.39.4;
Use PGSHIFT from <machine/param.h> for PAGE_SHIFT.
We can assume PGSHIFT is always constant on current
m68k pmap_motorola implementation.
Also fix some leftover HP300 comments on some ports.
 1.38 26-Aug-2009  thorpej Minor tweak to the pv_table management in the Hibler-derived m68k pmaps:
The head of the list is now a pv_header, which contains the first pv_entry
as well as a 16-bit attributes field (replaces the pmap_attributes array
plus the pv_entry::pv_flags field) as a 16-bit count of caller-specified
cache-inhibited mappings.

Tested on hp300 (shared pmap_motorola.c), changes to atari and amiga copies
are purely mechanical.
 1.37 06-Mar-2009  joerg Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
 1.36 17-Oct-2007  garbled branches: 1.36.20; 1.36.28; 1.36.30; 1.36.34;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.35 12-May-2007  mhitch branches: 1.35.10;
Final changes to amiga kernel address space layout to match almost all the
other m68k ports (initially from the yamt-km branch a long time ago).

- move Sysmap to the end of address space.
- move Amiga hardware mapping to immediately after Sysptmap.
- tweak virtual_avail/end accordingly.

A DEBUG kernel should now boot without panicing. Also, kernel address space
layout is now compatible with m68k/m68k/pmap_motorola.c.
 1.34 11-Dec-2005  christos branches: 1.34.24; 1.34.26; 1.34.30; 1.34.32; 1.34.38; 1.34.40;
merge ktrace-lwp.
 1.33 07-Aug-2003  agc branches: 1.33.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.32 02-Apr-2003  thorpej branches: 1.32.2;
Use PAGE_SIZE rather than NBPG.
 1.31 10-Dec-2002  thorpej Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
 1.30 15-Nov-2001  soren MAXSLP is defined to be a machine-independent scheduling parameter,
so move it into sys/param.h.
 1.29 01-May-2001  thorpej branches: 1.29.2; 1.29.8;
Per discussion w/ chuck and chuck, restructure the md page stuff
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
 1.28 29-Apr-2001  thorpej Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure. Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM. These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

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

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now). Changes to other pmap
modules will follow.
 1.27 14-Nov-2000  thorpej branches: 1.27.2;
We use 8K pages on the Amiga. Make PAGE_SIZE and friends into
compile-time constants.
 1.26 14-Feb-2000  is enlarge the initial kernel page table - needed for some 128 MB machine
 1.25 11-Feb-2000  thorpej Update for the NKMEMPAGES changes.
 1.24 26-Jan-2000  tsutsui Remove obsoleted macros.
 1.23 04-Dec-1999  ragge CL* discarding.
 1.22 25-Sep-1999  is branches: 1.22.2; 1.22.8;
vm_offset_t -> vaddr_t/paddr_t
 1.21 26-Apr-1999  thorpej Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
 1.20 02-Oct-1998  is branches: 1.20.6; 1.20.8;
Yet another workaround for pmap bugs. Several reports on the port-amiga
list claim this helps with some big-machine situations.
 1.19 10-Jul-1998  mhitch Support two free memory lists; second list will be 16-bit Zorro II memory.
 1.18 22-Mar-1998  is MACHINE_NEW_NONCONTIG for NetBSD/Amiga. The older contiguous and
MACHINE_NONCONTIG stuff isn't supported anymore.
 1.17 11-Sep-1997  chopps branches: 1.17.2;
VM_MAX_ADDRESS is the user max address -- adjust
 1.16 12-Jul-1997  perry branches: 1.16.2;
update comment from 1981 on memory and disk prices -- pr-2754 from Curt Sampson
 1.15 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.14 21-Apr-1996  veego branches: 1.14.6; 1.14.10;
- Cleanup for -Wall and -Wstrict-prototypes
 1.13 26-Oct-1994  cgd new RCS ID format.
 1.12 02-Jul-1994  chopps increase SYSPTSIZE to 2 to accommodate zthreebus devices.
 1.11 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.10 04-Jun-1994  chopps fix long standing "bug" with pmap. Basically logic/misunderstanding
error commited when it was ported from hp300 (mach?). All
8M + amigas now gain ~1M of physical ram (4M hack removed).
Some minor cleanup. HAVEVAC code removed as it is for the hp300.
 1.9 10-Apr-1994  chopps also conform to standard style
 1.8 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.7 23-Feb-1994  chopps added KUSER_AREA for gdb like things. removed HIGHPAGES
 1.6 17-Feb-1994  chopps amiga now has USRSTACK at 0x0e000000 for further sun compat.
 1.5 11-Feb-1994  chopps Add missing Id's
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.14.10.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.14.6.1 12-Feb-1997  mrg initial work for dynamic swap additions.
 1.16.2.1 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.17.2.1 03-Oct-1998  cgd pull up rev 1.20 from trunk (is)
 1.20.8.2 06-Aug-1999  chs take an initial guess at UBC parameters.
 1.20.8.1 21-Jun-1999  thorpej Sync w/ -current.
 1.20.6.1 15-Feb-2000  he Pull up revision 1.26 (requested by is):
Enlarge initial kernel page table. needed to boot some 128 MB
machines.
 1.22.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.22.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.22.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.27.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.29.8.3 11-Dec-2002  thorpej Sync with HEAD.
 1.29.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.29.8.1 01-May-2001  nathanw file vmparam.h was added on branch nathanw_sa on 2002-01-08 00:22:59 +0000
 1.29.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.32.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.32.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.32.2.1 03-Aug-2004  skrll Sync with HEAD
 1.33.16.1 03-Sep-2007  yamt sync with head.
 1.34.40.1 04-Jun-2007  wrstuden Update to today's netbsd-4.
 1.34.38.1 22-May-2007  matt Update to HEAD.
 1.34.32.1 11-Jul-2007  mjf Sync with head.
 1.34.30.1 27-May-2007  ad Sync with head.
 1.34.26.1 17-May-2007  yamt sync with head.
 1.34.24.2 16-Jan-2011  bouyer Pull up following revision(s) (requested by mhitch in ticket #1416):
sys/arch/amiga/include/vmparam.h: revision 1.41
Raise address of user stack to the highest safe (for 68040 mmu) address,
which increases available user address space by 256MB. One file in
pkgsrc/lang/php53 was too large for the amiga. Also remove an old
presumably outdated comment.
 1.34.24.1 23-May-2007  riz Pull up following revision(s) (requested by mhitch in ticket #659):
sys/arch/amiga/amiga/amiga_init.c: revision 1.95
sys/arch/amiga/include/vmparam.h: revision 1.35
sys/arch/amiga/amiga/pmap.c: revision 1.123
Final changes to amiga kernel address space layout to match almost all the
other m68k ports (initially from the yamt-km branch a long time ago).
- move Sysmap to the end of address space.
- move Amiga hardware mapping to immediately after Sysptmap.
- tweak virtual_avail/end accordingly.
A DEBUG kernel should now boot without panicing. Also, kernel address space
layout is now compatible with m68k/m68k/pmap_motorola.c.
 1.35.10.1 06-Nov-2007  matt sync with HEAD
 1.36.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.36.30.1 16-Jan-2011  bouyer Pull up following revision(s) (requested by mhitch in ticket #1518):
sys/arch/amiga/include/vmparam.h: revision 1.41
Raise address of user stack to the highest safe (for 68040 mmu) address,
which increases available user address space by 256MB. One file in
pkgsrc/lang/php53 was too large for the amiga. Also remove an old
presumably outdated comment.
 1.36.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.36.20.3 11-Mar-2010  yamt sync with head
 1.36.20.2 16-Sep-2009  yamt sync with head
 1.36.20.1 04-May-2009  yamt sync with head.
 1.39.4.1 05-Mar-2011  rmind sync with head
 1.39.2.1 26-Apr-2010  uebayasi Remove the unfinished code to add a memory segment after uvm_page_init().
It doesn't even compile.

(In the future, we should allocate struct vm_page [] on the added memory
segment for NUMA's sake.)
 1.41.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.41.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.42.32.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.42.32.2 22-Sep-2015  skrll Sync with HEAD
 1.42.32.1 06-Jun-2015  skrll Sync with HEAD
 1.42.30.3 06-Nov-2015  riz Pull up following revision(s) (requested by phx in ticket #989):
sys/arch/amiga/include/vmparam.h: revision 1.46
Reduce MAXDSIZ from 416MB back to 224MB.
Due to limitations by the current pmap implementation our virtual address
space is limited to 512MB. A MAXDSIZ of 416MB would leave only a little bit
more than 30MB for shared objects and heap allocations, so 224MB seems like
a good compromise.
 1.42.30.2 06-Nov-2015  riz Pull up following revision(s) (requested by phx in ticket #986):
sys/arch/amiga/include/vmparam.h: revision 1.44
Use all the changes from
http://ftp.netbsd.org/pub/NetBSD/misc/mlelstv/vmparam.diff
after a discussion on port-m68k. I tested them on several Amiga models
and they seem to work fine.
This gives us the maximum virtual memory space for a process under the
current 512MB pmap limitation.
Also bump VM_KERNEL_PT_PAGES to allow up to 2 GB RAM.
 1.42.30.1 29-Jun-2015  snj Pull up following revision(s) (requested by phx in ticket #841):
sys/arch/amiga/include/vmparam.h: revision 1.43
Remove unused KUSER_AREA, SYSPTSIZE, USRPTSIZE.
Bump MAXTSIZ and MAXDSIZ to the same values atari is using.
This makes gcc 4.8 (/usr/libexec/cc1) load and execute.
 1.42.14.1 03-Dec-2017  jdolecek update from HEAD
 1.46.18.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.46.18.1 10-Jun-2019  christos Sync with HEAD
 1.47.6.1 29-Feb-2020  ad Sync with head.
 1.47.4.1 10-Feb-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #682):

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

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

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

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

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

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

Should be pulled up to netbsd-9.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 08-May-2004  kleink branches: 1.1.2;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 08-May-2004  skrll file wchar_limits.h was added on branch ktrace-lwp on 2004-08-03 10:32:09 +0000

RSS XML Feed